1. Edit the configuration file
Vim/etc/nagios/objects/contacts.cfg
Add the following content:
Define Contactgroup{
Contactgroup_name Admins
Alias Nagios Administraators
Members NAGIOSADMIN,DD
}
Define Contact{
Contact_Name 123
Use Generic-contact
Alias DD
email [email protected]
}
Define Contact{
Contact_Name 456
Use Generic-contact
Alias TT
email [email protected]
}
Define Contactgroup{
Contactgroup_name Common
Alias Common
Members 123,456
}
2, let who alarm, in/etc/nagios/conf.d/192.168.81.132.cfg
The service that specifies the alert for the message.
such as: adding Contact_groups common to the Check_load
3, (2) can be added to the parameters:
Notification_enabled 0/1 whether to turn on the reminder function
Notification_period 24x7 means sending reminders to work hours
A very important host (service) is defined as a 24x7
A typical host (service) is defined as working hours
Notification_options W,u,c,r represents the status of the service.
4. Restart the Nagios service after editing the file. Service Nagios Restart
Nagios Configuring Mail Alerts