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 the file structure


A very important issue is how to store all our configuration files. We can put every object definition in a single file, but this will not make it easy to manage. As mentioned in Chapter 2, Installing Nagios 4, it is recommended to store different types of objects in separate folders.

Assuming your Nagios configuration is in /etc/nagios, it is recommended that you create folders for all types of objects in the following manner:

/etc/nagios/commands
/etc/nagios/timeperiods
/etc/nagios/contacts
/etc/nagios/hosts
/etc/nagios/services

Of course, these files will need to be added to the nagios.cfg file. After having followed the instructions in Chapter 2, Installing Nagios 4, these directories should already be added to our main Nagios configuration file.

It would also be worthwhile to use a version control mechanism such as Git (visit http://www.git-scm.com/), Hg (Mercurial, visit http://mercurial.selenic.com/) or SVN (Subversion, visit http://subversion.tigris...