summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/configs/CentOS/nagios.cfg19
-rw-r--r--manifests/init.pp13
2 files changed, 19 insertions, 13 deletions
diff --git a/files/configs/CentOS/nagios.cfg b/files/configs/CentOS/nagios.cfg
index 7027c90..d52a70c 100644
--- a/files/configs/CentOS/nagios.cfg
+++ b/files/configs/CentOS/nagios.cfg
@@ -30,11 +30,28 @@ log_file=/var/log/nagios/nagios.log
# This can be very useful if you want to keep command definitions
# separate from host and contact definitions...
+# legacy crap
+cfg_dir=/etc/nagios/legacy
+
# puppet: all paths are managed here:
+
+# all puppet native command paths
+cfg_file=/etc/nagios/nagios_command.cfg
+cfg_file=/etc/nagios/nagios_contact.cfg
+cfg_file=/etc/nagios/nagios_contactgroup.cfg
+cfg_file=/etc/nagios/nagios_host.cfg
+cfg_file=/etc/nagios/nagios_hostextinfo.cfg
+cfg_file=/etc/nagios/nagios_hostgroup.cfg
+cfg_file=/etc/nagios/nagios_hostgroupescalation.cfg
+cfg_file=/etc/nagios/nagios_service.cfg
+cfg_file=/etc/nagios/nagios_servicedependency.cfg
+cfg_file=/etc/nagios/nagios_serviceescalation.cfg
+cfg_file=/etc/nagios/nagios_serviceextinfo.cfg
+cfg_file=/etc/nagios/nagios_timeperdiod.cfg
cfg_file=/etc/nagios/puppet_cfgpaths.cfg
# Command definitions
-#cfg_file=/etc/nagios/commands.cfg
+cfg_file=/etc/nagios/commands.cfg
# Host and service definitions for monitoring this machine
#cfg_file=/etc/nagios/localhost.cfg
diff --git a/manifests/init.pp b/manifests/init.pp
index 1256e03..43afe09 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -42,8 +42,7 @@ class nagios::base {
notify => Service[nagios],
mode => 0755, owner => root, group => root;
}
- # this file should contain _only_ the nagios_puppet_template-path:
- # cfg_file=/etc/nagios/puppet_cfgpaths.cfg
+ # this file should contain all the nagios_puppet-paths:
file {nagios_main_cfg:
path => "/etc/nagios/nagios.cfg",
source => [ "puppet://$server/files/nagios/configs/${fqdn}/nagios.cfg",
@@ -54,16 +53,6 @@ class nagios::base {
notify => Service[nagios],
mode => 0644, owner => root, group => root;
}
- # here is this magic file containing all relevant paths
- file {nagios_puppet_cfg_paths:
- path => "/etc/nagios/puppet_cfgpaths.cfg",
- source => [ "puppet://$server/files/nagios/configs/${fqdn}/puppet_cfgpaths.cfg",
- "puppet://$server/files/nagios/configs/puppet_cfgpaths.cfg",
- "puppet://$server/nagios/configs/${operatingsystem}/puppet_cfgpaths.cfg",
- "puppet://$server/nagios/configs/puppet_cfgpaths.cfg" ],
- notify => Service[nagios],
- mode => 0644, owner => root, group => root;
- }
file { nagios_cgi_cfg:
path => "/etc/nagios/cgi.cfg",
source => [ "puppet://$server/files/nagios/configs/${fqdn}/cgi.cfg",