Page 1 of 2
Connect to NagiosXI DB
Posted: Thu Jun 26, 2014 12:16 pm
by Sbergonzi
Is it possible to connect to the NagiosXI database directly? I've been asked to see if the data we have in Nagios can be read into other applications for reporting.
Are there connection parameters to the database (MySQL correct)? We have an RHEL installation.
thank you -
Re: Connect to NagiosXI DB
Posted: Thu Jun 26, 2014 12:28 pm
by slansing
What data are you looking for specifically, yes you can access the mysql and postgres data bases, but I would be very wary of what you do in them. Perhaps we can point you to the data you need specifically. Historical, configurations, user information, etc?
Re: Connect to NagiosXI DB
Posted: Thu Jun 26, 2014 2:01 pm
by Sbergonzi
Historical and/or real time trending information such as CPU usage for example. The dashboards configured are working well, it's been requested to look at other options to view the information.
User, configuration information isn't needed.
Re: Connect to NagiosXI DB
Posted: Fri Jun 27, 2014 9:13 am
by slansing
Historical and/or real time trending information such as CPU usage for example.
Just a heads up on this one, the data displayed in the graphs is really as close to real time as you will be able to get with what is already available in XI, since the graphs are generated from performance data that is brought in on checks, it is up to the at rate which you are checking in essence. You are going to get the same data at relatively the same speed if you pull it from the backend.
Re: Connect to NagiosXI DB
Posted: Fri Jun 27, 2014 9:52 am
by WillemDH
You could work on the rrd files with rrdtool, but it's quite complicated. I'm using it to get averages of for example cpu for a given timeperiod for hosts.
Re: Connect to NagiosXI DB
Posted: Fri Jun 27, 2014 10:07 am
by Sbergonzi
It's more of the structure of how the data is presented. The groupings are not meeting the requests of our users from an overall health of our network.
Birdseye view is nice though it can't be configured to only show certain platforms (or can it?). Same with the Operations Screen, and that's just not visibly appealing either. It's these types of views that we wish to gather data on and make more appropriate for our environment.
Am I gathering that the data is not externally available to connect to? That it's proprietary in format and access?
Re: Connect to NagiosXI DB
Posted: Fri Jun 27, 2014 10:11 am
by tmcdonald
Sorry this hasn't been posted yet, but I think this is what you are looking for:
http://assets.nagios.com/downloads/nagi ... nd_API.pdf
Re: Connect to NagiosXI DB
Posted: Fri Jun 27, 2014 10:45 am
by Sbergonzi
That worked and it looks like it's something we may be able to use. Are there any other URL parameters that can be used to support information for a specific host for example?
thanks!
Re: Connect to NagiosXI DB
Posted: Fri Jun 27, 2014 10:48 am
by tmcdonald
You might also take a look at the new JSON API introduced in Core 4.0.7
http://labs.nagios.com/2014/06/19/explo ... -7-part-1/
Re: Connect to NagiosXI DB
Posted: Fri Jun 27, 2014 11:10 am
by Sbergonzi
Well that was interesting!
I'll see if these formats can be used, thanks again!