Issue with execution of Actions

Started by jdl, November 09, 2010, 12:52:16 PM

Previous topic - Next topic

jdl

Hi,

It seems I have some problems to get my "Actions" executed.
I'm currently running server 1.0.6 with agent 1.0.6 on this server. Another node is running agent 1.0.4.

A simple action is defined in both nodes config file:
Server node:
SubAgent = /usr/local/netxms/lib/libnsm_linux.so
Action = testjd:touch jdtest.txt

Agent node:
SubAgent = /opt/netxms/lib/libnsm_linux.so
Action = testjd:touch jdtest.txt

SubAgent = /opt/netxms/lib/libnsm_logwatch.so
*LOGWATCH
Parser = /home/netxms/Parsers/Parsing_my_log.xml

Both agents show in logs that action is expanded and executed. But when listing the files in directory there is simply no file.
Action is triggered from an event which is triggered by a valid parsing of some text in the log file.

Action is defined to be executed on remote agent with name of remote agent given.
Even when I exchange the action config for executing it on server or remote agent with server name inserted, nothing happens.

There is no error in log files except the one related to DRBD... ???:
...
[09-Nov-2010 11:51:12] ParseIoStat(): new device added (name=dm-1 isRealDevice=1)
[09-Nov-2010 11:51:12] Unable to parse /proc/drbd, DRBD data collector will not start
[09-Nov-2010 11:51:12] Subagent "/opt/netxms/lib/libnsm_linux.so" loaded successfully
[09-Nov-2010 11:51:12] Subagent "Linux" already loaded from module "/opt/netxms/lib/libnsm_linux.so"
[09-Nov-2010 11:51:12] LogWatch: registered parser for file /home/daks/n2p_out.txt, trace level set to 0
[09-Nov-2010 11:51:12] LogParser: parser thread for file "/home/daks/n2p_out.txt" started
[09-Nov-2010 11:51:12] LogParser: file "/home/daks/n2p_out.txt" successfully opened
[09-Nov-2010 11:51:12] Subagent "/opt/netxms/lib/libnsm_logwatch.so" loaded successfully
[09-Nov-2010 11:51:13] Trying to bind on 0.0.0.0:4700
[09-Nov-2010 11:51:13] Listening on socket 0.0.0.0:4700

Thanks for any support.
Br,

Jdamien

jdl

Seems like you have to put the full path of the command... i.e. not "touch" but "/bin/touch".
Now working on agent with action performed on agent.

Br,

Jdamien

jdl

Well I'm lost... it is working now... Nothing really different - just working!!

Could it be that once you change config on server you might have to wait for a while before it becomes active?
JDamien

Victor Kirhenshtein

Agent reload config on restart - so if change agent's config, you have to restart it. Maybe you just press "Save" instead of "Save & Apply" after first change?

Best regards,
Victor