Page 1 of 1
See all hosts/services with active checks disabled
Posted: Tue May 21, 2019 9:50 am
by hbouma
Is there a way to check from the command line for all hosts/services disabled? For instance, if someone were to turn off active checks from the Advanced option in the gui, can I pull a list of those checks?
This would be for Nagios XI 5.6.1 on Red Hat 7.6 64bit VM's.
2019-05-21 10_49_20-Nagios XI.png
Re: See all hosts/services with active checks disabled
Posted: Tue May 21, 2019 2:48 pm
by scottwilkerson
Let's see, I know you can see them in the GUI here
Services
Code: Select all
/nagiosxi/includes/components/xicore/status.php?show=services&serviceattr=16
Hosts
Code: Select all
/nagiosxi/includes/components/xicore/status.php?show=hosts&hostattr=16
From the CLI you would need to grab them from the API
Services
Code: Select all
http://YOUR_HOST/nagiosxi/api/v1/objects/servicestatus?apikey=API_KEY&pretty=1&active_checks_enabled=0
Hosts
Code: Select all
http://YOUR_HOST/nagiosxi/api/v1/objects/hoststatus?apikey=API_KEY&pretty=1&active_checks_enabled=0
Re: See all hosts/services with active checks disabled
Posted: Thu May 23, 2019 2:09 pm
by hbouma
Thank you, this resolved my issue. please feel free to close the post.
Re: See all hosts/services with active checks disabled
Posted: Thu May 23, 2019 2:36 pm
by scottwilkerson
hbouma wrote:Thank you, this resolved my issue. please feel free to close the post.
Great!
Locking