extract list of all available hosts in nagiosxi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
qtg_tech
Posts: 3
Joined: Wed Jan 16, 2019 9:26 am

extract list of all available hosts in nagiosxi

Post by qtg_tech »

Dear Support,

Could you please suggest how I can extract list of all available hosts groups/host/host + services or only services into CSV file.
Installed Version: 5.4.13

Thank you in advance
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: extract list of all available hosts in nagiosxi

Post by scottwilkerson »

There isn't a way to get them through the UI but you can get them out of the database with a command like the following

Code: Select all

echo 'select CONCAT(name1,",",name2) as "host,service" from nagios_objects where objecttype_id in (1,2) AND is_active=1 and name1 != "";'|mysql -pnagiosxi nagios
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked