NetXMS Support Forum

English Support => General Support => Topic started by: Tursiops on February 02, 2016, 07:21:46 AM

Title: DCIs, Events and ActionShellExec
Post by: Tursiops on February 02, 2016, 07:21:46 AM
Hi,

I am trying to run an action on a Windows NetXMS agent when a certain condition is triggered.

So far this is what I've done:
- added an ActionShellExec into the agent's configuration file and ran a configuration poll. This action does not require any parameters.
- added an Action that calls the ActionShellExec
- created an Event which I intend to only use for this particular issue
- create an Event Processing Policy which triggers an alarm and executes the above action if the event above is triggered
- added a DCI that can trigger the previously configured Event

Unfortunately this doesn't work as expected. I receive an alarm, but the action itself just doesn't seem to happen.
My guess is that I have the "Remote host" part of the Action wrong. Should that be "%n" (which is what I used - I also tried "%g")?

To see if I stuffed up the Action itself, I added it to the Object Tools and called it on my test system.
The result is that the Action is called and works just fine.

Thanks for any pointers.
Title: Re: DCIs, Events and ActionShellExec
Post by: Tursiops on February 04, 2016, 01:14:23 PM
I had another search around and it seems what I did should work.
An older post suggested using %a (the node's IP) to trigger the action.
Doesn't work for me either.

Now I am starting to wonder if that is due to the node connecting via a NetXMS Proxy agent? There is no direct connection straight from the server to the node.
And to top it off, I'm using zoning. So just passing an IP will likely not work if I can't pass the zone as well.
What macro should I use that actually triggers the action on the right node? I'm lost on this one.
Title: Re: DCIs, Events and ActionShellExec
Post by: Victor Kirhenshtein on February 04, 2016, 09:01:43 PM
Hi,

currently action execution requires direct connection to agent (when zoning was implemented we just forgot about that). I've added it as feature request (https://dev.raden.solutions/issues/1154 (https://dev.raden.solutions/issues/1154)).

Best regards,
Victor