Page 1 of 1

export server list as PDF

Posted: Thu Jun 18, 2020 2:16 pm
by rnjie
is there a way i could export a list of all the servers monitored to an excel shit or pdf?

Re: export server list as PDF

Posted: Fri Jun 19, 2020 9:17 am
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