grep master flex eyyymcapra wrote:Man I've been grepping a lot lately.
This command should list the name of every Host and Service object that has the notifications_enabled=0 flag:tacolover101 wrote:to solve this for the time being you could parse the status.datIn action:Code: Select all
grep 'notifications_enabled=0' -B 41 /usr/local/nagios/var/status.dat | grep 'host_name\|service_description\|servicestatus\|hoststatus\|notifications_enabled'
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).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
Notification disabled report
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Notification disabled report
Re: Notification disabled report
naranant, did you have any more questions or are we okay to lock this up?