Email notification when Disabling notification on service

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
npolite
Posts: 7
Joined: Fri Sep 02, 2016 9:39 am

Email notification when Disabling notification on service

Post by npolite »

Hi All,

Someone on my team disabled notifications for a service and forgot to re-enable them after they resolved the issue. This caused of course another issue which we didn't catch. My manager is asking if there is a way to send a notification out when a service is disabled. Is this something that can be done in the configuration?


Thanks
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: Email notification when Disabling notification on servic

Post by pbroste »

Hello,

Thanks for reaching out, and hope things are going well.
There are several service checks plugins available that you could use to check if the service is running and/or stopped, the option to change the check within the plugin for other options to check for as well. Here are several examples:
  • check_init_service
  • check_services
  • check_systemd_service
Thanks,
Perry
npolite
Posts: 7
Joined: Fri Sep 02, 2016 9:39 am

Re: Email notification when Disabling notification on servic

Post by npolite »

Hi Perry and thanks for the response. I don't think this is what I need. What I am looking for is if someone goes into the web console and for example disables check_disk check that we get notified that it was disabled.

Is there alternative way to have each unique login logged in the nagios.log when a service is disabled or anything done with the service?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Email notification when Disabling notification on servic

Post by mcapra »

Think you're going to need to write a script for this. There's nothing native to Nagios that would do this to my knowledge.
npolite wrote:Is there alternative way to have each unique login logged in the nagios.log when a service is disabled or anything done with the service?
log_external_commands can be set within your Nagios config file, but this only captures when commands (like "disable service notifications") are submit to the external commands file, not who submit them.
Former Nagios employee
https://www.mcapra.com/
npolite
Posts: 7
Joined: Fri Sep 02, 2016 9:39 am

Re: Email notification when Disabling notification on servic

Post by npolite »

Thanks mcapra. I had a feeling but wanted to confirm.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Email notification when Disabling notification on servic

Post by gormank »

Sorry to interrupt, but...
Where is the info on disabled notifications stored or logged? I was looking in the logs in /usr/local/nagios/var but see much. Maybe in the objects or status files?
Locked