adds nagios target
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
|Repo Name| version | Build Status|
|
|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
|
### Synopsis
|
||||||
`Apache httpd` is a very powerful and widely used web server.
|
`Apache httpd` is a very powerful and widely used web server.
|
||||||
@@ -40,7 +40,7 @@ Configuration
|
|||||||
* file system permissions
|
* file system permissions
|
||||||
* selinux context
|
* selinux context
|
||||||
* manage firewall settings (optional)
|
* manage firewall settings (optional)
|
||||||
|
* manage nagios monitoring (optional)
|
||||||
Maintenance
|
Maintenance
|
||||||
* manage the service
|
* manage the service
|
||||||
|
|
||||||
|
|||||||
@@ -26,5 +26,5 @@ class cd_apache::main::config (
|
|||||||
) inherits cd_apache::params {
|
) inherits cd_apache::params {
|
||||||
|
|
||||||
include cd_apache::server::service
|
include cd_apache::server::service
|
||||||
|
include cd_apache::monitoring::target
|
||||||
}
|
}
|
||||||
|
|||||||
47
manifests/monitoring/target.pp
Normal file
47
manifests/monitoring/target.pp
Normal file
@@ -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
|
||||||
|
# <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 <http://www.gnu.org/licenses/>.
|
||||||
|
# @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',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -54,6 +54,7 @@
|
|||||||
# @param [boolean] ae_allow_user_dirs Whether or not to allow user directories
|
# @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
|
# should be allowed to share content through httpd. Usually this is a security
|
||||||
# problem and as such should be disabled.
|
# problem and as such should be disabled.
|
||||||
|
# @param [boolean] ae_incl_target whether or not to allow nagios monitoring.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class cd_apache::params (
|
class cd_apache::params (
|
||||||
|
|
||||||
@@ -73,6 +74,10 @@ $ae_manage_cfg = false,
|
|||||||
$ae_manage_dirs = true,
|
$ae_manage_dirs = true,
|
||||||
$ae_allow_user_dirs = false,
|
$ae_allow_user_dirs = false,
|
||||||
|
|
||||||
|
# nagios
|
||||||
|
$ae_incl_target = true,
|
||||||
|
$ae_target_service = '/etc/nagios/conf.d/httpd_service.cfg',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# installation section
|
# installation section
|
||||||
|
|||||||
Reference in New Issue
Block a user