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 - Filipp Sudanov

#571
General Support / Re: error on export db
December 29, 2023, 03:20:38 PM
So how many entries are there in Configuration->Server Configuration ?
#572
General Support / Re: error on export db
December 29, 2023, 10:50:11 AM
If you open Configuration->Server Configuration in management client and search for 
DBConnectionPool.MaxLifetime

 how many entries with such name are there? If two, delete one of them. 

What DB are you using, what is NetXMS version?
#573
General Support / Re: Persistent Storage
December 29, 2023, 12:08:00 AM
It's stored in the DB, key max len is 255 and value len 2000.
https://www.netxms.org/documentation/datadictionary-latest/#t-persistent-storage

I will check, if data are cached in memory of server proceess.
How much data do you want to store there?
#574
General Support / Re: JVM Monitoring
December 22, 2023, 08:37:53 PM
Some info over the Internet suggests that jboss-cli-client.jar is better then then jboss-client.jar, so you may try removing C:\NetXMS\lib\java\jboss-client.jar; part from your classpath
#575
General Support / Re: BUG - Uptime unit in DCI
December 22, 2023, 03:04:11 PM
Hi,

this was fixed, fix will be in 4.5 release that is expected in a few days.
#576
General Support / Re: New Client - Pinboard
December 21, 2023, 01:51:14 PM
View state saving is planned for 5.0 which should be out in January. Rearranging items might require some work, so could be expected somewhere later.
#577
General Support / Re: emailing action variables
December 18, 2023, 06:50:05 PM
Make sure you've copied all lines of second script - last line should be "return r;"

Try executing this script on any node - right-click a node in object tree, select "Execute script". Paste the script into "Source" and click "Execute" button. In the output it should print, e.g.:


*** FINISHED ***

Result: Infrastructure Services
#578
General Support / Re: emailing action variables
December 17, 2023, 02:27:47 PM
Hi,

there is %[script_name] macro, that calls a script from script library. This way you can prepare any text that will go into your notifications.
When developing scripts, it's easier to open "Execute script" from context menu of any node. In this case script will be running in context of that node (special variables like $object or $node will be pointing to that specific node). So if you try below script on any node:
sub getParents(o, path) {
  if (o->id == 2) {  // Infrastructure services
    println(path);
  }
  for (p : o->parents) {
    if (path == "") {
      getParents(p, p->name);
    }
    else
    {
      getParents(p, p->name . " > " . path);
    }
  }
}
getParents($object, "");

In will print paths from "Infrastructure services" to that node. The problem is, that a node can be located under several container paths (it's actually a cool feature, as you can arrange your nodes in various ways, e.g. by location, by OS, or you may have a container with nodes that have specific software, require upgrade or attention, etc).
If there are several possible paths, scrip can just print first that it finds, or you can have some ways to instruct the script what path to take, e.g. you can have a custom attribute on some container under "Infrastructure services" and script will be taking only paths that contain that container.

Now we just need to modify above script to return the value instead of printing it:
global r = "";
sub getParents(o, path) {
  if (o->id == 2 and r == "") {  // Infrastructure services
    r = path;
  }
  for (p : o->parents) {
    if (path == "") {
      getParents(p, p->name);
    }
    else
    {
      getParents(p, p->name . " > " . path);
    }
  }
}
getParents($object, "");
return r;

and this is the script that you have to save into script library. It will return first found path.
#579
General Support / Re: BUG - Object Tools (Access Control)
December 15, 2023, 08:39:07 AM
Hi!

This was just fixed, fix will be available in next release.
#580
The problem is that single quotes are get lost somewhere during all this process. You can specify using "" which will be escaped to " in the end, e.g.:
ExternalMetric=RegQuery.EBTransfer720:""D:\Program
 Files\NetXMS\custom\CheckRegKey\CheckRegKey.exe""
"HKLM\SOFTWARE\WOW6432Node\Aucotec\Engineering Base\7.2.0\Server\Files"
"ImageFilePath"

But better way is to use new (and not yet documented) docker-style syntax:
ExternalMetric=RegQuery.EBTransfer720:['D:\Program
 Files\NetXMS\custom\CheckRegKey\CheckRegKey.exe', 
'HKLM\SOFTWARE\WOW6432Node\Aucotec\Engineering Base\7.2.0\Server\Files', 
'ImageFilePath']

currently that works with single quotes (') only, but in next patch release double quotes (") will also be supported.
#581
General Support / Re: RPM build for Fedora 39?
December 12, 2023, 10:55:07 AM
FC39 rpms were just released for amd64 and arm64
#582
Ah, right, # is treated as beginning of comment. You can specify password in double quotes (" "), then it can contain # character.
I'm glad that it worked.
#583
General Support / Re: JVM Monitoring
December 11, 2023, 05:01:51 PM
Java subagent has a few configuration parameters that can be provided in [JAVA] section of agent configuration file. See the code for list of params:
https://github.com/netxms/netxms/blob/master/src/agent/subagents/java/main.cpp#L131

As I understand, you can use "ClassPath" parameter to add your .jar file.
#584
current xml parsing code does not support this. In the future we will consider adding xms parsing library (same as we now have jq to parse json format). You can follow this ticket: https://track.radensolutions.com/issue/NX-2485

Currently you can enable "Process response as plain text" in properties of the web service and use a regex instead of path to get the value
#585
General Support / Re: JVM Monitoring
December 08, 2023, 01:10:54 PM
I've use this stackoverflow post: https://stackoverflow.com/questions/5552960/how-to-connect-to-a-java-program-on-localhost-jvm-using-jmx

For test I just use NetXMS management client:
java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=1234 -Dcom.sun.management.jmxremote.ssl=false -jar ~/Downloads/nxmc-4.4.4-standalone.jar
Agent config has this:
Server=s:service:jmx:rmi:///jndi/rmi://127.0.0.1:1234/jmxrmi
On debug level 6 agent produces the following output in it's log:

2023.12.08 13:09:14.786 *D* [comm.cs.68        ] Requesting metric "JMX.VM.Version(s)"
2023.12.08 13:09:14.917 *D* [                  ] JMX: connected to service:jmx:rmi:///jndi/rmi://127.0.0.1:1234/jmxrmi
2023.12.08 13:09:14.919 *D* [                  ] JMX: reading object java.lang:type=Runtime attribute VmVersion

I have no clue what all these things in the url mean, but hope that helps

Also, here's Oracle docs on the URL: https://docs.oracle.com/javase/8/docs/api/javax/management/remote/JMXServiceURL.html