2 Answers
2

As you suggest, Nagios lets you configure time periods which you can then apply to the checks, the notifications, the notifcation groups and individual users. Of course if you specify that the checks are to take place but no notification sent, then you won't see the problem in your email but you can look at the complete alert history at any time in the Nagios web pages. Why not schedule a cron job to email you the overnight alerts first thing in the morning? e.g.

(this would display up to 1000 hard states detected in the last24hours)

OTOH you could set up a different notification script to run for the notifications you want to defer and simply place them in a queue to be sent later (e.g. using 'at').

Or you could set up the MTA to process its outgoing mailq only at specific intervals - combined with different email addresses / different subjects then you can effectively prioritise/defer mail based on the recipient / subject / time of day.

I am not sure if nagios doesn't do this per default. You would just need to reverse your notification timeperiod so it just includes working hours instead of non-working hours.

It's easy to test this: Just define yourself a check that fails per default, an accordingly set notification time period, beginning a few minutes after the current time and see if you get messages only when in this period.

Should this not work, you could try to toy around with escalation schemes, sending out mails in the night and sms during your working hours period, with the help of the escalation_period statement.