How to pull service/host uptime stats directly from MySQL DB
Posted: Fri Oct 18, 2013 10:08 am
How to pull service/host uptime and downtime stats directly from MySQL databases that NagiosXI runs on?
I know there are 2 mysql databases: nagios and nagiosql. Please let me know what tables/columns provide the uptime/downtime stats. In other words, I would like to be able to run sql queries to pull up the % of downtime from the total period of time that some service/host was monitored, and I want to do that directly from the database and not the web GUI of NagiosXI.
Also, is there an API for nagiosql component of NagiosXI? I want to be able to manipulate hosts/services with my own code and update the database accordingly.
Thanks!
I know there are 2 mysql databases: nagios and nagiosql. Please let me know what tables/columns provide the uptime/downtime stats. In other words, I would like to be able to run sql queries to pull up the % of downtime from the total period of time that some service/host was monitored, and I want to do that directly from the database and not the web GUI of NagiosXI.
Also, is there an API for nagiosql component of NagiosXI? I want to be able to manipulate hosts/services with my own code and update the database accordingly.
Thanks!