12

I have a Nagios 3.5.1 monitor up for a bunch of servers. In doing an action like a Drupal or Wordpress core upgrade, I down the sites and set Nagios to scheduled outage.

Sometimes I finish in under the 2 hour default and don't want to ignore an outage. How do I tell Nagios that I'm done and to cancel the scheduled downtime?

enter image description here enter image description here

19

In the left hand column of the Nagios interface (underneath "System") pick "Downtime". That takes you to a page listing all scheduled downtime and lets you delete them individually.

2

Along the left-hand side, under "System", there's a "Downtime" link; it goes to /cgi-bin/extinfo.cgi?type=6. Once there, click the trash can icon for the downtime in question.

Coincidentally, you may wish to investigate the difference between "scheduled" and "flexible" downtime, or better yet, given your use-case here, an "acknowledgement" sounds like what you really wanted in the first place.

  • If you are keeping track of downtime, an acknowledgement will affect the reports differently than scheduled downtime, so since this really is scheduled downtime, that is the more appropriate action. – lsd Dec 2 '14 at 20:14
  • Fair point. Deleting a downtime, however, has a far larger effect on reports, no? – BMDan Dec 3 '14 at 20:39
  • The documentation implies that it only ends the downtime earlier than the originally scheduled end, but that the downtime still stays for reporting. "If the downtime is currently in effect, the service will come out of scheduled downtime". – lsd Dec 4 '14 at 14:05
  • Looking further, more documentation says that reporting doesn't count scheduled downtime unless you also disable checks. Well. – lsd Dec 4 '14 at 14:07
0

I have sucessfully deleted/canceled "downtime id" from 251 to 348 on my Centos server with this command:

for i in `seq 251 348`; do 
  /bin/printf "[%lu] DEL_SVC_DOWNTIME;$i\n" `date +%s` > /var/spool/nagios/cmd/nagios.cmd; 
done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.