Book Image

Learning Nagios 4

By : Wojciech Kocjan
Book Image

Learning Nagios 4

By: Wojciech Kocjan

Overview of this book

Table of Contents (19 chapters)
Learning Nagios 4
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Configuring Nagios


Nagios stores it's configuration in a separate directory. Usually it's either in /etc/nagios or /usr/local/etc/nagios. If you followed the steps for manual installation, it's in /etc/nagios. We will now configure Nagios so that it is ready for use. While it will not be easy to check the results right away, we will verify that the configuration itself is valid. Chapter 3, Using the Nagios Web Interface, talks about setting up the Nagios web interface, which will allow us to check the status of the host and services that we will create in this section.

Creating the main configuration file

The main configuration file is called nagios.cfg, and it 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 of <parameter>=<value> set a value. In some cases, a value might be repeated (like specifying additional files/directories to read). The following is a sample of the Nagios main configuration...