1

I've got the whole Nagios configured, it's working for a while now with many many hosts and everything is OK, except the one thing I've discovered. When I schedule a downtime for a host, it's sending notifications anyway. Is it some kind of a bug? What should I check/change please?

EDIT 1:
Nagios version: 3.4.1
Notification info:

***** Nagios *****

Notification Type: PROBLEM
Host: XXXX
State: DOWN
Address: xx.xx.xx.xx
Info: PING CRITICAL - Packet loss = 100%

Date/Time: Mon Jul 8 14:56:15 CEST 2013
Jakub Turcovsky
  • 297
  • 1
  • 4
  • 11

2 Answers2

2

You need to thoroughly look at your configuration and your logs - I have never seen Nagios ignoring a scheduled downtime.

Note that there is a bug which might be related here, and is fixed in versions > 3.4.1.

Roman
  • 3,907
  • 3
  • 21
  • 34
  • In my other 3 versions of Nagios there wasn't any problem with this. I found nothing about scheduling downtime in my nagios.cfg file and I don't know where else to look, what else to check. – Jakub Turcovsky Jul 09 '13 at 09:34
  • My version is 3.4.1, so the bug could imho still be there. Do you think I should use the patch? I really don't like to mess with nagios core if there is other option, but if there isn't... – Jakub Turcovsky Jul 09 '13 at 09:36
  • 1
    I have seen notifications during downtime, too. But as Roman says, it came down to user-caused reasons *every time*. – Karma Fusebox Jul 09 '13 at 10:08
  • No, don't patch. Unless you know what it does, and you really, really need it. – Roman Jul 09 '13 at 10:10
  • @Roman: I really, really need to get downtime working. But the patch is the only mention about it. – Jakub Turcovsky Jul 09 '13 at 10:14
  • You do realize that this patch only makes sure that Nagios won't forget about your downtimes when restarting the service? If you have to restart Nagios *that much*, I'm tempted to say you're doing something wrong. – Roman Jul 09 '13 at 10:22
  • http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg38435.html I've found this discussion about similar problem I have and there is also mentioned this patch. I haven't tried restarting Nagios and check if there are saved downtimes, maybe I have this problem too, but if it helps me with my problem and if nobody can't tell me what else to do... – Jakub Turcovsky Jul 09 '13 at 10:40
2

I have found the solution ! Go to your template.cfg file and change in the contact part :

FROM :

service_notification_options    w,u,c,r,f,s      ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options       d,u,r,f,s      ; send notifications for all host states, flapping events, and scheduled downtime events

TO :

service_notification_options    w,u,c,r,f      ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options       d,u,r,f      ; send notifications for all host states, flapping events, and scheduled downtime events

Remove the "s" there remove the mail notification from nagios for scheduled downtime event.

  • This is few years old and I don't have Nagios anymore so I cannot verify your answer. But if you get enough upvotes from the community, I'm going to accept your answer as correct. – Jakub Turcovsky Jul 11 '16 at 11:19