Force a Notification to be sent?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Force a Notification to be sent?

Post by QS1 »

Is it possible to force a notification to be sent for a host check, even if it's up or down? I am trying to schedule a check at 9am and 4pm everyday, and wanted a check to be sent at that time regardless of the status. Thanks
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Force a Notification to be sent?

Post by mguthrie »

I'm sure it can be done, I know you can force a notification manually for a service by selecting it's Details->Advanced (tab)->Send Custom Notification. This lets you force a notification and ignore the regular logic. As far as doing this on a regular basis, I don't think there's a regular tool for it, but I'm pretty sure it could be done somehow. I'll do some snooping on this and see what I can figure out.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Force a Notification to be sent?

Post by mguthrie »

There are a couple of options of how this could be done (all theoretical since I haven't done any of these myself).

You could define a custom event handler for a check, and define the time periods for this check to be the hours you want to receive these notifications. This could potentially get more complicated than what you need though.

You could write a simple shell script that either runs as a cron job or as a check plugin that simply executes the service check that you need and emails the result to the address you specify. This depends on your comfort level with scripting.

Ideally you just need something to run the "custom notification command" from the web interface during the times that you need it, although I haven't figured out a way to do that just yet. Let me know if any of those are helpful at all.
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Re: Force a Notification to be sent?

Post by QS1 »

mguthrie wrote:I'm sure it can be done, I know you can force a notification manually for a service by selecting it's Details->Advanced (tab)->Send Custom Notification. This lets you force a notification and ignore the regular logic. As far as doing this on a regular basis, I don't think there's a regular tool for it, but I'm pretty sure it could be done somehow. I'll do some snooping on this and see what I can figure out.
thanks, that would be a huge help. I can I have setup a custom check time, so it only checks at 9 and 4.
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Re: Force a Notification to be sent?

Post by QS1 »

Is there anything I can do with the initial state? Maybe set it to down , so when the check runs it sees it as Up then sends out a Notification?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Force a Notification to be sent?

Post by mguthrie »

To be honest I haven't tried that, but I'd say try it and see what it does. It may only set the initial state to "down" before the first check is run, but it's worth checking out.
QS1
Posts: 195
Joined: Tue Sep 21, 2010 3:30 pm

Re: Force a Notification to be sent?

Post by QS1 »

We'll I was able to get something to work. Thanks for the insight.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Force a Notification to be sent?

Post by mguthrie »

Glad you got it working!
Locked