How to setup a NOALERT Contact

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
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

How to setup a NOALERT Contact

Post by kwhogster »

Nagios 4.3.4
I am defining a service to check which will call a .sh file I wrote to schedule downtime..

I want to add the contact on the service so it will not send any alerts on this check.

So I created a noalerts contact

Code: Select all

define contact{
        contact_name                    noalerts
        alias                           Send No Alerts
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    c,r
        host_notification_options       d,r
        }
When I run the Nagios verify config I get these errors
/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg

Error: Contact 'noalerts' has no service notification commands defined!
Error: Contact 'noalerts' has no host notification commands defined!


I have other contacts with those two commands like below

service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email


I do not want to send notification at all for the service

Any ideas?

Thank you

Tom
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: How to setup a NOALERT Contact

Post by npolovenko »

Hello, @kwhogster. You can still include a notification command for the contact, but change the notification options to None.
host_notification_options n,
service_notification_options n,
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: How to setup a NOALERT Contact

Post by kwhogster »

Thanks
got this instead

Code: Select all

define contact{
        contact_name                    noalerts
        alias                           Send No Alerts
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    c,r
        host_notification_options       d,r
        service_notification_commands   n,
        host_notification_commands      n,
        }
Error: Service notification command 'n' specified for contact 'noalerts' is not defined anywhere!
Error: Host notification command 'n' specified for contact 'noalerts' is not defined anywhere!

Any ideas
kwhogster
Posts: 644
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA
Contact:

Re: How to setup a NOALERT Contact

Post by kwhogster »

OOPS

I misread your commands it was options not commands

Code: Select all

define contact{
        contact_name                    noalerts
        alias                           Send No Alerts
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    n,
        host_notification_options       n,
        service_notification_commands   notify-service-by-email
        host_notification_commands      notify-host-by-email
        }
Now this runs thru with non errors

Thank you

Tom

Please Lock this as resolved.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: How to setup a NOALERT Contact

Post by npolovenko »

@kwhogster, Glad this worked for you. Closing this thread as resolved.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked