Downtime and comment history tables are empty

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
PeterDK2
Posts: 13
Joined: Wed Sep 11, 2024 5:45 am

Downtime and comment history tables are empty

Post 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
User avatar
lgute
Posts: 411
Joined: Mon Apr 06, 2020 2:49 pm

Re: Downtime and comment history tables are empty

Post 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.
Please let us know if you have any other questions or concerns.

-Laura
User avatar
lgute
Posts: 411
Joined: Mon Apr 06, 2020 2:49 pm

Re: Downtime and comment history tables are empty

Post 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.

Code: Select all

systemctl restart nagios
In the meantime, you can find the downtime events with...

Code: Select all

grep DOWNTIME /usr/local/nagios/var/archives/*
Please let us know if you have any other questions or concerns.

-Laura
PeterDK2
Posts: 13
Joined: Wed Sep 11, 2024 5:45 am

Re: Downtime and comment history tables are empty

Post 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
User avatar
lgute
Posts: 411
Joined: Mon Apr 06, 2020 2:49 pm

Re: Downtime and comment history tables are empty

Post 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.
Please let us know if you have any other questions or concerns.

-Laura
Post Reply