Icmp.Ping in Hook::EventProcessor

Started by blingblouw, February 12, 2020, 10:31:43 AM

Previous topic - Next topic

blingblouw

Hi.

I have 2 questions and would like to find out if it's possible.

1) Can I use Icmp.Ping inside of EvenProcessor Hook?

I have tried to use

AgentReadParameter(server, "Icmp.Ping(" . IP . ")");

and

Icmp.Ping(IP);

However both return null?

2) The other question I have is, NetXMS SYS_NODE_DOWN event can I alter that inside of the EventProcessor?

Basically the issue I have is that in the event of major power loss or link loss, all my end sites show "down" on NetXMS, this makes it pretty difficult to figure out what is the route cause of the downtime.

What I am hoping to do is, when a down event is happening on a node, check its default route (which I currently have stored as a custom attribute per node), try and ping that, if it is down, do not continue with the event OR even better, change the event type to something else so that I can have a view on what is "down" but in a more critical state, view what is the cause of the downtime?