Page 1 of 1

In which database the report data is stored ?

Posted: Mon Jul 17, 2017 9:42 am
by sac1472
I need to give access some other team for report generation. But I can't find the exact data to share with them so they can generate report using data from nagios.

So, Please provide me location of data or table from which nagiosxi generates all reports.

Thanks in advance

Re: In which database the report data is stored ?

Posted: Mon Jul 17, 2017 10:26 am
by mcapra
It depends on what sort of reports you want to run, but stuff like SLA/Availability reports are actually not held in-database. They are generated by parsing the Nagios logs directly.

Having said that, depending on what sort of reporting you want to do there may be entries in the databases that are relevant.

Re: In which database the report data is stored ?

Posted: Mon Jul 17, 2017 10:42 am
by sac1472
Yeah... I need data from nagiosxi which is responsible to generate Availability,SLA and State History Report.

So can you provide me file-name or database.table name which is containing respective data ?

Thanks for Prompt support!!!!!!!

Re: In which database the report data is stored ?

Posted: Mon Jul 17, 2017 2:19 pm
by tmcdonald
As @mcapra pointed out, this information is not stored in one single database table. Is there a reason you can't just run the reports from the web interface? That would be a lot easier.

Re: In which database the report data is stored ?

Posted: Tue Jul 18, 2017 2:45 am
by sac1472
Actually, I need to share backend report data with data warehouse team. So, they can generate report as per customer requirement.
That's why, I need database table or filename which contains the respective data.


If possible, can you share any document which having explanation about contents of all three database (nagios , nagiosql , nagiosxi) ?

Re: In which database the report data is stored ?

Posted: Tue Jul 18, 2017 8:49 am
by mcapra
sac1472 wrote:I need database table or filename which contains the respective data.
The primary Nagios XI/Core log file is located here:
/usr/local/nagios/var/nagios.log

And the historical log files are located here:
/usr/local/nagios/var/archives
sac1472 wrote:If possible, can you share any document which having explanation about contents of all three database (nagios , nagiosql , nagiosxi) ?
This documentation covers the nagios database:
https://assets.nagios.com/downloads/nag ... _Model.pdf

I don't know of any similar documentation for nagiosql or nagiosxi, though I think if you had specific questions about a specific table/column they could be answered.

Re: In which database the report data is stored ?

Posted: Tue Jul 18, 2017 11:52 am
by tmcdonald
Thanks for the assist, @mcapra!

Re: In which database the report data is stored ?

Posted: Wed Jul 19, 2017 3:33 am
by sac1472
Thanks for support & that document @mcapra!
mcapra wrote: The primary Nagios XI/Core log file is located here:
/usr/local/nagios/var/nagios.log

And the historical log files are located here:
/usr/local/nagios/var/archives
So, You are saying that nagiosxi generates reports using only nagios.log & archives. & No data is fetched by nagiosxi from databases to generate report. is that correct ?

If yes, I will share only nagios.log & archives to dataware house team. so they can generate report.

Re: In which database the report data is stored ?

Posted: Wed Jul 19, 2017 2:32 pm
by dwhitfield
sac1472 wrote:I need data from nagiosxi which is responsible to generate Availability,SLA and State History Report.
Why not just give them XI user accounts if those are all you need?

If you are giving them access so that they can make custom reports, then you may want to give them database access, but helping build *custom* reports is not really support. That's consulting. Of course, that's some other community members like @mcapra can do on the forums, but it's not something that the support team does.

If you need help building *custom* reports, then you should email [email protected] to get a quote, or speak with a third-party consultant like http://everwatch.global/ @eloyd is a frequent user of the forums.

Lastly, the information in the databases is not proprietary. You can just do an mysqldump if you want to take a deeper look into the databases.

NagiosQL is the the database the CCM uses. NagiosXI is where XI-specific information like users (rather than contacts) are stored. The table names are reasonably descriptive. The show tables command should get you started.

Also, for clarity, the nagios database is probably the most useful database for what you are trying to do. That may have been implicit in my description of the XI db, but I wanted to be clear.