Add email for every host
Posted: Wed Aug 13, 2014 4:23 am
Hi,
Can we add a diferrent contact email on alert server for every host ?
Thanks.
Can we add a diferrent contact email on alert server for every host ?
Thanks.
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
define host{
use some_template
host_name my.favorite.hostname
address 10.1.1.1
contact_groups group_1
}
define host{
use some_template
host_name my.other.hostname
address 10.1.1.2
contact_groups group_2
}
Code: Select all
define contact{
contact_name contact1
use some_template
email [email protected]
}
define contact{
contact_name contact2
use some_template
email [email protected]
}
define contactgroup{
contactgroup_name group_1
alias support team plus admins
members contact1, contact2
}
define contactgroup{
contactgroup_name group_2
alias just support team
members contact1
}
Code: Select all
define host{
use some_template
host_name my.favorite.hostname
address 10.1.1.1
contacts [email protected]
}No, this is not how Nagios works. An email address needs to be defined in a contact and the host config references the contact OR the contact group the contact is a member of.pianunix wrote:Can we just give like this for example in host.cfg ?