AgentExecuteAction
-
Hello,
I am trying to use the NXSL command "AgentExecuteAction".
In the configuration file of my agent, I have placed:
ExternalParameter = Test:echo test > /tmp/test.txtThis works very well on the command line:
/opt/netxms/bin/nxget localhost 'Test # more /tmp/test.txt testSo, I made a very small script ;):
AgentExecuteAction($node, "Test");I execute it...
I can see the action in debug mode:** code=0x0043 (CMD_ACTION) version=5 flags=0x0000 id=4 size=56 numFields=3 ** 000000: [ 87] UTF8-STRING "Test" ** 000010: [ 482] INT16 0 ** 000018: [ 88] INT32 0 2021.06.07 16:22:52.231 *D* [comm.cs.4 ] Received message CMD_ACTION (4) 2021.06.07 16:22:52.231 *D* [actions ] ExecuteAction(Test): requestId=4, RCC=404 2021.06.07 16:22:52.231 *D* [comm.cs.4 ] Sending message CMD_REQUEST_COMPLETED (ID 4; size 32; uncompressed) 2021.06.07 16:22:52.231 *D* [comm.cs.4 ] Outgoing message dump: ** 000000 | 00 1D 50 00 00 00 00 20 00 00 00 04 00 00 00 01 | ..P.... ........ ** 000010 | 00 00 00 1C 00 00 00 00 00 00 01 94 00 00 00 00 | ................ ** code=0x001D (CMD_REQUEST_COMPLETED) version=5 flags=0x0000 id=4 size=32 numFields=1 ** 000000: [ 28] INT32 404 2021.06.07 16:22:52.231 *D* [comm.cs.4 ] Communication channel closed by peer 2021.06.07 16:22:52.231 *D* [comm.cs.4 ] Session with 129.20.128.4 closed 2021.06.07 16:22:52.231 *D* [comm.cs.4 ] Session unregistered 2021.06.07 16:22:52.231 *D* [comm.cs.4 ] Receiver thread stoppedbut it doesn't work ...
Is it a syntax problem?
A Parameter problem?Thanks
BB -
There are two things that can be configured on agent:
- ExternalParameter (gets executed when server or nxget is requesting the value from agent. Or with AgentReadParameter() from NXSL)
- ExternalAction (gets executed by nxaction, server action (e.g. from EPP rule) or NXSL AgentExecuteAction
-
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