Agent's action will be ignored [SOLVED]
-
Hi there, after hours of googling I hope to get help here.
I just want to execute a command on the agent's computer, but it still ignores it.- I successfully configured an alarm with somehow action (send an E-mail).
- I additionally configured an Agent's action named 'shutthisdown' and configured it to the same alarm, which sends the email.
- examined the log file, but I can not find an entry about any command to execute.
Only wevtapi.dll was not found.
Here is the Agent config file:
--8<--
#
# NetXMS agent configuration file
# Created by agent installer at Tue Jun 25 10:47:56 2013
#DebugLevel = 9
Controlservers = netxms.lorenz-messtechnik.local
MasterServers = netxms.lorenz-messtechnik.local
ConfigIncludeDir = C:\NetXMS\etc\nxagentd.conf.d
#LogFile = {syslog}
LogFile = C:\NetXMS\debuglog.txt
FileStore = C:\NetXMS\var
SubAgent = ecs.nsm
SubAgent = ping.nsm
SubAgent = logwatch.nsm
SubAgent = portcheck.nsm
SubAgent = winperf.nsm
# Action= shutthisdown:cmd.exe /c "shutdown /s /t 180 /f"
Action= shutthisdown:cmd.exe /c "dir c:\ > c:\1.txt"
SubAgent = wmi.nsm
SubAgent = ups.nsm# UPS subagent configuration section
*UPS
Device = 0:"COM2:":APC
-->8--Many thanks for your help
Martin
-
-
Can you please show the screenshots of action configuration on server and appropriate event policy rule? Also, can you try to execute action manually with nxaction command line tool?
Best regards,
Victor -
Hi Victor,
action definition and processing rules are attached.
I defined two actions in this processing rule. The mail as second action will be sent as expected.
The shutdown initiated with the shutdown button of the Object Details View of the client works as expected, too.
nxaction command line tool executes the action correctly (as expected).
Thank you for your help.
Best Regards
Martin


-
Hi!
You have an error in action configuration - you have to specify remote host where to execute an action. Usually you can use macro %a here to execute it on event source.
Best regards,
Victor -
Hi,
I now tried different versions of the Agent's action line.%a shutthisdown
<name_of_machine> shutthisdown
<IP-Address> shutthisdown
nxaction <name_of_machine> shutthisdownI assumed that "Agent's action" means of course the agent that initiates the action.
Can you please give me an example for a line that executes a command on the agent that causes the action (maybe with %a or %n)? The penny has not dropped yet.
Thank you for your help.
Best Regards
Martin -
Hi!
You should put %a in "Remote Host" field and shutthisdown in "Agent action" field.
Best regards,
Victor -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login