Page 1 of 1

"nagiosadmin" gets alerts for all services on "localhost"

Posted: Mon Oct 21, 2013 1:28 pm
by eclypse
I noticed that for the "localhost", any service alerts are sent to the email address listed for the Nagios administrator account. Is there any way to prevent certain service alerts from being sent to the administrator?

I don't understand how or where to change this, as the service in question does not list the nagios administrator as a contact in services.cfg.

For example, if I didn't want this service to alert the administrator, but instead, some other contact, how would I change this:

Code: Select all

define service {
        host_name                       localhost
        service_description             Swap Usage
        use                             local-service
        check_command                   check_local_swap!20!10!!!!!!
        notification_interval           0
        notifications_enabled           1
        contacts                        someone-else
        register                        1
        }

Re: "nagiosadmin" gets alerts for all services on "localhost

Posted: Mon Oct 21, 2013 1:46 pm
by abrist
To disable the admin from receiving alerts, remove "nagiosadmin" from the host's (localhost) contact list. To make a new contact for the host and all it's services, add the contact to the host definition. To make the new contact only receive alerts for certain services on localhost, make them just a contact on the desired services, but not on the host.

Re: "nagiosadmin" gets alerts for all services on "localhost

Posted: Mon Oct 21, 2013 1:47 pm
by eclypse
After posting, I realized that "localhost" was a member of the "linux-server" hostgroup, of which "admins" was specified as a contact. That explains why. This thread can be closed.