Page 1 of 1
Downtime and comment history tables are empty
Posted: Fri Oct 18, 2024 6:47 am
by PeterDK2
Hello,
today I tried to search for a downtime history for a host, but I could only find in the event log when the host entered and exited from a period of scheduled downtime without any further details.
I thought it was possible in the past to see this history with the comment given, but it's seems to have gone (or it never existed).
When I check the tables in the mysql database I see that nagios_downtimehistory is empty, also nagios_commenthistory.
Is this normal? Because I suppose that would be the place to look for past downtimes and its comments.
I'm using the latest version of NagiosXI 2024R1.3
Regards,
Peter
Re: Downtime and comment history tables are empty
Posted: Thu Oct 24, 2024 9:01 am
by lgute
Hi
@PeterDK2, thanks for reaching out.
Are you looking for the history in the
Host Status Detail |
History tab, or elsewhere?
The Scheduled Downtime comments are initially stored in nagios_scheduleddowntime. According to this
document,
Once you schedule downtime for a host or service, Nagios will add a comment to that host/service indicating that it is scheduled for downtime during the period of time you indicated. When that period of downtime passes, Nagios will automatically delete the comment that it added. Nice, huh?
When a Scheduled Downtime is complete, I believe the comment should then be moved to nagios_downtimehistory. I am looking into this process and will give you an update.
Re: Downtime and comment history tables are empty
Posted: Thu Oct 24, 2024 1:44 pm
by lgute
Hi
@PeterDK2,
In order to get the Scheduled Downtime comments into
nagios_downtimehistory, you need to edit the
/usr/local/nagios/etc/ndo.cfg file. Change the following from 0 to 1.
Code: Select all
comment_history_data=1
downtime_history_data=1
Then restart the nagios service.
In the meantime, you can find the downtime events with...
Code: Select all
grep DOWNTIME /usr/local/nagios/var/archives/*
Re: Downtime and comment history tables are empty
Posted: Mon Oct 28, 2024 8:23 am
by PeterDK2
Hi
@lgute,
Thanks! That was the solution indeed.
In we now see "Comment History" and "Downtime History" in the history tab as well.
There is still an issue with the history tab though, after every upgrade I need to fix the query in the php to not show all other comments as well.
But that's already addressed in another topic:
viewtopic.php?t=75682
Kind regards,
Peter
Re: Downtime and comment history tables are empty
Posted: Mon Oct 28, 2024 3:51 pm
by lgute
Hi
@PeterDK2,
An Issue has been created to address the improvements requested in
viewtopic.php?t=75682
To verify resolution, you can look for [GL:XI#1292] in future XI Changelog entries.