
3. Switch to the
/usr/local/nagios/etc
directory.
#
cd /usr/local/nagios/etc
4. Use an editor to modify the
nagios.cfg
configuration file as desired.
●
Locate the line
log_file=/usr/local/nagios/var/nagios.log
This line specifies the default path
to the log file. Modify the path as desired.
●
Locate the line
log_rotation_method=d
. This line specifies the rotation interval.
d
stands for daily.
Modify this line as desired. The other options are defined in the comments block above it.
●
Locate the line
log_archive_path=/usr/local/nagios/var/archives
. This is where rotated log
files are archived. Modify the path as desired.
5. Save and quit the
nagios.cfg
file.
6. Restart the Nagios service.
#
service nagios restart
4.2.4
Configure Email Alerts
Prerequisites
This procedure requires root privileges.
About this task
This procedure provides instructions for updating certain Nagios configuration files for configuring alerts.
Specifically, it describes how to modify the
contacts.cfg
file to update and define a list of contacts for sending
Email alerts to. In addition, it describes how to modify the
localhost.cfg
and
node_services.cfg
files to
configure alerts for services running on nodes.
Procedure
1. Log in to the SMW as root.
#
ssh root@machine-smw
2. Stop the Nagios service if it is running.
#
service nagios stop
3. Switch to the
/usr/local/nagios/etc/objects
directory.
#
cd /usr/local/nagios/etc
4. Use an editor to modify the
contacts.cfg
configuration file as desired.
System Monitoring
S3016
74