Question

In Nogios configurations, I have 2 contacts and 1 contact_group which just include 1 contact, like bellow:

define contact{
    contact_name one
}
define contact{
    contact_name two
}
define contactgroup{
    contactgroup_name admins
    members    one
}

I set my service like this

define service {
    name xxx-service
    ...
    contacts two
}

when the service trigger, I got two email one is from "one" the other one is from "two".

is there default contact_group or something make this happen? and how can I do to make it just send message to "two"?

Was it helpful?

Solution

The generic-service in Nagios has this setting in it:

define service{
    name                            generic-service
    contact_groups                  admins
    ; ... more stuff
}

So emails are sent to the admins group (for you it's contact one) AND to your contact two.

You need to create a new contact group for contact two and override the contact_groups in your service.

For example:

define contact{
    contact_name one
}
define contact{
    contact_name two
}

define contactgroup{
    contactgroup_name admins
    members    one
}

define contactgroup{
    contactgroup_name helpers
    members    two
}

define service {
    name xxx-service
    ...
    contact_group helpers
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top