cURL command from server

Started by chris.petree, August 23, 2019, 08:55:58 PM

Previous topic - Next topic

chris.petree

From the NetXMS server I'm monitoring a node using both standard SNMP OIDs as well as proprietary SNMP OIDs and through some of the proprietary OIDs I can see a critical outage with the node still being online. The node I am monitoring does not have an operating system where I could install anything or even run an automated script. I could put in a secondary device next to the node that I could send a cURL command to which could run a script from there. So I was wondering if anyone had an idea of a way to launch a bash script or send a cURL command based on an event in NetXMS.

Tursiops

You can create an Action on your server which can call a command on your server (or a remote node). The action itself can be triggered through an Event Processing Policy for the Event in question.
The commands on an agent can be defined the "Action" parameter in the agent configuration file. You can pass parameters to those actions as well.
I assume that's what you're looking for?

chris.petree

Hey,
Thanks for the quick response. I ended up having a child right after I posted that. So I was out for a little bit getting him and his mom settled in.
Anyway, that SEEMS to work. Just got to do some adjusting. I was wondering though, which directory is that command fired from? If it's on a Windows machine would it be launched from the NetXMS\bin folder? C:\NetXMS\bin

Tursiops

We are running on Linux and we are not actually using Actions in this particular way, so can't confirm the path myself.
If the service is running as SYSTEM, I'd guess that you might end up in C:\Windows\System32 by default, so I'd probably try full path first?

chris.petree

Hey.
Just FYI, I put the executable in the System32 folder and it executed. This inquiry is resolved. Thanks!