Page 1 of 2
Data from Nagios to Excel
Posted: Fri Jan 31, 2020 2:43 pm
by gregwhite
I am trying to get information out of Nagios if possible and put it in a spreadsheet. The fields I am looking for are the following:
Host Group
Members of that host group
Alias
Host Template
Services
Service Description
Check Frequency
Service Template
We are hoping to use this report to validate our data and ask our application owners if it is accurate.
Thanks,
Greg
Re: Data from Nagios to Excel
Posted: Fri Jan 31, 2020 3:23 pm
by mbellerue
This information can be gathered. The best place to get it is the database. Do you have a database person on hand, or someone who is handy with SQL? In the nagios database, all of the tables and fields are named in a pretty straight forward fashion, but retrieving the information is going to require some fancy joins.
Re: Data from Nagios to Excel
Posted: Mon Feb 03, 2020 12:52 pm
by gregwhite
Is there a big difference between MySQL and MSSQL? We have an MSSQL database person but no one with MySQL experience.
Thanks,
Greg
Re: Data from Nagios to Excel
Posted: Mon Feb 03, 2020 4:17 pm
by mbellerue
Yes and no. There are a great many things that are different between the two systems, but basically all database software supports SQL99, so that will give them a good place to start from. Anyone familiar with writing SQL in one database should do fine in any other database, with a little fumbling around to get any proprietary syntax down. Probably the biggest difference they'll run into right out of the gate is that MS SQL Server listens for network connections, and MySQL/MariaDB only listen for connections on the local server by default.
Re: Data from Nagios to Excel
Posted: Tue Feb 04, 2020 12:02 pm
by gregwhite
Thanks for you help. I will see what they can do.
Have a good day,
Greg
Re: Data from Nagios to Excel
Posted: Tue Feb 04, 2020 12:51 pm
by gregwhite
One more question. Could PHPMYADMIN be used to pull data from MYSQL?
Thanks,
Greg
Re: Data from Nagios to Excel
Posted: Tue Feb 04, 2020 1:00 pm
by mcapra
Using an external client like
HeidiSQL (which can do CSV/Excel export) is probably a better idea. PHPMyAdmin is probably OK if it's not installed on-top of the Nagios XI box -- if it were installed on a separate VM and accessing Nagios XI remotely.
Re: Data from Nagios to Excel
Posted: Tue Feb 04, 2020 3:19 pm
by benjaminsmith
Thanks
@mcapra.
Let us know if you have any other questions.
Re: Data from Nagios to Excel
Posted: Tue Feb 04, 2020 5:41 pm
by gregwhite
Sorry, one more question.
Just came across Rest API. If seems like it might give us some of the data but it is not working. Would this be a good option?
Thanks,
Greg
Re: Data from Nagios to Excel
Posted: Tue Feb 04, 2020 8:08 pm
by Box293
If you are talking about Help > API Docs > Objects Reference then the supported outputs are json or xml, this would be the easiest way to get the data and manipulate. Can you show us an example of what you are trying and what is not working?