export server list as PDF

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rnjie
Posts: 157
Joined: Wed Mar 20, 2019 4:59 pm

export server list as PDF

Post by rnjie »

is there a way i could export a list of all the servers monitored to an excel shit or pdf?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: export server list as PDF

Post by ssax »

There isn't a basic host list other than the Home > Host Details (which can be scheduled with the schedule page option in the top right menu with the 3 horizontal lines).

Or you can do this:
- Change X.X.X.X to the IP of your XI server
- Change XXXXXXXXXXXXXXXXX to your API key

Code: Select all

yum install jq -y
curl -k -L -XGET "http://X.X.X.X/nagiosxi/api/v1/objects/hoststatus?apikey=XXXXXXXXXXXXXXXXX&pretty=1" | jq -r '.hoststatus[] | [.[] | tostring] | @csv' > /path/to/your/file.csv
See here for more information:

Code: Select all

http://YOURXISERVER/nagiosxi/help/api-object-reference.php#objects-hoststatus
Locked