Page 1 of 1
Report of Host names
Posted: Mon Dec 23, 2019 10:48 am
by MOHANREDDY
Hi,
I have a lot of hosts added in Nagios XI. I am trying to make/generate a report on all hosts added in XI. i looked at reports i didn't find a way to do it. Is there a way to generate a report on all the added hosts in XI.
Thanks,
Re: Report of Host names
Posted: Mon Dec 23, 2019 11:11 am
by scottwilkerson
It's not a report per-se but you can see them all going to
Home -> Details -> Host Status
Also, you can pull the complete list via the JOSN API
Help -> Object reference -> objects/host
Re: Report of Host names
Posted: Mon Dec 23, 2019 11:36 am
by MOHANREDDY
I dont need all the attributes along with the host. I just need to make a list of hosts available in XI. If i copy hosts from host status it will copy everything hostname, status, last check and status information.
I just need hostname nothing else.
Re: Report of Host names
Posted: Mon Dec 23, 2019 11:47 am
by scottwilkerson
You can get this from the database with the following command from the CLI
Code: Select all
echo "select name1 AS HOST from nagios_objects where is_active=1 AND objecttype_id=1;"|mysql -pnagiosxi nagios
Re: Report of Host names
Posted: Wed Feb 12, 2020 9:32 am
by MOHANREDDY
Thanks it worked.
Re: Report of Host names
Posted: Wed Feb 12, 2020 9:42 am
by scottwilkerson
MOHANREDDY wrote:Thanks it worked.
great!
Locking thread