Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sandeepatil
Posts: 211 Joined: Tue Dec 27, 2016 3:12 am
Post
by sandeepatil » Mon Nov 26, 2018 10:13 am
Want check Nagios Core "Process Information" status check using command line.
How to check blow mention Process Information status using command line.
Service Checks Being Executed? [Yes/No]
Passive Service Checks Being Accepted? [Yes/No]
Host Checks Being Executed? [Yes/No]
Passive Host Checks Being Accepted? [Yes/No]
For reference please check attachment.
Attachments
mcapra
Posts: 3739 Joined: Thu May 05, 2016 3:54 pm
Post
by mcapra » Mon Nov 26, 2018 10:51 am
Those are generally derived from your Nagios configuration:
https://github.com/NagiosEnterprises/na ... #L802-L811
Code: Select all
[root@capra_nag ~]# cat /usr/local/nagios/etc/nagios.cfg | grep execute_service_checks
execute_service_checks=1
[root@capra_nag ~]# cat /usr/local/nagios/etc/nagios.cfg | grep accept_passive_service_checks
accept_passive_service_checks=1
[root@capra_nag ~]# cat /usr/local/nagios/etc/nagios.cfg | grep execute_host_checks
execute_host_checks=1
[root@capra_nag ~]# cat /usr/local/nagios/etc/nagios.cfg | grep accept_passive_host_checks
accept_passive_host_checks=1
You could also parse status.dat for similar, but slightly different, information:
Code: Select all
[root@capra_nag ~]# cat /usr/local/nagios/var/status.dat | grep active_service_checks_enabled
active_service_checks_enabled=1
[root@capra_nag ~]# cat /usr/local/nagios/var/status.dat | grep passive_service_checks_enabled
passive_service_checks_enabled=1
[root@capra_nag ~]# cat /usr/local/nagios/var/status.dat | grep active_host_checks_enabled
active_host_checks_enabled=1
[root@capra_nag ~]# cat /usr/local/nagios/var/status.dat | grep passive_host_checks_enabled
passive_host_checks_enabled=1
sandeepatil
Posts: 211 Joined: Tue Dec 27, 2016 3:12 am
Post
by sandeepatil » Mon Nov 26, 2018 10:59 am
Shared details is very helpful,
passive_service_checks_enabled etc. status details will update in nagios.log ?
mcapra
Posts: 3739 Joined: Thu May 05, 2016 3:54 pm
Post
by mcapra » Mon Nov 26, 2018 4:51 pm
If you trigger an external command (or push a button in the GUI) to enable/disable those particular parameters, that should show up in the Nagios log.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Mon Nov 26, 2018 5:19 pm
Yes, you should see the change in the log if you enable/disable these.
sandeepatil
Posts: 211 Joined: Tue Dec 27, 2016 3:12 am
Post
by sandeepatil » Wed Nov 28, 2018 12:19 pm
Thank for sharing details.
Please close the thread.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Wed Nov 28, 2018 1:10 pm
sandeepatil wrote: Thank for sharing details.
Please close the thread.
great
Locking thread