Notification disabled report
Notification disabled report
We often find people disables notification for hosts/services and forgot to enable them when the finish. Is the a way to run a report to show all the hosts/services with notification disabled?
Can we create a schedule report to provide his information.
Can we create a schedule report to provide his information.
- tacolover101
- Posts: 432
- Joined: Mon Apr 10, 2017 11:55 am
Re: Notification disabled report
built in? i don't think so.
would make an interesting feature request though.
to solve this for the time being you could parse the status.dat or objects.cache for notifications_enabled 0, pick up the host / service that has it assigned, and output to wherever you'd like.
would make an interesting feature request though.
to solve this for the time being you could parse the status.dat or objects.cache for notifications_enabled 0, pick up the host / service that has it assigned, and output to wherever you'd like.
Re: Notification disabled report
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Notification disabled report
Thank you for that. It would be better if this can be add as the feature in the reporting..
Re: Notification disabled report
Thanks @tacolover101.
@naranant, you can put in a feature request at....https://github.com/NagiosEnterprises/nagioscore/issues.
If you have an account with GitHub, click on New issue.
note: You will need to create an account with GitHub if you don't already have one.
Please let us know if you have any questions.
@naranant, you can put in a feature request at....https://github.com/NagiosEnterprises/nagioscore/issues.
If you have an account with GitHub, click on New issue.
note: You will need to create an account with GitHub if you don't already have one.
Please let us know if you have any questions.
Re: Notification disabled report
Man I've been grepping a lot lately.
In action:
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).
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.dat
Code: Select all
grep 'notifications_enabled=0' -B 41 /usr/local/nagios/var/status.dat | grep 'host_name\|service_description\|servicestatus\|hoststatus\|notifications_enabled'
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
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Notification disabled report
On that note....what version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use. Those questions will help us determine file paths so that we can help you.mcapra wrote:depending on how Nagios Core is configured
Also, is there a reason your co-workers are disabling notifications temporarily? It sounds like they might find the acknowledgement feature handy. It's possible to click the link in the UI, but also:
https://old.nagios.org/developerinfo/ex ... mand_id=40
https://old.nagios.org/developerinfo/ex ... mand_id=39
Re: Notification disabled report
We are using the Nagios XI. Yes I have suggested to either move the node to downtime or acknowledge the alerts. Some case we are still seeing someone disable the alert and forgot to re-enable the same. So I am looking at creating a report which can generate the notifications disabled for host/service.
Re: Notification disabled report
Since you are using Nagios XI. (I can move your thread into Nagios XI, since you posted this into Nagios Core)
Putting them in a scheduled downtime is probably the best as of now. There is no way to create a report on this for which hosts/services have notifications disabled.
+1 for @mcapra grep command. If you add > /tmp/xxx.csv, it will create a csv file with the hosts/services that have notifications disabled. Or add .txt if you don't want it in a csv.
Putting them in a scheduled downtime is probably the best as of now. There is no way to create a report on this for which hosts/services have notifications disabled.
+1 for @mcapra grep command. If you add > /tmp/xxx.csv, it will create a csv file with the hosts/services that have notifications disabled. Or add .txt if you don't want it in a csv.
Code: Select all
grep 'notifications_enabled=0' -B 41 /usr/local/nagios/var/status.dat | grep 'host_name\|service_description\|servicestatus\|hoststatus\|notifications_enabled' > /tmp/disablednotifs.csv
Re: Notification disabled report
Sure thank you.. The grep command works. i will see if we can create a script run this report.