News:

We really need your input in this questionnaire

Main Menu
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

#481
Yes, threshold script is a better place for this.

If you open hint in editor of threshold script, you'll see:
$1 current DCI value;
$2 threshold value;
$dci this DCI object;
$isCluster true if DCI is on cluster;
$node current node object (null if DCI is not on the node);
$object current object.

So you can use $1 instead of GetDCIValueByDescription($node, dciDescription);, this would give you current value of the DCI.

GetDCIValueByDescription() actually gets previously collected value, when server starts, values for frequently collected DCIs are not cached from database to memory, that's would explain script error.
#482
Hi!

Yes, absolutely. You just need to make your data collection items (DCIs) in a template. The you would apply the template to the node (you can select container when applying, in this case template would be applied to all nodes under that container).

It's also possible to automate template application - you can check in out-of-the-box templates, e.g. Operating Systems -> Windows - in properties of it there's Automatic Apply Rules.


Also, we've recently published a half-hour long recording of NetXMS Demo session - this might be helpful to see what are the capabilities of the system:
https://www.youtube.com/watch?v=QhHznyOXEFk
#483
There are agent metrics for that, e.g.
File.Time.Modify(/etc/passwd)

https://www.netxms.org/documentation/adminguide/appendix.html#file-time-modify

Metric would return unix time.


First thing is to create Data Collection Item on a node with that metric.

Then you can add threshold, if you need a notification when modification time changes, you can use function "Diff with previous value", operation "!= : not equal to".

Then rule in event processing policy is needed, we can discuss this later on.
#484
General Support / Re: A little help with Maps
January 09, 2024, 05:16:58 PM
Hi!

In properties of map object on Map Appearance tab there's Drill-down object field where you can select the dashboard.
This setting is saved in node's (or other object properties), so if node is placed to another map this setting there will be same.
#485
General Support / Re: Persistent Storage
December 29, 2023, 08:14:52 PM
Few thousands should not cause any problems. 

The other options could be to use custom attributes on corresponding nodes - this is a bit cleaner solutions, as when a node is deleted, custom attributes are deleted as well, while persistent storage might still have some remaining entries. If you go that way, it's better to use custom attributes with names starting from $ sign - it's a new feature added in 4.5.0 - these custom attributes are not being sent to GUI client.

You may want to keep several comma-separated timestamps in one persistent storage entry or custom attribute. It's convenient to do this by converting comma-separated values to array and back, e.g.:
s = "123,456,789";

a = s->split(",");
println(a);

s = ArrayToString(a, ",");
println(s);


P.S. There's a trick to temporarily change polling interval for a node - you script can add custom attribute named
SysConfig:Objects.ConfigurationPollingInterval
with new value of polling interval. More info here: https://www.netxms.org/documentation/adminguide/concepts.html#polling
#486
General Support / Re: error on export db
December 29, 2023, 07:09:11 PM
This can be accomplished by copying only one row to a temporary table:

create temp table saved as select * from config where var_name = 'DBConnectionPool.MaxLifetime' limit 1;

delete from config where var_name = 'DBConnectionPool.MaxLifetime';

insert into config select * from saved;
#487
General Support / Re: error on export db
December 29, 2023, 04:16:17 PM
Ok, and if you connect to your DB using postgres tools and run
select * from config where var_name = 'DBConnectionPool.MaxLifetime';

how many lines this query will produce?
#488
General Support / Re: error on export db
December 29, 2023, 03:20:38 PM
So how many entries are there in Configuration->Server Configuration ?
#489
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?
#490
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?
#491
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
#492
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.
#493
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.
#494
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
#495
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.