Custom command on Node

Started by Kolesar, September 14, 2016, 11:48:02 AM

Previous topic - Next topic

Kolesar

Dear All,

I using The Dude and I want to replace it with NetXMS. For now, I'm in investigation phase, so I want to learn as much as possible about NetXMS before migrate to NetXMS.
For now, I have a question, how can I check system update status on Node.

In documentation I have found ExternalParametersProvider for run command on Node, but I do not understand what I should do after add this parameter in configuration file. I tried restart node, but on my Management I do not see any changes.
I tried to add Action in Object Tools for manual checking (but I need automatic/periodically), but It does not work. I tried to add any command, but without success.

I testing commands on Linux Nodes, and second question is, how can I check system update on Windows too, or run any custom command on Node?

Kolesar

After googling again and testing I have found command:
Action

And now I know how to add Action in config file, for example:
Action=CheckSystemUpdate:yum updateinfo list --sec-severity=Critical | grep Critical | wc -l

After this, I made Object Tools->Add new Action (Type: Agent Command) with parameters:
Agent's command: CheckSystemUpdate

When I run this command manually (right click on Node->Tools->...) I get results, but I want to run this command periodically and add trigger for this. How can I do that?

tomaskir

Actions are for, well, running actions on nodes. This means they are one-time things, initiated by you.

What you want is ExternalParameter and ExternalParameterProvider.
These can be used to execute arbitrary commands on the OS, and their results will be presented as an NetXMS Agent Parameter, which you can use in a DCI.

There is a good debate on ExternalParameter here:
https://www.netxms.org/forum/configuration/agent-config-(action-externalparam)/msg3136/#msg3136

You can see an example of how to use an ExternalParameterProvider here:
https://wiki.netxms.org/wiki/Bind9

tomaskir