Keeping configuration under version control
In this recipe, we'll place a Nagios Core configuration directory under version control, in an attempt to keep track of changes made to it, and to enable us to reverse changes if there are problems.
Getting ready
You should choose an appropriate version control system. The recipe will vary considerably depending on which system you use; there are too many options to demonstrate here, so we'll use the popular open source content tracker Git, the basics of which are very easy to use for this kind of version control and do not require an external server. However, there's no reason you can't use Subversion or Mercurial, if you'd prefer. You should have the client for your chosen system (git
, hg
, svn
, and so on) installed on your server.
This will all work with any version of Nagios Core. It does not involve directly changing any part of the Nagios Core configuration, only keeping track of the files in it.
How to do it...
We can place our configuration...