Page 1 of 1

how to disable active passive checks and notifications

Posted: Thu Sep 28, 2017 10:52 am
by benhank
Hey guys!
Is it possible to disable passive and active checks and notifications from the command line?
I backup my pri server and restore it to the secondary, and I want to add line(s) to it that will disable the above for me so the restored server wont fire up running checks and sending notifications.
Thanks!

Re: how to disable active passive checks and notifications

Posted: Thu Sep 28, 2017 12:41 pm
by lmiltchev
You can simply modify the main config file (nagios.cfg), and set:

# To disable active host/service checks

Code: Select all

execute_host_checks=0
execute_service_checks=0
# To stop accepting host/service passive checks

Code: Select all

accept_passive_host_checks=0
accept_passive_service_checks=0
# To disable notifications globally

Code: Select all

enable_notifications=0
Then restart nagios.

Code: Select all

service nagios restart
To learn more about the main configuration file options, please review our official Nagios Core documentation here:

https://assets.nagios.com/downloads/nag ... gmain.html

Re: how to disable active passive checks and notifications

Posted: Thu Sep 28, 2017 12:45 pm
by benhank
hmm no command line eh? well maybe ill try using sed or awk in the script.
you can lock it bro and thanks for the info!