6

I'm monitoring an application which starts just before business hours and shuts down at the end of the day using Nagios 4.3. I've configured the notification period for it to start 3 minutes after the application is slated to launch. I would like Nagios to send an OK alert if it finds the application in good state at the beginning of the notification period. How would you suggest doing this?

Altenatively, I'd like to receive a notification that Nagios itself is alive and well at the beginning of the notification period, so that I know that it is monitoring my application and capable of alerting if anything goes wrong.

Note that at the beginning of the business day, the OK state for the application would be very recent, so a solution could take advantage of this fact (e.g. notify of changes in the preceding 5 minutes).

1 Answer 1

4

Looks to me like a perfect opportunity to have cron schedule a custom service notification, which is basically a gratuitous notification describing the current state of affairs. You can do this through the external command interface, with eg

echo "[1495974284] SEND_CUSTOM_SVC_NOTIFICATION;hostname;service name;0;username;Comment eg morning notification" > /var/nagios/rw/nagios.cmd

Documentation on this external command can be found here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .