From e68298bc5c126fcc6f390a23e805498f8f1e8945 Mon Sep 17 00:00:00 2001
From: Arne Teuke
Date: Fri, 20 Apr 2018 10:06:12 +0200
Subject: [PATCH 1/2] adds nagios target
---
README.md | 4 +--
manifests/main/config.pp | 2 +-
manifests/monitoring/target.pp | 47 ++++++++++++++++++++++++++++++++++
manifests/params.pp | 5 ++++
4 files changed, 55 insertions(+), 3 deletions(-)
create mode 100644 manifests/monitoring/target.pp
diff --git a/README.md b/README.md
index 3001aa3..bcd7bf5 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
|Repo Name| version | Build Status|
|---|---|---|---|
-|`cd_apache`| 0.0.1.7 | [](https://pipelines.confdroid.com/job/cd_apache/)|
+|`cd_apache`| 0.0.1.8 | [](https://pipelines.confdroid.com/job/cd_apache/)|
### Synopsis
`Apache httpd` is a very powerful and widely used web server.
@@ -40,7 +40,7 @@ Configuration
* file system permissions
* selinux context
* manage firewall settings (optional)
-
+* manage nagios monitoring (optional)
Maintenance
* manage the service
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
From 0ea5a3a76907b0943b6047eab0e903df36cdaa81 Mon Sep 17 00:00:00 2001
From: Jenkins ConfDroid
Date: Fri, 20 Apr 2018 10:06:28 +0200
Subject: [PATCH 2/2] recommit for updates in build 4
---
CHANGELOG.md | 10 +
REPOSTRUCTURE.md | 58 ++++++
doc/_index.html | 5 +
doc/file.README.html | 12 +-
doc/index.html | 12 +-
doc/puppet_class_list.html | 19 +-
.../cd_apache_3A_3Amain_3A_3Aconfig.html | 2 +-
...cd_apache_3A_3Amonitoring_3A_3Atarget.html | 195 ++++++++++++++++++
doc/puppet_classes/cd_apache_3A_3Aparams.html | 47 ++++-
tests/UTF_Files | 1 -
10 files changed, 340 insertions(+), 21 deletions(-)
create mode 100644 doc/puppet_classes/cd_apache_3A_3Amonitoring_3A_3Atarget.html
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8207a98..48001be 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,16 @@ Changelog of Git Changelog.
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/.