Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Victor Kirhenshtein

#781
Hi,

sounds quite strange. Could you illustrate your problem with some screenshots?

Best regards,
Victor
#782
General / Re: Can't make AppAgent work
November 14, 2020, 11:40:53 AM
Hi!

Most likely problem is with UNICODE. By default NetXMS is build in UNICODE mode, so it uses wchar_t for all characters. I suppose that your program built as non-UNICODE, so it actually passes char to functions from libappagent that actually expects wchar_t. I'd recommend to build app agent separately with UNICODE disabled and link that version with your application.

For example, you can configure NetXMS sources like this:


./configure --with-sdk --disable-unicode --prefix=/opt/nxsdk

and then build you application adding

-I /opt/nxsdk/include -L /opt/nxsdk/lib -lappagent -lnetxms


You can get slightly more diagnostic from app agent by setting nxlolg debug callback:

    nxlog_set_debug_writer(DebugWriter);
    nxlog_set_debug_level(9);


With debug writer similar to this:

static void DebugWriter(const TCHAR *tag, const TCHAR *format, va_list args)
{
    if (tag != nullptr)
        printf("[%s] ",tag);
    vprintf(format, args);
    printf("\n");
}


Attached is functional example for reference. I've compiled it as following:
g++ -o demoapp demoapp.cpp -I /opt/nxsdk/include -L /opt/nxsdk/lib -lappagent -lnetxms

Sample app output:

victor@xps13:~/Source/appagentdemo$ LD_LIBRARY_PATH=/opt/nxsdk/lib ./demoapp
Initializing AppAgent...
Starting AppAgent...
Application agent startedApp started
NamedPipeListener(appagent.DEMOAPP): waiting for connection
NamedPipeListener(appagent.DEMOAPP): accepted connection by user victor


nxappget output:

victor@xps13:~$ /opt/netxms/bin/nxappget DEMOAPP DemoApp.Metric1
OK
victor@xps13:~$


Hope this helps!

Best regards,
Victor
#783
Hi,

what version you are using, and what component - session agent or user agent? I remember dealing with that (or similar) issue at some point in the past...

Best regards,
Victor
#784
General Support / Re: NXSL: Alarms by node
October 27, 2020, 06:10:19 PM
Yes, you have to get node object first. Global variables $node and $object refer to current node. You can use function FindObject to get other objects. This function accepts either object ID or name. For example, if you want to print alarms for node named "netxms-server":

node = FindObject("netxms-server");
for(a : node->alarms)
{
println(a->message);
}


Best regards,
Victor
#785
Announcements / Re: NetXMS 3.5 released
October 14, 2020, 10:51:49 AM
3.5.136 is now available in repository.

Best regards,
Victor
#786
Announcements / Re: NetXMS agent updated to 3.5.136
October 14, 2020, 10:51:21 AM
Packages on download page were updated to version 3.5.152 due to packaging issues. Functionality wise this version is identical with 3.5.136.
#787
General Support / Re: Problem with "Input fields"
October 13, 2020, 01:15:14 PM
You can mark option "tool generates output" in object tool configuration and use println in script for sending output back to client.

Best regards,
Victor
#788
Announcements / NetXMS agent updated to 3.5.136
October 13, 2020, 01:08:44 PM
Hi all!

NetXMS agent was updated to version 3.5.136 - it fixes possible agent crash when accessing agent thread pool metrics.

Best regards,
Victor
#789
Announcements / Re: NetXMS 3.5 released
October 12, 2020, 05:40:15 PM
Hi,

do you monitor thread pools on agent? If yes, try to temporarily disable those DCIs. Recently we've discovered bug that can lead to agent crash after querying data for thread pool WEBSVC.

Best regards,
Victor

P.S. We started build 3.5.136 - it should be published in few hours and probably will fix that.
#790
General Support / Re: Problem with "Input fields"
October 12, 2020, 10:20:13 AM
Hi,

you have to pass them as script arguments and then access them via $ARGS array. For example, you can create library script named "TestScript" as this:

trace(0, "field1 = " . $ARGS[1]);
trace(0, "field2 = " . $ARGS[2]);


and configure it in object tool as this:

TestScript("$(Field1)", "$(Field2)")


Best regards,
Victor

#791
No, at least at the moment. All that user support application provides is configurable actions menu for the user and screenshot functionality. We do not have any specific plans for it yet. Current functionality for user agent was developed at request from one of our customers.

Best regards,
Victor
#792
Hi,

please try updating to 3.5.133. If it won't help try to run netxmsd under gdb and provide stack trace.

Best regards,
Victor
#793
Hi all!

We just published patch release for version 3.5 (binary version 3.5.133) that fixes few critical issues in server and database manager. Full change log:

- Fixed server deadlock when unreachable node is deleted
- Fixed SNMPv3 performance issue
- Fixed issues:
        NX-1966 (MySQL / MariaDB database access performance issues)

Only server component is affected, there is no need to update agents or UI.

Best regards,
Victor
#794
In agent config you should specify path to SSH config - you cannot just put SSH configuration options to NetXMS agent config. So in nxagentd.conf you should have something like


[SSH]
ConfigFile = /etc/nxagentd-ssh-config


and in file /etc/nxagentd-ssh-config


HostKeyAlgorithms +ssh-rsa


Best regards,
Victor
#795
Looks like router supports only ssh-dss and ssh-rsa as host key algorithms and they are not offered by client. You may try to add

HostKeyAlgorithms +ssh-rsa

to your .ssh/config file, or create separate config file for SSH subagent with that line and specify it in nxagentd.conf by adding

ConfigFile = path_to_config

in section [SSH].

Best regards,
Victor