Documentation by YARD 0.9.9
+Alphabetic Index
+ +Puppet Class Listing A-Z
+ + +
+
+
+
|
+
Defined Type Listing A-Z
+ + +
+
+
+
|
+
File Listing
+-
+
+
+
- README + + +
From 3a3e3ceef9a4a2f7051c17c29bd7e968cb4c564c Mon Sep 17 00:00:00 2001
From: Jenkins Server
+Changelog of Git Changelog.
+
+ Git Changelog changelog
+
+ Unreleased
+ No issue
+
+
+8db8758970310bf Arne Teuke 2017-07-20 13:31:19
+recommitting to see if git can be fixed
+
+
+
+
+
|
+
+
+
+
|
+
| t |
+ + + +23 +24 +25+ |
+
+ # File 'manifests/init.pp', line 23
+
+class cd_nagios {
+ include cd_nagios::params
+}
+ |
+
cd_nagios::firewall::iptables.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com) +License: + This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of + <service / +purpose> + Copyright (C) 2017 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57+ |
+
+ # File 'manifests/firewall/iptables.pp', line 24
+
+class cd_nagios::firewall::iptables (
+
+) inherits cd_nagios::params {
+
+ if $::fqdn == $ng_nagios_server {
+
+ if $ng_use_https != true {
+
+ firewall { "${ng_fw_order}${ng_http_port} port ${ng_http_port}":
+ proto => ['tcp','udp'],
+ dport => $ng_http_port,
+ action => 'accept',
+ }
+ }
+
+ if $ng_use_https == true {
+
+ firewall { "${ng_fw_order}${ng_https_port} port ${ng_https_port}":
+ proto => ['tcp','udp'],
+ dport => $ng_https_port,
+ action => 'accept',
+ }
+
+ if $ng_http_https_fw == true {
+
+ firewall { "${ng_fw_order}${ng_http_port} port ${ng_http_port}":
+ proto => ['tcp','udp'],
+ dport => $ng_http_port,
+ action => 'accept',
+ }
+ }
+ }
+ }
+}
+ |
+
cd_nagios::main::config.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46+ |
+
+ # File 'manifests/main/config.pp', line 24
+
+class cd_nagios::main::config (
+
+) inherits cd_nagios::params {
+
+ # manage server configuration
+
+ if $::fqdn == $ng_nagios_server {
+ include cd_nagios::server::service
+
+ if $ng_include_fw == true {
+ include cd_nagios::firewall::iptables
+ }
+
+ if $ng_use_selinux_tools == true {
+ include cd_nagios::selinux::config
+ }
+ }
+
+ if $::fqdn != $ng_nagios_server {
+ include cd_nagios::client::target
+ }
+
+}
+ |
+
cd_nagios::main::dirs.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios. + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186+ |
+
+ # File 'manifests/main/dirs.pp', line 23
+
+class cd_nagios::main::dirs (
+
+) inherits cd_nagios::params {
+
+ require cd_nagios::main::user
+
+ # main directory
+
+ file { $ng_main_dir:
+ ensure => directory,
+ path => $ng_main_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_etc_t,
+ seluser => system_u,
+ }
+
+ # /usr/lib64/nagios dir required for plugins
+
+ file { $ng_lib_dir:
+ ensure => directory,
+ path => $ng_lib_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => lib_t,
+ seluser => system_u,
+ }
+
+ # /var/spool/nagios
+
+ file { $ng_spool_dir:
+ ensure => directory,
+ path => $ng_spool_dir,
+ owner => $ng_user,
+ group => $ng_user,
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_spool_t,
+ seluser => system_u,
+ }
+
+
+ if $::fqdn == $ng_nagios_server {
+
+ # /etc/nagios/conf.d
+
+ file { $ng_conf_d_dir:
+ ensure => directory,
+ path => $ng_conf_d_dir,
+ owner => 'root',
+ group => $ng_user,
+ mode => '0750',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_etc_t,
+ seluser => system_u,
+ }
+
+ # /etc/nagios/objects
+
+ file { $ng_objects_dir:
+ ensure => directory,
+ path => $ng_objects_dir,
+ owner => 'root',
+ group => $ng_user,
+ mode => '0750',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_etc_t,
+ seluser => system_u,
+ }
+
+ # /etc/nagios/private
+
+ file { $ng_private_dir:
+ ensure => directory,
+ path => $ng_private_dir,
+ owner => 'root',
+ group => $ng_user,
+ mode => '0750',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_etc_t,
+ seluser => system_u,
+ }
+
+ # include dir
+
+ file { $ng_usr_incl:
+ ensure => directory,
+ path => $ng_usr_incl,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => usr_t,
+ seluser => system_u,
+ }
+
+ # log dir
+
+ file { $ng_log_dir:
+ ensure => directory,
+ path => $ng_log_dir,
+ owner => $ng_user,
+ group => $ng_user,
+ mode => '0750',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_log_t,
+ seluser => system_u,
+ }
+
+ # log archives
+
+ file { $ng_log_archives:
+ ensure => directory,
+ path => $ng_log_archives,
+ owner => $ng_user,
+ group => $ng_user,
+ mode => '0750',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_log_t,
+ seluser => system_u,
+ }
+
+ # /usr/share/nagios
+
+ file { $ng_usr_share:
+ ensure => directory,
+ path => $ng_usr_share,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => usr_t,
+ seluser => system_u,
+ }
+
+ # /usr/share/nagios/html
+
+ file { $ng_share_html:
+ ensure => directory,
+ path => $ng_share_html,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => usr_t,
+ seluser => system_u,
+ }
+ }
+}
+ |
+
cd_nagios::main::install.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios. + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70+ |
+
+ # File 'manifests/main/install.pp', line 24
+
+class cd_nagios::main::install (
+
+) inherits cd_nagios::params {
+
+ require cd_resources
+
+ # if our FQDN matches the configured Nagios server FQDN, install both server-
+ # and client packages.
+
+ if $::fqdn == $ng_nagios_server {
+
+ # we'll need httpd installed
+ require cd_apache
+
+ package {$reqpackages_server:
+ ensure => $pkg_ensure,
+ }
+ package {$reqpackages_client:
+ ensure => $pkg_ensure,
+ }
+
+ # install NRPE if enabled
+
+ if $ng_include_nrpe == true {
+
+ package {$reqpackages_nrpe:
+ ensure => $pkg_ensure,
+ }
+ }
+ }
+
+ # if we are not the nagios server, install client packages
+
+ if $::fqdn != $ng_nagios_server {
+ package {$reqpackages_client:
+ ensure => $pkg_ensure,
+ }
+
+ # if we want o use NRPE, install it
+
+ if $ng_include_nrpe == true {
+ package {$reqpackages_nrpe:
+ ensure => $pkg_ensure,
+ }
+ }
+ }
+}
+ |
+
cd_nagios::main::user.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52+ |
+
+ # File 'manifests/main/user.pp', line 23
+
+class cd_nagios::main::user (
+
+) inherits cd_nagios::params {
+
+ if $::fqdn == $ng_nagios_server {
+
+ require cd_nagios::main::install
+
+ group { $ng_user:
+ ensure => present,
+ name => $ng_user,
+ gid => $ng_u_uid,
+ allowdupe => false,
+ }
+
+ user { $ng_user:
+ ensure => present,
+ name => $ng_user,
+ allowdupe => false,
+ comment => $ng_u_comment,
+ uid => $ng_u_uid,
+ gid => $ng_user,
+ groups => $ng_u_groups,
+ managehome => true,
+ home => $ng_user_home,
+ shell => $ng_user_shell,
+ require => Group[$ng_user],
+ }
+ }
+}
+ |
+
cd_nagios::params.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios. + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/. + to connect +to NRPE, which as of now does not trust DNS names. Must be the + public +interface in case of NAT environments. +can issue host related commands. +can +issue service related commands.
+ +
+ + + +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347+ |
+
+ # File 'manifests/params.pp', line 198
+
+class cd_nagios::params (
+
+$pkg_ensure = 'latest',
+
+$ng_nagios_server = "nagios.${::domain}",
+$ng_nagios_ext_ip = undef,
+
+$ng_include_nrpe = true,
+
+# firewall
+$ng_include_fw = true,
+$ng_use_https = true,
+$ng_http_https_fw = true,
+$ng_fw_order = '50',
+$ng_http_port = '80',
+$ng_https_port = '443',
+
+# check command parameters
+## ping
+$ng_ping_warn = '100.0,20%',
+$ng_ping_crit = '500.0,60%',
+$ng_ping_ensure = 'present',
+## disk
+$ng_disk_warn = '20%',
+$ng_disk_crit = '10%' ,
+$ng_disk_ensure = 'present',
+# swap
+$ng_swap_warn = '20',
+$ng_swap_crit = '10',
+$ng_swap_ensure = 'present',
+# users
+$ng_users_warn = '20',
+$ng_users_crit = '50',
+$ng_users_ensure = 'present',
+#total procs
+$ng_procs_tot_warn = '330',
+$ng_procs_tot_crit = '400',
+$ng_procs_tot_param = 'RDST',
+$ng_procs_tot_ens = 'present',
+# zombie procs
+$ng_procs_z_warn = '10',
+$ng_procs_z_crit = '30',
+$ng_procs_z_param = 'Z',
+$ng_procs_z_ensure = 'present',
+# load
+$ng_load_warn = '5.00,4.00,3.00',
+$ng_load_crit = '10.00,6.00,4.00',
+$ng_load_ensure = 'present',
+
+# user settings
+$ng_user = 'nagios',
+$ng_u_comment = 'Nagios service user',
+$ng_u_uid = '1004',
+$ng_user_home = '/var/spool/nagios',
+$ng_u_groups = undef,
+$ng_user_shell = '/bin/bash',
+
+# cgi settings
+$ng_context_help = '1',
+$ng_pending_state = '1',
+$ng_use_auth = '1',
+$ng_use_ssl_auth = '0',
+$ng_enable_def_user = false,
+$ng_def_user_name = 'nagios_insecure',
+$ng_nagios_admin = 'nagios_sec_adm',
+$ng_sysinfo_auth = '',
+$ng_confinfo_auth = '',
+$ng_command_auth = '',
+$ng_hostview_auth = '',
+$ng_serviceview_auth = '',
+$ng_host_cmd_auth = '',
+$ng_svc_cmd_auth = '',
+$ng_readonly_auth = '' ,
+$ng_statusmap_img = 'smbackground.gd2',
+$ng_use_colormap = false,
+$ng_colormap_red = '255',
+$ng_colormap_green = '255',
+$ng_colormap_blue = '255',
+$ng_statusmap_layout = '6',
+$ng_wrl_layout = '4',
+$ng_incl_own_wrl = false,
+$ng_statuswrl_include = '',
+$ng_ping_syntax = '/bin/ping -n -U -c 5 $HOSTADDRESS$',
+$ng_refresh_rate = '90',
+$ng_result_limit = '100',
+$ng_escape_html = '1',
+$ng_use_sound = false,
+$ng_host_unreachable = 'hostdown.wav',
+$ng_host_down = 'hostdown.wav',
+$ng_svc_critical = 'critical.wav',
+$ng_svc_warn = 'warning.wav',
+$ng_svc_unknown = 'warning.wav',
+$ng_normal_sound = 'noproblem.wav',
+$ng_action_url_target = '_blank',
+$ng_notes_url_target = '_blank',
+$ng_lock_author_names = '1',
+$ng_enable_splunk = false,
+$ng_splunk_url = 'http://127.0.0.1:8000/',
+$ng_navbar_addresses = '1',
+$ng_navbar_aliases = '1',
+$ng_ack_no_sticky = '0',
+$ng_ack_no_send = '0',
+
+# selinux
+$ng_use_selinux_tools = true,
+
+) {
+
+# installation section
+
+ $reqpackages_server = $::operatingsystem ? {
+ /(?i-mx:centos|fedora|redhat)/ => ['nagios','nagios-devel']
+ }
+ $reqpackages_client = $::operatingsystem ? {
+ /(?i-mx:centos|fedora|redhat)/ => ['net-snmp-utils','nagios-plugins','nagios-plugins-all', 'nagios-plugins-nrpe', 'nagios-common']
+ }
+ $reqpackages_nrpe = $::operatingsystem ? {
+ /(?i-mx:centos|fedora|redhat)/ => ['nrpe']
+ }
+
+# service
+$ng_service = 'nagios'
+
+# directories
+$ng_main_dir = '/etc/nagios'
+$ng_conf_d_dir = "${ng_main_dir}/conf.d"
+$ng_objects_dir = "${ng_main_dir}/objects"
+$ng_private_dir = "${ng_main_dir}/private"
+$ng_usr_incl = '/usr/include/nagios'
+$ng_lib_dir = '/usr/lib64/nagios'
+$ng_log_dir = '/var/log/nagios'
+$ng_log_archives = "${ng_log_dir}/archives"
+$ng_spool_dir = '/var/spool/nagios'
+$ng_usr_share = '/usr/share/nagios'
+$ng_share_html = "${ng_usr_share}/html"
+
+# files
+$ng_main_config = "${ng_main_dir}/nagios.cfg"
+$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg"
+$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb'
+$ng_htpasswd_file = "${ng_main_dir}/passwd"
+$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
+$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
+$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
+
+# includes must be last
+
+ include cd_nagios::main::config
+
+}
+ |
+
cd_nagios::selinux::config.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47+ |
+
+ # File 'manifests/selinux/config.pp', line 24
+
+class cd_nagios::selinux::config (
+
+) inherits cd_nagios::params {
+
+ if $ng_use_selinux_tools == true {
+
+ # sealert 093d6a07-03f5-4457-abaa-e6592fb01e05
+ exec { 'create_policy_taccgi':
+ command => template($ng_taccgi_erb),
+ path => ['/usr/bin','/usr/sbin'],
+ cwd => '/tmp',
+ creates => '/tmp/my-taccgi',
+ notify => Exec['semodule_taccgi'],
+ }
+
+ exec { 'semodule_taccgi':
+ command => 'semodule -i my-taccgi.pp',
+ path => ['/usr/bin','/usr/sbin'],
+ cwd => '/tmp',
+ require => Exec['create_policy_taccgi'],
+ refreshonly => true,
+ }
+ }
+}
+ |
+
cd_nagios::server::access_rules.pp +Module name: cd_nagios +Author: Arne +Teuke (arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54+ |
+
+ # File 'manifests/server/access_rules.pp', line 28
+
+class cd_nagios::server::access_rules (
+
+) inherits cd_nagios::params {
+
+ if $::fqdn == $ng_nagios_server {
+
+ # manage /etc/nagios/htpasswd file
+
+ concat { $ng_htpasswd_file:
+ ensure => present,
+ path => $ng_htpasswd_file,
+ owner => 'root',
+ group => 'apache',
+ mode => '0640',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_etc_t,
+ seluser => system_u,
+ }
+
+ concat::fragment { 'create_header':
+ target => $ng_htpasswd_file,
+ content => template($ng_htpasswd_head),
+ notify => Service[$ng_service],
+ }
+ }
+}
+ |
+
cd_nagios::server::files.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50+ |
+
+ # File 'manifests/server/files.pp', line 23
+
+class cd_nagios::server::files (
+
+) inherits cd_nagios::params {
+
+ if $::fqdn == $ng_nagios_server {
+
+ require cd_nagios::main::dirs
+
+ # manage nagios.cfg
+
+
+ # manage cgi.cfg
+
+ file { $ng_cgi_cfg_file:
+ ensure => file,
+ path => $ng_cgi_cfg_file,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ selrange => s0,
+ selrole => object_r,
+ seltype => nagios_etc_t,
+ seluser => system_u,
+ content => template($ng_cgi_cfg_erb),
+ notify => Service[$ng_service],
+ }
+ }
+}
+ |
+
cd_nagios::server::service.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39+ |
+
+ # File 'manifests/server/service.pp', line 23
+
+class cd_nagios::server::service (
+
+) inherits cd_nagios::params {
+
+ if $::fqdn == $ng_nagios_server {
+
+ require cd_nagios::server::files
+ require cd_nagios::server::access_rules
+
+ service { $ng_service:
+ ensure => running,
+ hasstatus => true,
+ hasrestart => true,
+ enable => true,
+ }
+ }
+}
+ |
+
cd_nagios::server::access.pp +Module name: cd_nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com)
+ +This file is part of cd_nagios.
+ +cd_nagios is used for providing automatic configuration of Nagios + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41+ |
+
+ # File 'manifests/server/access.pp', line 23
+
+define cd_nagios::server::access (
+
+$ng_htpasswd_user = undef,
+$ng_htpasswd_password = undef,
+
+) {
+
+$ng_htpasswd_file = $::cd_nagios::params::ng_htpasswd_file
+$ng_htpasswd_rule = $::cd_nagios::params::ng_htpasswd_rule
+$ng_service = $::cd_nagios::params::ng_service
+
+ # create password rules
+
+ concat::fragment { $name:
+ target => $ng_htpasswd_file,
+ content => template($ng_htpasswd_rule),
+ notify => Service[$ng_service],
+ }
+}
+ |
+
-
+
# File 'manifests/server/access_rules.pp', line 28 @@ -189,6 +190,7 @@ class cd_nagios::server::access_rules ( selrole => object_r, seltype => nagios_etc_t, seluser => system_u, + notify => Service[$ng_service], } concat::fragment { 'create_header': @@ -205,7 +207,7 @@ class cd_nagios::server::access_rules ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html index c02ed79..4bfb3fd 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html @@ -196,7 +196,7 @@ class cd_nagios::server::files ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html index 94c88ce..f4568cc 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html @@ -174,7 +174,7 @@ class cd_nagios::server::service ( diff --git a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html index 38774d9..f052efb 100644 --- a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html +++ b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html @@ -169,8 +169,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. 37 38 39 -40 -41+40
# File 'manifests/server/access.pp', line 23
@@ -191,7 +190,6 @@ $ng_service = $::cd_nagios::params::ng_service
concat::fragment { $name:
target => $ng_htpasswd_file,
content => template($ng_htpasswd_rule),
- notify => Service[$ng_service],
}
}
+
+
+
# File 'manifests/server/access.pp', line 23
@@ -181,15 +186,20 @@ $ng_htpasswd_password = undef,
) {
+$ng_nagios_server = $::cd_nagios::params::ng_nagios_server
$ng_htpasswd_file = $::cd_nagios::params::ng_htpasswd_file
$ng_htpasswd_rule = $::cd_nagios::params::ng_htpasswd_rule
$ng_service = $::cd_nagios::params::ng_service
- # create password rules
- concat::fragment { $name:
- target => $ng_htpasswd_file,
- content => template($ng_htpasswd_rule),
+ if $::fqdn == $ng_nagios_server {
+
+ # create password rules
+
+ concat::fragment { $name:
+ target => $ng_htpasswd_file,
+ content => template($ng_htpasswd_rule),
+ }
}
}
+
+
# File 'manifests/params.pp', line 198 @@ -2122,6 +2123,7 @@ $ng_htpasswd_file = "${ng_main_dir}/passwd" $ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb' $ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb' $ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb' +$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb' # includes must be last @@ -2135,7 +2137,7 @@ $ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb' diff --git a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html index 3686949..a49032e 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html @@ -153,7 +153,25 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. 44 45 46 -47+47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65
# File 'manifests/selinux/config.pp', line 24
@@ -164,7 +182,7 @@ class cd_nagios::selinux::config (
if $ng_use_selinux_tools == true {
- # sealert 093d6a07-03f5-4457-abaa-e6592fb01e05
+ # sealert tac-cgi
exec { 'create_policy_taccgi':
command => template($ng_taccgi_erb),
path => ['/usr/bin','/usr/sbin'],
@@ -180,6 +198,24 @@ class cd_nagios::selinux::config (
require => Exec['create_policy_taccgi'],
refreshonly => true,
}
+
+ # sealert status.cgi
+
+ exec { 'create_policy_statuscgi':
+ command => template($ng_statcgi_erb),
+ path => ['/usr/bin','/usr/sbin'],
+ cwd => '/tmp',
+ creates => '/tmp/my-statuscgi.pp',
+ notify => Exec['semodule_taccgi'],
+ }
+
+ exec { 'semodule_statuscgi':
+ command => 'semodule -i my-statuscgi.pp',
+ path => ['/usr/bin','/usr/sbin'],
+ cwd => '/tmp',
+ require => Exec['create_policy_statuscgi'],
+ refreshonly => true,
+ }
}
}
+
+
+
+
+
# File 'manifests/selinux/config.pp', line 24
@@ -182,11 +194,22 @@ class cd_nagios::selinux::config (
if $ng_use_selinux_tools == true {
- # sealert tac-cgi
+ # it appears that selinux hehaves differently accross different nodes,
+ # so all we can do for now is to create a list of the AVC alerts and come up
+ # with a solution on that later.
+
+ exec { 'create_avc_list':
+ command => 'sealert -a /var/log/audit/audit.log > avc_alerts',
+ cwd => $ng_user_home,
+ path => ['/usr/bin'],
+ creates => "${ng_user_home}/avc_alerts",
+ }
+
+ # sealert tac-cgi
exec { 'create_policy_taccgi':
command => template($ng_taccgi_erb),
path => ['/usr/bin','/usr/sbin'],
- cwd => '/tmp',
+ cwd => $ng_user_home,
creates => '/tmp/my-taccgi.pp',
notify => Exec['semodule_taccgi'],
}
@@ -194,7 +217,7 @@ class cd_nagios::selinux::config (
exec { 'semodule_taccgi':
command => 'semodule -i my-taccgi.pp',
path => ['/usr/bin','/usr/sbin'],
- cwd => '/tmp',
+ cwd => $ng_user_home,
require => Exec['create_policy_taccgi'],
refreshonly => true,
}
@@ -204,7 +227,7 @@ class cd_nagios::selinux::config (
exec { 'create_policy_statuscgi':
command => template($ng_statcgi_erb),
path => ['/usr/bin','/usr/sbin'],
- cwd => '/tmp',
+ cwd => $ng_user_home,
creates => '/tmp/my-statuscgi.pp',
notify => Exec['semodule_taccgi'],
}
@@ -212,10 +235,11 @@ class cd_nagios::selinux::config (
exec { 'semodule_statuscgi':
command => 'semodule -i my-statuscgi.pp',
path => ['/usr/bin','/usr/sbin'],
- cwd => '/tmp',
+ cwd => $ng_user_home,
require => Exec['create_policy_statuscgi'],
refreshonly => true,
}
+
}
}
# File 'manifests/server/access_rules.pp', line 28
@@ -192,12 +186,6 @@ class cd_nagios::server::access_rules (
seluser => system_u,
notify => Service[$ng_service],
}
-
- concat::fragment { 'create_header':
- target => $ng_htpasswd_file,
- content => template($ng_htpasswd_head),
- notify => Service[$ng_service],
- }
}
}
+
+
+
# File 'manifests/selinux/config.pp', line 24
@@ -205,12 +204,12 @@ class cd_nagios::selinux::config (
creates => "${ng_user_home}/avc_alerts",
}
- # sealert tac-cgi
+ # sealert tac-cgi
exec { 'create_policy_taccgi':
command => template($ng_taccgi_erb),
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
- creates => '/tmp/my-taccgi.pp',
+ creates => "${ng_user_home}/my-taccgi.pp",
notify => Exec['semodule_taccgi'],
}
@@ -228,7 +227,7 @@ class cd_nagios::selinux::config (
command => template($ng_statcgi_erb),
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
- creates => '/tmp/my-statuscgi.pp',
+ creates => "${ng_user_home}/my-statuscgi.pp",
notify => Exec['semodule_taccgi'],
}
@@ -239,7 +238,6 @@ class cd_nagios::selinux::config (
require => Exec['create_policy_statuscgi'],
refreshonly => true,
}
-
}
}
+
+
+
+
|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_nagios| 0.0.0.6 | cd_nagios| 0.0.0.7 | {Build
Status/]|
|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_nagios| 0.0.0.6 | cd_nagios| 0.0.0.7 | {Build
Status/]|
Whether to enable selinux tools and policies. only effective if selinux is enabled.
+ + + + +Array of FQDNs for hosts which should be +allowed/required. every entry in +the array creates a new line in the +configuration file.
-198 -199 -200 201 202 203 @@ -1974,10 +1992,19 @@ enabled. 345 346 347 -348+348 +349 +350 +351 +352 +353 +354 +355 +356 +357
# File 'manifests/params.pp', line 198 +# File 'manifests/params.pp', line 201 class cd_nagios::params ( @@ -2085,6 +2112,9 @@ $ng_ack_no_send = '0', # selinux $ng_use_selinux_tools = true, +# httpd +$ng_required_hosts = [''], + ) { # installation section @@ -2100,30 +2130,33 @@ $ng_use_selinux_tools = true, } # service -$ng_service = 'nagios' +$ng_service = 'nagios' +$ae_service = 'httpd' # directories -$ng_main_dir = '/etc/nagios' -$ng_conf_d_dir = "${ng_main_dir}/conf.d" -$ng_objects_dir = "${ng_main_dir}/objects" -$ng_private_dir = "${ng_main_dir}/private" -$ng_usr_incl = '/usr/include/nagios' -$ng_lib_dir = '/usr/lib64/nagios' -$ng_log_dir = '/var/log/nagios' -$ng_log_archives = "${ng_log_dir}/archives" -$ng_spool_dir = '/var/spool/nagios' -$ng_usr_share = '/usr/share/nagios' -$ng_share_html = "${ng_usr_share}/html" +$ng_main_dir = '/etc/nagios' +$ng_conf_d_dir = "${ng_main_dir}/conf.d" +$ng_objects_dir = "${ng_main_dir}/objects" +$ng_private_dir = "${ng_main_dir}/private" +$ng_usr_incl = '/usr/include/nagios' +$ng_lib_dir = '/usr/lib64/nagios' +$ng_log_dir = '/var/log/nagios' +$ng_log_archives = "${ng_log_dir}/archives" +$ng_spool_dir = '/var/spool/nagios' +$ng_usr_share = '/usr/share/nagios' +$ng_share_html = "${ng_usr_share}/html" # files -$ng_main_config = "${ng_main_dir}/nagios.cfg" -$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg" -$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb' -$ng_htpasswd_file = "${ng_main_dir}/passwd" -$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb' -$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb' -$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb' -$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb' +$ng_main_config = "${ng_main_dir}/nagios.cfg" +$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg" +$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb' +$ng_htpasswd_file = "${ng_main_dir}/passwd" +$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb' +$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb' +$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb' +$ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb' +$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf' +$ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb' # includes must be last @@ -2137,7 +2170,7 @@ $ng_statcgi_erb = 'cd_nagios/selinux/statuscgi.erb' diff --git a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html index 8610ee7..9a1c57a 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html @@ -182,7 +182,8 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. 73 74 75 -76+76 +77
# File 'manifests/selinux/config.pp', line 24
@@ -218,7 +219,7 @@ class cd_nagios::selinux::config (
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
require => Exec['create_policy_taccgi'],
- refreshonly => true,
+ refreshonly => true,
}
# sealert status.cgi
@@ -236,7 +237,8 @@ class cd_nagios::selinux::config (
path => ['/usr/bin','/usr/sbin'],
cwd => $ng_user_home,
require => Exec['create_policy_statuscgi'],
- refreshonly => true,
+ refreshonly => true,
+ notify => Service[$ng_service],
}
}
}
@@ -247,7 +249,7 @@ class cd_nagios::selinux::config (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
index adff29d..a8c85c1 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html
@@ -195,7 +195,7 @@ class cd_nagios::server::access_rules (
diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
index 8cd4a6e..2298ca2 100644
--- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
+++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html
@@ -156,7 +156,23 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
47
48
49
-50
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
# File 'manifests/server/files.pp', line 23
@@ -187,6 +203,22 @@ class cd_nagios::server::files (
content => template($ng_cgi_cfg_erb),
notify => Service[$ng_service],
}
+
+ # manage nagios.conf for httpd
+
+ file { $ng_nagios_conf:
+ ensure => file,
+ path => $ng_nagios_conf,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ selrange => s0,
+ selrole => object_r,
+ seltype => httpd_config_t,
+ seluser => system_u,
+ content => template($ng_nagios_conf_erb),
+ notify => Service[$ae_service],
+ }
}
}
+
+
+
-
-
+
+
+
+
+
+
+
@@ -42,11 +87,6 @@ Changelog of Git Changelog.
-
@@ -67,21 +107,11 @@ Changelog of Git Changelog.
-
-
@@ -92,11 +122,6 @@ Changelog of Git Changelog.
-
diff --git a/doc/_index.html b/doc/_index.html index d2e63bd..4660179 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -73,6 +73,11 @@ +
cd_nagios::client::target.pp +Module name: nagios +Author: Arne Teuke +(arne_teuke@ConfDroid.com) +License: + This file is part of nagios.
+ +nagios is used for providing automatic configuration of Nagios targets. + +Copyright (C) 2016 ConfDroid (copyright@ConfDroid.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/.
+ +
+ + + +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137+ |
+
+ # File 'manifests/client/target.pp', line 23
+
+class cd_nagios::client::target (
+
+
+) inherits cd_nagios::params {
+
+ if $::fqdn != $ng_nagios_server {
+
+ @@nagios_host { $::fqdn:
+ ensure => $ng_ping_ensure,
+ alias => $::hostname,
+ address => $::fqdn,
+ use => 'linux-server',
+ target => $ng_target_host,
+ hostgroups => 'linux-servers',
+ contacts => 'ops',
+ max_check_attempts => $max_check_attempts,
+ notification_period => '24x7',
+ owner => 'nagios',
+ group => 'nagios',
+ mode => '0664',
+ check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
+ notify => Service['nagios'],
+ }
+
+ @@nagios_service { "root_partition_${::hostname}":
+ ensure => $ng_disk_ensure,
+ check_command => "check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/",
+ use => 'generic-service',
+ host_name => $::fqdn,
+ contacts => 'ops',
+ notification_period => '24x7',
+ service_description => "${::hostname}_root_partition",
+ servicegroups => 'linux-services',
+ target => $ng_target_service,
+ owner => 'nagios',
+ group => 'nagios',
+ mode => '0664',
+ }
+
+ @@nagios_service { "Swap_Usage_${::hostname}":
+ ensure => $ng_swap_ensure,
+ check_command => "check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}",
+ use => 'generic-service',
+ host_name => $::fqdn,
+ contacts => 'ops',
+ notification_period => '24x7',
+ service_description => "${::hostname}_swap_usage",
+ servicegroups => 'linux-services',
+ target => $ng_target_service,
+ owner => 'nagios',
+ group => 'nagios',
+ mode => '0664',
+ }
+
+ @@nagios_service { "Local_Users_${::hostname}":
+ ensure => $ng_users_ensure,
+ check_command => "check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}",
+ use => 'generic-service',
+ host_name => $::fqdn,
+ contacts => 'ops',
+ notification_period => '24x7',
+ service_description => "${::hostname}_local_users",
+ servicegroups => 'linux-services',
+ target => $ng_target_service,
+ owner => 'nagios',
+ group => 'nagios',
+ mode => '0664',
+ }
+
+ @@nagios_service { "Total Processes_${::hostname}":
+ ensure => $ng_procs_tot_ens,
+ check_command => "check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}",
+ use => 'generic-service',
+ host_name => $::fqdn,
+ contacts => 'ops',
+ notification_period => '24x7',
+ service_description => "${::hostname}_total_processes",
+ servicegroups => 'linux-services',
+ target => $ng_target_service,
+ owner => 'nagios',
+ group => 'nagios',
+ mode => '0664',
+ }
+
+ @@nagios_service { "Zombie Processes_${::hostname}":
+ ensure => $ng_procs_z_ensure,
+ check_command => "check_nrpe!check_procs!${ng_procs_z_warn}!${ng_procs_z_crit}!${ng_procs_z_param}",
+ use => 'generic-service',
+ host_name => $::fqdn,
+ contacts => 'ops',
+ notification_period => '24x7',
+ service_description => "${::hostname}_zombie_processes",
+ servicegroups => 'linux-services',
+ target => $ng_target_service,
+ owner => 'nagios',
+ group => 'nagios',
+ mode => '0664',
+ }
+
+ @@nagios_service { "Current_Load_${::hostname}":
+ ensure => $ng_load_ensure,
+ check_command => "check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}",
+ use => 'generic-service',
+ host_name => $::fqdn,
+ contacts => 'ops',
+ notification_period => '24x7',
+ service_description => "${::hostname}_current_load",
+ servicegroups => 'linux-services',
+ target => $ng_target_service,
+ owner => 'nagios',
+ group => 'nagios',
+ mode => '0664',
+ }
+ }
+}
+ |
+
Array of FQDNs for hosts which should be -allowed/required. every entry in -the array creates a new line in the -configuration file.
+Array of FQDNs for hosts which +should be allowed/required. +every entry in the array creates a new line in +the configuration file.
+Array of <b>_<em>Ip addresses __** for hosts which +should be +allowed/reqired. every entry in the array creates a new line in +the +configuration fileIp addresses _</em></b> for hosts +which +should be allowed/reqired. every entry in the array creates a new +line in +the configuration file
-201 -202 -203 204 205 206 @@ -2001,10 +2026,14 @@ configuration file. 354 355 356 -357+357 +358 +359 +360 +361
# File 'manifests/params.pp', line 201 +# File 'manifests/params.pp', line 204 class cd_nagios::params ( @@ -2114,6 +2143,7 @@ $ng_use_selinux_tools = true, # httpd $ng_required_hosts = [''], +$ng_required_ips = ['127.0.0.0/8'], ) { @@ -2170,7 +2200,7 @@ $ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb' diff --git a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html index 9a1c57a..fb9a47e 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html @@ -249,7 +249,7 @@ class cd_nagios::selinux::config ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html index a8c85c1..f41565e 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html @@ -195,7 +195,7 @@ class cd_nagios::server::access_rules ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html index 2298ca2..1df61f4 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html @@ -228,7 +228,7 @@ class cd_nagios::server::files ( diff --git a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html index 479b7a6..ada8a07 100644 --- a/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html +++ b/doc/puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html @@ -174,7 +174,7 @@ class cd_nagios::server::service ( diff --git a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html index ca1b1b1..e3f13f8 100644 --- a/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html +++ b/doc/puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html @@ -121,12 +121,17 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. ng_htpasswd_user - (Any) + (string) (defaults to: undef) + — +++user name for the /etc/nagios/passwd file
+
the encrypted password for the +/etc/nagios/passwd file.
+-23 -24 -25 26 27 28 @@ -174,10 +182,13 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. 42 43 44 -45+45 +46 +47 +48
# File 'manifests/server/access.pp', line 23 +# File 'manifests/server/access.pp', line 26 define cd_nagios::server::access ( @@ -209,7 +220,7 @@ $ng_service = $::cd_nagios::params::ng_service diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 807736a..b3b4867 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@