Page 1 of 1

This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 12:07 pm
by snapon_admin
Why is this comment added, or rather re-added to a host several times when downtime is scheduled? We're using Troy's history tab component and the tab can sometimes be clogged with this message over and over and over because it is apparently re-added to the host several times. In this example the downtime was entered on 05-01-2015 (when we were notified by our provider of the maintenance) but isn't actually scheduled until 05-30-2015. The canned comment seems to be re-added several times, at random intervals and makes using the history tab....difficult:
downtimewtf.png

Re: This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 12:31 pm
by jolson
Are these messages definitely appearing at random intervals, or is this something that you can reproduce?

There definitely isn't a pattern, so I'm wondering if viewing the host causes the downtime comment to be added to your history.

Re: This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 1:10 pm
by snapon_admin
Could be. I'll try some things and see if I can reproduce an action that causes them and let you know. My first guesses were maybe config applies or viewing the host so I'll start there and see what I come up with.

Re: This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 1:38 pm
by snapon_admin
It's every time a config is applied, just did it twice and both times the comment was re-added.

Re: This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 1:40 pm
by abrist
Or you could also have some automation (script, event handler, etc) that is submitting this comment. Can you check the event log for any submitted comments or downtime resembling this? We may be able to see where it originated from.

Re: This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 1:48 pm
by snapon_admin
Don't have any event handler's that I know of (and I'm the only Nagios admin) so I don't think that's it. It does happen every time I apply a config, though. I'll take a look at the long in a sec here and post it, troubleshooting a separate issue atm.

Re: This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 2:28 pm
by snapon_admin
This actually looks like it's happening with all persistent comments. This is the history tab after I applied a few comments. All of these times are when I applied a new config in CCM.
downtimewtf.png
Don't see anything in the event log that looks like it has anything to do with it.

Re: This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 4:29 pm
by lmiltchev
I was able to recreate the issue and will be discussing it with Troy. I believe it is a bug, but will need to hear from Troy.

Re: This host has been scheduled for fixed downtime comment

Posted: Wed May 20, 2015 8:07 pm
by Box293
Nice spotting.

I have identified this behaviour occurs whenever the Nagios process starts. If there are scheduled downtimes in the future they get re-added to the nagios_commenthistory table in the nagios database, regardless if they already exist.

I have updated the History Tab component so it does not display these duplicate messages.

https://exchange.nagios.org/directory/A ... ab/details

If you have a minute please rate/review the History Tab component on the Nagios Exchange (if you've not already done this in the past)

Re: This host has been scheduled for fixed downtime comment

Posted: Thu May 21, 2015 8:00 am
by snapon_admin
Perfect, that looks great! Thanks a lot guys. Gave you a 5 star and a comment Troy, thanks for all your help!