How check Process Information using command

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.
Locked
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

How check Process Information using command

Post by sandeepatil »

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
nagioscore.PNG
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How check Process Information using command

Post by mcapra »

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
Former Nagios employee
https://www.mcapra.com/
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: How check Process Information using command

Post by sandeepatil »

Shared details is very helpful,

passive_service_checks_enabled etc. status details will update in nagios.log ?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How check Process Information using command

Post by mcapra »

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.
Former Nagios employee
https://www.mcapra.com/
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How check Process Information using command

Post by scottwilkerson »

Yes, you should see the change in the log if you enable/disable these.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
sandeepatil
Posts: 211
Joined: Tue Dec 27, 2016 3:12 am

Re: How check Process Information using command

Post by sandeepatil »

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:

Re: How check Process Information using command

Post by scottwilkerson »

sandeepatil wrote:Thank for sharing details.

Please close the thread.
great

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked