NetXMS Support Forum

English Support => General Support => Topic started by: pdelvaglio on March 11, 2016, 06:48:44 PM

Title: Sending Multiple Emails
Post by: pdelvaglio on March 11, 2016, 06:48:44 PM
We are trying to setup a configuration where if any of our nodes are down it will send an email at first poll and then at 5 minutes if it is still down and then at 20 minutes if it is still down.  We only care about icmp at this point.

Can this be setup globally so each node doesn't have to be configured individually?

Any help is appreciated.

Thanks.
Title: Re: Sending Multiple Emails
Post by: pdelvaglio on March 16, 2016, 07:19:17 PM
From reviewing other forum posts it seems like I need to:

1. Create a custom event such as "NODE_STILL_DOWN"
2. Create a server script that runs nxevent calling NODE_STILL_DOWN.
3. Add an action to "SYS_NODE_DOWN" that runs the above server script.
4. Create a processing policy rule for NODE_STILL_DOWN that has a filter checking for 5 and 20 minute poll intervals.


Is this the best way to do this?

If so,  how can I call nxevent from a server script? (I haven't seen any examples.  I am using Windows NetXMS).  nxevent.exe is in C:\NetXMS\bin on the server.

Thanks for any help.
Title: Re: Sending Multiple Emails
Post by: Victor Kirhenshtein on March 21, 2016, 04:04:44 PM
Hi,

if you are running server scripts (NXSL), you can use PostEvent function: https://wiki.netxms.org/wiki/NXSL:PostEvent (https://wiki.netxms.org/wiki/NXSL:PostEvent)

Another possible option is to set node's custom attribute in reaction for SYS_NODE_DOWN and create status poll hook script, which will check if node is down for certain amount of time and use PostEvent function to generate another event.

Best regards,
Victor
Title: Re: Sending Multiple Emails
Post by: pdelvaglio on March 22, 2016, 10:25:31 PM
Thank you. Your status poll hook script suggestion works great.