Export details in .csv / excel

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lrnnetops
Posts: 102
Joined: Thu May 18, 2017 5:31 am

Export details in .csv / excel

Post by lrnnetops »

Hi Team,

We wanted to export our nagios xi configured services configuration in .csv or excel in attached file format (
nagiosxi-config-output-sample.csv
).

Let us know how we will achieve this.

Regards,
Rohan
You do not have the required permissions to view the files attached to this post.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Export details in .csv / excel

Post by cdienger »

I think the command view is generated on the fly and not directly in the database, but other than that you can find the information in the nagiosql database. For example:

echo "select host_name,config_name,service_description,display_name,check_command from tbl_service INTO OUTFILE '/directory/to/output.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n';" | mysql -uroot -pnagiosxi -Dnagiosql

note that the host_name and check_command need to be linked to the tbl_host and tbl_command tables in the same database. I haven't been able to figure this out yet, but hopefully the above gives you something to work with.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked