Action - execute on management server - help

Started by mewmi, February 01, 2010, 09:49:13 PM

Previous topic - Next topic

mewmi

I am trying to run an external program (.bat or .exe file) whenever a threshold is reached.

I added an Actions Configuration called MyAction of type 'Execute command on management server'
Question 1: What should be entered under 'Command'

I set one of my thresholds, and I configured my event processing policy's Action to MyAction

Going over the example provided in https://www.netxms.org/forum/index.php/topic,204.0.html
I edited the netxmsd.conf in C:\NetXMS\etc\ to include
Action = MyAction:test.bat
Question 2: Where (in which folder/path) should test.bat be located to be succesfully called.

So far, the .bat file is still not running whenever the threshold is reached.

Any help is appreciated.

Victor Kirhenshtein

Hello!

To run command on management server itself, you don't need to change server's configuration file. You just need to specify your executable under "Command". If you wish to run .bat or .cmd file, you may need to use form of

cmd.exe /C <your_cmd>

Executable can be located anywhere, but if it is not in system PATH, you should add full path to it when defining action.

Best regards,
Victor

mewmi

Thanks for the reply. I managed to get it working.

However, i am confused as to the example provided then. In what case would i need to edit the conf files to include those Actions?

Victor Kirhenshtein

You have to edit conf files if you wish to execute commands remotely via NetXMS agent. In that case you should add appropriate Action entries in agent configuration files.

Best regards,
Victor