Force a Notification to be sent?
Force a Notification to be sent?
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
Re: Force a Notification to be sent?
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.
Re: Force a Notification to be sent?
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.
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.
Re: Force a Notification to be sent?
thanks, that would be a huge help. I can I have setup a custom check time, so it only checks at 9 and 4.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.
Re: Force a Notification to be sent?
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?
Re: Force a Notification to be sent?
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.
Re: Force a Notification to be sent?
We'll I was able to get something to work. Thanks for the insight.
Re: Force a Notification to be sent?
Glad you got it working!