Book Image

Learning Nagios 3.0

Book Image

Learning Nagios 3.0

Overview of this book

Table of Contents (16 chapters)
Learning Nagios 3.0
Credits
About the Author
About the Reviewer
Preface

Nagios Configuration


Nagios stores its configuration in a separate directory. Usually it's either in /etc/nagios or /usr/local/etc/nagios. If you followed the steps for a manual installation, (as described above) it would be in /etc/nagios.

Main Configuration File

The main configuration file is called nagios.cfg, which is the main file that is loaded during Nagios startup. Its syntax is simple — a line beginning with # is a comment, and all lines in the form<parameter>=<value> will set a value. In some cases, a value might be repeated (such as specifying additional files/directories to read).

The following is a sample of Nagios's main configuration file:

# log file to use
log_file=/var/nagios/nagios.log
# object configuration directory
cfg_dir=/etc/nagios/objects
# storage information
resource_file=/etc/nagios/resource.cfg
status_file=/var/nagios/status.dat
status_update_interval=10
(...)

The main configuration file needs to define a log file to use, and that has to be passed as...