Page 1 of 1
Where to find historic data on Service check in DB
Posted: Mon Jan 28, 2019 10:19 am
by andrewatmacys
I am wondering how to access historical data from service checks in the DB and how might I find that data. I've got a service that is being monitored but the same data from another source has gone haywire, so I'm hoping to pull it out of Nagios. How long would that service's data be stored in the DB, and if it's available to me how would I pull it out?
Re: Where to find historic data on Service check in DB
Posted: Mon Jan 28, 2019 12:25 pm
by benjaminsmith
Hi Andrew,
You can access the log files in the following directory:
or in the nagios_logentries table in the nagios database. The log entire tables is set at default to store the last 90 days of entries. This can be changed by going to Admin > Performance Settings > Database > Max Log Entries Age
so I'm hoping to pull it out of Nagios
Are you trying to remove the data or just get at it?
Thanks.
Re: Where to find historic data on Service check in DB
Posted: Mon Jan 28, 2019 1:09 pm
by andrewatmacys
Just trying to get to it and possibly get the data out so we can compare is all, sorry for the ambiguous wording. I'll take a look at the logs and see if I can find what I need!
Re: Where to find historic data on Service check in DB
Posted: Mon Jan 28, 2019 1:11 pm
by benjaminsmith
Sounds good. Let me know if you have any questions.
Re: Where to find historic data on Service check in DB
Posted: Mon Jan 28, 2019 3:47 pm
by andrewatmacys
Thanks for the answer, but on looking and finding those logs, I was meaning to ask about where the actual data for metric gathered from the service might be, not just the host status info. Would that be stored anywhere, and where might I find it if so?
Re: Where to find historic data on Service check in DB
Posted: Mon Jan 28, 2019 4:29 pm
by benjaminsmith
Hi Andrew,
Performance data is stripped off from the plugin output and stored in round robin databases. You can find those files in the following directories.
Code: Select all
/usr/local/nagios/share/perfdata/
/var/lib/mrtg/
You can export the rrd files into human readable format using the rrdtool:
https://oss.oetiker.ch/rrdtool/doc/rrddump.en.html
Re: Where to find historic data on Service check in DB
Posted: Tue Feb 05, 2019 10:57 am
by andrewatmacys
Thanks for the reply! I'll be sure to check there and let you know if I have any other questions!
Re: Where to find historic data on Service check in DB
Posted: Tue Feb 05, 2019 12:17 pm
by benjaminsmith
Hi Andrew,
Thanks for the reply! I'll be sure to check there and let you know if I have any other questions!
No problem, that sounds good.