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 3, Configuring Nagios, 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 3, Configuring Nagios, 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 (http://www.git-scm.com/), Mercurial (Hg, http://mercurial.selenic.com/) or Subversion (SVN, http://subversion.tigris.org/) to store your Nagios...