Host status history in the database

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Host status history in the database

Post 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.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Host status history in the database

Post by gormank »

Last edited by gormank on Wed Jul 13, 2016 10:15 am, edited 1 time in total.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Host status history in the database

Post 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.
Former Nagios employee
https://www.mcapra.com/
Locked