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.
See all hosts/services with active checks disabled
See all hosts/services with active checks disabled
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: See all hosts/services with active checks disabled
Let's see, I know you can see them in the GUI here
Services
Hosts
From the CLI you would need to grab them from the API
Services
Hosts
Services
Code: Select all
/nagiosxi/includes/components/xicore/status.php?show=services&serviceattr=16Code: Select all
/nagiosxi/includes/components/xicore/status.php?show=hosts&hostattr=16Services
Code: Select all
http://YOUR_HOST/nagiosxi/api/v1/objects/servicestatus?apikey=API_KEY&pretty=1&active_checks_enabled=0Code: Select all
http://YOUR_HOST/nagiosxi/api/v1/objects/hoststatus?apikey=API_KEY&pretty=1&active_checks_enabled=0Re: See all hosts/services with active checks disabled
Thank you, this resolved my issue. please feel free to close the post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: See all hosts/services with active checks disabled
Great!hbouma wrote:Thank you, this resolved my issue. please feel free to close the post.
Locking