
A contact group will be defined by default in the
contacts.cfg
file.
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members admin1
}
5. Add as many members as needed.
Multiple contact groups can be defined if needed.
A contact is defined in this file by default.
define contact{
contact_name admin1 ; Short name of user
use generic-contact ; Inherit default values from generic-contact
template (defined above)
alias full name ; Full name of user
email [email protected] ; <<***** Change this to the required email
address *****
}
6. Updated the alias and Email as desired.
7. Save and quit the
contacts.cfg
file.
8. Open
localhost.cfg
and find the service that alerting needs to be set up for.
The following example shows how to set up the service for aggregate CPU usage.
define service{
use local-service
host_name localhost
service_description Aggregate CPU Stats
check_command check_cpu_aggr!0.5!0.8
notifications_enabled 1
notification_period 24x7
notification_options w,u,c,r,f
notification_interval 60
contact_groups admins
contacts admin1
}
9. Define the notification period, interval, options, the contact groups and contacts as desired.
For more information, refer to
https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3/html/
Console_Administration_Guide/Configuring_Nagios_to_Send_Mail_Notifications.html
10. Save and quit the
localhost.cfg
file.
11. Restart the Nagios service.
#
service nagios restart
12. Repeat this process for
node_services.cfg
file as well.
System Monitoring
S3016
75