Hi Team,
We wanted to export our nagios xi configured services configuration in .csv or excel in attached file format ().
Let us know how we will achieve this.
Regards,
Rohan
Export details in .csv / excel
Export details in .csv / excel
You do not have the required permissions to view the files attached to this post.
Re: Export details in .csv / excel
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.
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.