This module provides you with some deployment possibilities.
We hope its usefully and will also help you, to bring the nagios configuration easy to its location.
To bring the configuration to your Nagios, you first have to generate the configuration.
Until 1.2.6 you had to move the files by yourself.
Now, since NConf version 1.3, we provide the “deployment” module which can help you doing deployment right from the NConf GUI.
Until now we support following deployment modules:
The configuration for the deployment is done in the
Some examples are included in the
Copy this to
config/deployment.ini and remove the semicolons ”;” of the section you want to activate.
Be sure to use correct path's with appropriate permissions (for webserver)
For more details read the whole documentation.
If you have updated from a previous NConf version, you can read this part to migrate/setup your basic deployment.
If you made a more complex deployment, or want to know more about which type of deployment are available, please refer to the section below : Types.
an example from the old config to the new one:
old config in
define('CONF_DEPLOY_URL', "https://webserver.mydomain.com/incoming_config.php"); define('CONF_DEPLOY_USER', "deployUser"); define('CONF_DEPLOY_PWD', "deployPass");
new config in
[webserver mydomain.com] type = https source_file = "/var/www/nconf/output/NagiosConfig.tgz" host = "https://webserver.mydomain.com/incoming_config.php" user = "deployUser" password = "deployPass"
How to read the information
[bracket text will be the title] ...
[some bracket text] title = "this will be the title" ...
We have implemented the possibility to set a command for restarting nagios.
Nevertheless you have to configure your system that its possible to do this.
That means you have to grant permissions for the webserver user(mostly apache) to execute your specified command like restarting nagios.
Most system administrators (you) should know how to configure that for their systems. We will show you a possible way here:
sudo allows a permitted user to execute a command as the superuser or another user.
So we could add the apache user to the sudoers list with the appropriate command.
Here we also set the NOPASSWD option
apache ALL=NOPASSWD: /etc/rc.d/init.d/nagios reload
Now it is possible for the user apache to restart nagios right in the deployment.
Allow apache to run things as user “nagios”:
apache ALL = (nagios) NOPASSWD: /your/comand...
Then you can set the
reload_command to something like this:
reload_command = "/usr/bin/sudo -u nagios /your/comand..."
If you have troubles, check if permissions are set correct for the
you could also set permissions on the nagios binary which can restart it.
Here we show you some configurations which could be useful for you.
first extract files to local existing directory:
[local deploy extract] type = local source_file = "/var/www/nconf/output/NagiosConfig.tgz" target_file = "/tmp/nagios_config/" action = extract
now copy all these files with scp to other server
[scp dummy-host] type = scp host = "dummy-host" source_file = "/tmp/nagios_config/" target_file = "~" user = dummy-user identity_file = "id_dsa" ssh_options = " -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 15'"
Now the files should be copied to your server.
If you want to make other deployment modules, contact us. You could also just try it out with an existing one.