Connect to NagiosXI DB

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Sbergonzi
Posts: 127
Joined: Wed Feb 19, 2014 4:21 pm

Connect to NagiosXI DB

Post 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 -
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Connect to NagiosXI DB

Post 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?
Sbergonzi
Posts: 127
Joined: Wed Feb 19, 2014 4:21 pm

Re: Connect to NagiosXI DB

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Connect to NagiosXI DB

Post 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.
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Connect to NagiosXI DB

Post 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.
Nagios XI 5.8.1
https://outsideit.net
Sbergonzi
Posts: 127
Joined: Wed Feb 19, 2014 4:21 pm

Re: Connect to NagiosXI DB

Post 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?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Connect to NagiosXI DB

Post 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
Former Nagios employee
Sbergonzi
Posts: 127
Joined: Wed Feb 19, 2014 4:21 pm

Re: Connect to NagiosXI DB

Post 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!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Connect to NagiosXI DB

Post 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/
Former Nagios employee
Sbergonzi
Posts: 127
Joined: Wed Feb 19, 2014 4:21 pm

Re: Connect to NagiosXI DB

Post by Sbergonzi »

Well that was interesting! Image

I'll see if these formats can be used, thanks again!
Locked