cd_apache::monitoring::target.pp
+Module name: cd_apache
+Author: Arne Teuke
+(arne_teuke@puppetsoft.com)
+License:
+ This file is part of cd_apache.
+
+
cd_apache is used for providing automatic configuration of
+ <service /
+purpose>
+ Copyright (C) 2014 PuppetSoft (copyright@puppetsoft.com)
+ This
+program is free software: you can redistribute it and/or modify
+ it under
+the terms of the GNU General Public License as published by
+ the Free
+Software Foundation, either version 3 of the License, or
+ (at your option)
+any later version.
+
+
This program is distributed in the hope that it will be useful,
+ but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY
+or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License
+for more details.
+
+
You should have received a copy of the GNU General Public License
+ along
+with this program. If not, see www.gnu.org/licenses/.
# File 'manifests/params.pp', line 59
class cd_apache::params (
@@ -474,6 +511,10 @@ $ae_manage_cfg = false,
$ae_manage_dirs = true,
$ae_allow_user_dirs = false,
+# nagios
+$ae_incl_target = true,
+$ae_target_service = '/etc/nagios/conf.d/httpd_service.cfg',
+
) {
# installation section
diff --git a/manifests/main/config.pp b/manifests/main/config.pp
index 4e18fcc..c23d2e7 100644
--- a/manifests/main/config.pp
+++ b/manifests/main/config.pp
@@ -26,5 +26,5 @@ class cd_apache::main::config (
) inherits cd_apache::params {
include cd_apache::server::service
-
+ include cd_apache::monitoring::target
}
diff --git a/manifests/monitoring/target.pp b/manifests/monitoring/target.pp
new file mode 100644
index 0000000..3ce65af
--- /dev/null
+++ b/manifests/monitoring/target.pp
@@ -0,0 +1,47 @@
+## cd_apache::monitoring::target.pp
+# Module name: cd_apache
+# Author: Arne Teuke (arne_teuke@puppetsoft.com)
+# License:
+# This file is part of cd_apache.
+#
+# cd_apache is used for providing automatic configuration of
+#
+# Copyright (C) 2014 PuppetSoft (copyright@puppetsoft.com)
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+# @summary class manages exports for nagios monitoring
+##############################################################################
+class cd_apache::monitoring::target (
+
+) inherits cd_apache::params {
+
+ case $ae_incl_target {
+
+ false: { notify {'Nagios Service target for check_httpd has been disabled via parameters / ENC override': }
+ }
+ default: {
+ @@nagios_service { "check_http_${::hostname}":
+ check_command => 'check_http',
+ use => 'generic-service',
+ host_name => $::fqdn,
+ notification_period => '24x7',
+ service_description => "${::hostname}_check_http",
+ target => $ae_target_service,
+ owner => 'nagios',
+ group => 'nagios',
+ mode => '6640',
+ contacts => 'ops',
+ }
+ }
+ }
+}
diff --git a/manifests/params.pp b/manifests/params.pp
index caee414..62ea1c6 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -54,6 +54,7 @@
# @param [boolean] ae_allow_user_dirs Whether or not to allow user directories
# should be allowed to share content through httpd. Usually this is a security
# problem and as such should be disabled.
+# @param [boolean] ae_incl_target whether or not to allow nagios monitoring.
##############################################################################
class cd_apache::params (
@@ -73,6 +74,10 @@ $ae_manage_cfg = false,
$ae_manage_dirs = true,
$ae_allow_user_dirs = false,
+# nagios
+$ae_incl_target = true,
+$ae_target_service = '/etc/nagios/conf.d/httpd_service.cfg',
+
) {
# installation section
diff --git a/tests/UTF_Files b/tests/UTF_Files
index 066e577..a138597 100644
--- a/tests/UTF_Files
+++ b/tests/UTF_Files
@@ -4,4 +4,3 @@
./.yardoc/objects/root.dat: data
./doc/css/style.css: HTML document, UTF-8 Unicode text, with very long lines
./doc/js/jquery.js: HTML document, UTF-8 Unicode text, with very long lines
-./REPOSTRUCTURE.md: very short file (no magic)