how to disable active passive checks and notifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

how to disable active passive checks and notifications

Post 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!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: how to disable active passive checks and notifications

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
benhank
Posts: 1264
Joined: Tue Apr 12, 2011 12:29 pm

Re: how to disable active passive checks and notifications

Post 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!
Proudly running:
NagiosXI 5.4.12 2 node Prod Env 2500 hosts, 13,000 services
Nagiosxi 5.5.7(test env) 2500 hosts, 13,000 services
Nagios Logserver 2 node Prod Env 500 objects sending
Nagios Network Analyser
Nagios Fusion
Locked