Tip - Adding new users to get mail notifications


For those who want to add another user/users to get email notifications (for example other member in your team).
This is very simple (btw, it all happens in contacts.cfg).

  1. You should define a new contact:
    For example:

define contact{
contact_name new_user
alias New User
email newuser@localhost.localdomain

  1. You should add the new contact in the relevant contact group (for example admins) -> members attribute.
    For example:

define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members old_user, new_user (here you need to add your users to get notifications)

If you have any questions pls let me know.


I have tried this and can’t seem to get it work function. The notification works when it’s just the NagiosAdmin that was predefined in the contacts.cfg file. When I add a new contact and restart the services, I don’t get any errors. But the notifications stop working. When I remove it from the contacts.cfg file and restart, they work again. Do the contacts have to have actual accounts on the linux box? I’ve searched and haven’t found how to resolve the issue.