Page 1 of 1

Host status history in the database

Posted: Wed Jul 13, 2016 8:04 am
by peter.zanetti
I am wanting to write a custom database query to pull out the host status history for a few different hosts we are having trouble with. But I cant find where in the database this information is kept. If someone could please guide me in the right direction that would be much appreciated. Thanks.

Re: Host status history in the database

Posted: Wed Jul 13, 2016 10:14 am
by gormank

Re: Host status history in the database

Posted: Wed Jul 13, 2016 10:14 am
by mcapra
Just as a brief disclaimer, we don't support direct database manipulation (but there's also nothing stopping you from doing it).

Historical data, such as host/service status and performance data, is kept primarily in Round Robin Database files created by RRDTools. These files are located at /usr/local/nagios/share/perfdata by default. There is some status information presented in the nagios.nagios_logentries and nagios.nagios_statehistory tables that you could extrapolate, but the bulk of the historical data is in the perfdata folder.