Notification disabled report

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.
User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Notification disabled report

Post by tacolover101 »

mcapra wrote:Man I've been grepping a lot lately.
tacolover101 wrote:to solve this for the time being you could parse the status.dat
This command should list the name of every Host and Service object that has the notifications_enabled=0 flag:

Code: Select all

grep 'notifications_enabled=0' -B 41 /usr/local/nagios/var/status.dat | grep 'host_name\|service_description\|servicestatus\|hoststatus\|notifications_enabled'
In action:

Code: Select all

[root@nagios ~]# grep 'notifications_enabled=0' -B 41 /usr/local/nagios/var/status.dat | grep 'host_name\|service_description\|servicestatus\|hoststatus\|notifications_enabled'
hoststatus {
        host_name=esprod00
        notifications_enabled=0
hoststatus {
        host_name=datamart
        notifications_enabled=0
servicestatus {
        host_name=datamart
        service_description=Assessment Table Top 1
        notifications_enabled=0
Be sure the Nagios Core daemon is running when you run that command. You may also need to change the path to status.dat depending on how Nagios Core is configured (mine is the 4.3.2 default).
grep master flex eyyy
kyang

Re: Notification disabled report

Post by kyang »

naranant, did you have any more questions or are we okay to lock this up?
Locked