Jump to content

Nagios different FROM address for different alerts


Recommended Posts

Posted

Hi There,

 

In Nagios is there a way to set different emails for different hosts??

 

So if something belongs to the company test then can the email be sent from nagios@test

 

Or if something belongs to the company hello then can the email be sent from nagios@hello

 

Thanks....PK

Posted (edited)

Yes.

 

Look at contacts and contact groups. (contacts.cfg)

 

i.e

define contact {
         contact_name       testcompanynagios
         use                      generic-contact
         alias                     Test Company Nagios
         email                    [email protected]
         }

 

define contactgroup {
         contactgroup_name    testcompany
         alias                          Test Company Nagios People
         members                   testcompanynagios

 

The latter contactgroup can be used to send the alerts to multiple people - use a group rather than setting multiple individual contacts on a service/host because it makes for tidy config files.

 

Then on a host or service, use:

contact_groups                   testcompany, othergroup, nextgroup

 

to suit.

Edited by pete

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...