Report of Host names

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Report of Host names

Post 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,
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Report of Host names

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: Report of Host names

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Report of Host names

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: Report of Host names

Post by MOHANREDDY »

Thanks it worked.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Report of Host names

Post by scottwilkerson »

MOHANREDDY wrote:Thanks it worked.
great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked