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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
eclypse
Posts: 50
Joined: Thu Dec 01, 2011 4:55 pm

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

Post 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
        }
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
eclypse
Posts: 50
Joined: Thu Dec 01, 2011 4:55 pm

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

Post 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.
Locked