Page 2 of 2

Re: Notification disabled report

Posted: Sun Dec 17, 2017 10:28 pm
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

Re: Notification disabled report

Posted: Mon Dec 18, 2017 10:07 am
by kyang
naranant, did you have any more questions or are we okay to lock this up?