Is there a way to script disable/enable service checks in nagios xi 5.4.2?
want to leave host monitoring up, just disable service checks
Would like to disable checks for ALL services on a given host, just prior to deploy
then enable afterwards.
Disable Host svc checks
Re: Disable Host svc checks
Depending on the naming convention used, you could go to Configure > Core Config Manager > Services, filter for the hostname, select all services returned, and select Deactivate from the drop down.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 109
- Joined: Wed Nov 18, 2015 11:19 pm
Re: Disable Host svc checks
Need to do that through cli /script
is that possible? Will the below work?
#!/bin/sh
# This is a sample shell script showing how you can submit the DISABLE_HOST_SVC_CHECKS command
# to Nagios. Adjust variables to fit your environment as necessary.
now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
/bin/printf "[%lu] DISABLE_HOST_SVC_CHECKS;host1\n" $now > $commandfile
is that possible? Will the below work?
#!/bin/sh
# This is a sample shell script showing how you can submit the DISABLE_HOST_SVC_CHECKS command
# to Nagios. Adjust variables to fit your environment as necessary.
now=`date +%s`
commandfile='/usr/local/nagios/var/rw/nagios.cmd'
/bin/printf "[%lu] DISABLE_HOST_SVC_CHECKS;host1\n" $now > $commandfile
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Disable Host svc checks
This is exactly how you would do it replacing host1 with the hostname that you want to disable all of the services on