OP#407 initial commit with reset

This commit is contained in:
12ww1160
2026-02-02 23:38:50 +01:00
parent 9998e83e79
commit e35b61e131
115 changed files with 67 additions and 20933 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
Gemfile.lock
FileList
.scannerwork
.vscode

34
Jenkinsfile vendored
View File

@@ -69,7 +69,7 @@ pipeline {
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
sh '''
/opt/sonar-scanner/bin/sonar-scanner \
-Dsonar.projectKey=cd_nagios \
-Dsonar.projectKey=confdroid_nagios \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarqube.confdroid.com \
-Dsonar.token=$SONAR_TOKEN
@@ -90,13 +90,33 @@ pipeline {
sh '''
git config user.name "Jenkins Server"
git config user.email jenkins@confdroid.com
git rm -r --cached .vscode || echo "No .vscode to remove from git"
git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit"
git push -o merge_request.create \
-o merge_request.target=master \
-o merge_request.title="Auto-merge for build $BUILD_NUMBER" \
-o merge_request.description="Automated changes from Jenkins build $BUILD_NUMBER" \
-o merge_request.merge_when_pipeline_succeeds=true \
origin jenkins-build-$BUILD_NUMBER
git push origin HEAD:master
'''
}
}
}
stage('Mirror to Gitea') {
steps {
withCredentials([usernamePassword(
credentialsId: 'Jenkins-gitea',
usernameVariable: 'GITEA_USER',
passwordVariable: 'GITEA_TOKEN')]) {
script {
// Checkout from GitLab (already done implicitly)
sh '''
git checkout master
git pull origin master
git branch -D development
git branch -D jenkins-build-$BUILD_NUMBER
git rm -f Jenkinsfile
git rm -r --cached .vscode || echo "No .vscode to remove from git"
git commit --amend --no-edit --allow-empty
git remote add master https://gitea.confdroid.com/confdroid/confdroid_nagios.git
git -c credential.helper="!f() { echo username=${GITEA_USER}; echo password=${GITEA_TOKEN}; }; f" \
push master --mirror
'''
}
}

104
README.md
View File

@@ -1,14 +1,27 @@
# Readme
[![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios)](https://jenkins.confdroid.com/job/cd_nagios/)
[[_TOC_]]
- [Readme](#readme)
- [Synopsis](#synopsis)
- [WARNING](#warning)
- [Features](#features)
- [Repo Documentation](#repo-documentation)
- [Dependencies](#dependencies)
- [Deployment](#deployment)
- [PuppetDB](#puppetdb)
- [SELINUX](#selinux)
- [Support](#support)
- [Tests](#tests)
- [Contact Us](#contact-us)
- [Disclaimer](#disclaimer)
## Synopsis
Nagios is a powerful open source software solution for monitoring your IT environments.
`cd_nagios` is a Puppet module allowing to fully automate the setup & configuration of the Nagios server, as well as actively adding client hosts and services to the monitoring environment through defines and `PuppetDB`.
`confdroid_nagios` is a Puppet module allowing to fully automate the setup & configuration of the Nagios server, as well as actively adding client hosts and services to the monitoring environment through defines and `PuppetDB`.
## WARNING
@@ -16,54 +29,6 @@ Nagios is a powerful open source software solution for monitoring your IT enviro
## Features
Installation:
* Nagios Server instance:
* install httpd via cd_apache
* install Nagios server binaries on Nagios server
* Nagios clients:
* install client binaries like nagios plugins etc.
* include NRPE via `cd_nrpe` (optional)
Configuration
* configure all aspects of Nagios on server
* manage nagios service user
* manage directories (filesystem permissions, selinux )
* manage `cgi.cfg` through parameters
* manage `nagios.cfg` through parameters
* manage Nagios users through external Puppet rules via define
* manage Nagios commands through Puppet exports
* manage Nagios template definitions through external Puppet rules via define
* manage Nagios main contacts through Puppet exports. Additional contacts can be created through external Puppet rules via define, to avoid having to alter the module code.
* manage Nagios main contact groups through Puppet exports. Additional contact groups can be created through external Puppet rules via define, to avoid having to alter the module code.
* manage Nagios main host groups through Puppet exports. Additional host groups can be created through external Puppet rules via define, to avoid having to alter the module code.
* manage Nagios main service groups through Puppet exports. Additional service groups can be created through external Puppet rules via define, to avoid having to alter the module code.
* manage Nagios main time periods through Puppet exports. Additional time periods can be created through external Puppet rules via define, to avoid having to alter the module code.
* configure firewall (optional)
* configure selinux policies (optional)
* configure forwarding http to https (optional)
* manage TLS certificates through certbot (optional)
* manage `$user$` arguments in resource file via define
Service
* manage Nagios service on server
Monitoring
* monitor Nagios host
* monitor Nagios service
* monitor clients:
* ping
* root partition
* swap usage
* logged-in local users
* amount of total processes
* amount of zombie processes
* current Load
## Repo Documentation
See the full Puppet documentation including parameters in `docs/index.html`
@@ -72,14 +37,7 @@ See the full Puppet documentation including parameters in `docs/index.html`
All dependencies must be included in the catalogue.
* [cd_resources](https://gitlab.confdroid.com/puppet/cd_resources) for Yum repos.
* [cd_apache](https://gitlab.confdroid.com/puppet/cd_apache) for installing httpd
* [cd_firewall](https://gitlab.confdroid.com/puppet/cd_firewall) or [puppetlabs firewall](https://github.com/puppetlabs/puppetlabs-firewall) (optional)
* [cd_selinux](https://gitlab.confdroid.com/puppet/cd_selinux) for selinux policy adjustments
* [cd_certbot](https://gitlab.confdroid.com/puppet/cd_certbot) to auto-manage TLS certificates (optional)
* [cd_nrpe](https://gitlab.confdroid.com/puppet/cd_nrpe) to manage NRPE (optional)
* [cd_stdlib](https://gitlab.confdroid.com/puppet/cd_stdlib) or [puppetlabs stdlib](https://github.com/puppetlabs/puppetlabs-stdlib) to facilitate concat
* [cd_concat](https://gitlab.confdroid.com/puppet/cd_stdlib) or [puppetlabs concat](https://github.com/puppetlabs/puppetlabs-concat) to concatenate configuration files from different sources.
## Deployment
@@ -89,13 +47,13 @@ via site.pp or nodes.pp
```ruby
node 'example.example.net' {
include cd_nagios
include confdroid_nagios
}
```
* through Foreman:
In order to apply parameters through Foreman, **__cd_nagios::params__** must be added to the host or host group in question.
In order to apply parameters through Foreman, **__confdroid_nagios::params__** must be added to the host or host group in question.
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
@@ -107,29 +65,10 @@ A working instance of PuppetDB connected to the Puppet master is required for th
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
## Certbot
This module can optionally setup [certbot](https://certbot.eff.org/) TLS certificate management for the front-end GUI. In order to do so, set `$ng_enable_certbot` as well as `$ng_use_https` to `true` (default). Effectively, this will manage the certs before even installing Nagios, so there will be no problems with the Nagios showing up with a self-signed certificate. Once enabled, the module will go and try to obtain a certificate automatically. For this to work, you need to have proper DNS resolution set up for your domain / nagios server. Certs are also automatically renewed.
If you prefer to use https but use self-signed certs or your own CA, simply set to false. This will point the SSL vhost config file to the default location for TLS certificates.
## httpd vHost files
by default, Nagios creates its own `nagios.conf` file, which is not a vhost file and relies on the main `ssl.conf`. However, as Nagios might be running on a regular web server with various other web instances (not recommended through for performance reasons), we do not want to manage `ssl.conf` directly, hence the module creates a vhost for the SSL host.
## Client Connections
In order to monitor clients, NAGIOS must be able to connect to them. There are multiple ways of doing so, the most common ones being NRPE and SSH.
So far this module works through the usage of NRPE, which by default is enabled. Class cd_nagios::client::nrpe configures `nrpe.cfg` and opens the required firewall port on clients (optional,default).
## Known Problems
* Collected resources import ordering problem: The module might try to import collected facts before nagios is even installed.
## Support
* OS: CentOS 7
* Puppet 5
* OS: Rocky 9
* Puppet 8
## Tests
@@ -143,6 +82,7 @@ So far this module works through the usage of NRPE, which by default is enabled.
## Contact Us
[contact Us](https://confdroid.com/contact/)
[Feedback portal](https://feedback.confdroid.com/)
## Disclaimer

View File

@@ -1,302 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script type="text/javascript">
pathId = null;
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.36</h1>
<div id="listing">
<h1 class="alphaindex">Alphabetic Index</h1>
<h2>Puppet Class Listing A-Z</h2>
<table>
<tr>
<td valign='top' width="33%">
<ul id="alpha_C" class="alpha">
<li class="letter">C</li>
<ul>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios.html" title="puppet_classes::cd_nagios (puppet_class)">cd_nagios</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Acertbot_3A_3Acerts.html" title="puppet_classes::cd_nagios::certbot::certs (puppet_class)">cd_nagios::certbot::certs</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html" title="puppet_classes::cd_nagios::client::target (puppet_class)">cd_nagios::client::target</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nagios::firewall::iptables (puppet_class)">cd_nagios::firewall::iptables</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::cd_nagios::main::config (puppet_class)">cd_nagios::main::config</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html" title="puppet_classes::cd_nagios::main::dirs (puppet_class)">cd_nagios::main::dirs</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::cd_nagios::main::install (puppet_class)">cd_nagios::main::install</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html" title="puppet_classes::cd_nagios::main::user (puppet_class)">cd_nagios::main::user</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contact_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_contact_rules (puppet_class)">cd_nagios::nagios::objects::add_contact_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contactgroups_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_contactgroups_rules (puppet_class)">cd_nagios::nagios::objects::add_contactgroups_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_hostgroup_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_hostgroup_rules (puppet_class)">cd_nagios::nagios::objects::add_hostgroup_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroup_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_servicegroup_rules (puppet_class)">cd_nagios::nagios::objects::add_servicegroup_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_timeperiod_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_timeperiod_rules (puppet_class)">cd_nagios::nagios::objects::add_timeperiod_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acommands.html" title="puppet_classes::cd_nagios::nagios::objects::commands (puppet_class)">cd_nagios::nagios::objects::commands</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aconfig.html" title="puppet_classes::cd_nagios::nagios::objects::config (puppet_class)">cd_nagios::nagios::objects::config</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acontactgroups.html" title="puppet_classes::cd_nagios::nagios::objects::contactgroups (puppet_class)">cd_nagios::nagios::objects::contactgroups</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acontacts.html" title="puppet_classes::cd_nagios::nagios::objects::contacts (puppet_class)">cd_nagios::nagios::objects::contacts</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Ahostgroups.html" title="puppet_classes::cd_nagios::nagios::objects::hostgroups (puppet_class)">cd_nagios::nagios::objects::hostgroups</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aservicegroups.html" title="puppet_classes::cd_nagios::nagios::objects::servicegroups (puppet_class)">cd_nagios::nagios::objects::servicegroups</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html" title="puppet_classes::cd_nagios::nagios::objects::template_rules (puppet_class)">cd_nagios::nagios::objects::template_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atimeperiods.html" title="puppet_classes::cd_nagios::nagios::objects::timeperiods (puppet_class)">cd_nagios::nagios::objects::timeperiods</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource.html" title="puppet_classes::cd_nagios::nagios::resources::resource (puppet_class)">cd_nagios::nagios::resources::resource</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html" title="puppet_classes::cd_nagios::selinux::config (puppet_class)">cd_nagios::selinux::config</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html" title="puppet_classes::cd_nagios::server::access_rules (puppet_class)">cd_nagios::server::access_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html" title="puppet_classes::cd_nagios::server::files (puppet_class)">cd_nagios::server::files</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::cd_nagios::server::service (puppet_class)">cd_nagios::server::service</a></span>
</li>
</ul>
</ul>
</td>
</tr>
</table>
<h2>Defined Type Listing A-Z</h2>
<table>
<tr>
<td valign='top' width="33%">
<ul id="alpha_C" class="alpha">
<li class="letter">C</li>
<ul>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contact.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_contact (puppet_defined_type)">cd_nagios::nagios::objects::add_contact</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contactgroups.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_contactgroups (puppet_defined_type)">cd_nagios::nagios::objects::add_contactgroups</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_hostgroups.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_hostgroups (puppet_defined_type)">cd_nagios::nagios::objects::add_hostgroups</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroups.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_servicegroups (puppet_defined_type)">cd_nagios::nagios::objects::add_servicegroups</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_timeperiods.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_timeperiods (puppet_defined_type)">cd_nagios::nagios::objects::add_timeperiods</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html" title="puppet_defined_types::cd_nagios::nagios::objects::templates (puppet_defined_type)">cd_nagios::nagios::objects::templates</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource_df.html" title="puppet_defined_types::cd_nagios::nagios::resources::resource_df (puppet_defined_type)">cd_nagios::nagios::resources::resource_df</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html" title="puppet_defined_types::cd_nagios::server::access (puppet_defined_type)">cd_nagios::server::access</a></span>
</li>
</ul>
</ul>
</td>
</tr>
</table>
<h2>File Listing</h2>
<ul id="files" class="index_inline_list">
<li class="r1"><a href="index.html" title="README">README</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,8 +0,0 @@
/* Ensure the search bar doesn't overlap with links */
.fixed_header {
padding-bottom: 25px;
}
#full_list {
padding-top: 15px;
}

View File

@@ -1,58 +0,0 @@
body {
margin: 0;
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
font-size: 13px;
height: 101%;
overflow-x: hidden;
background: #fafafa;
}
h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
.clear { clear: both; }
.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; }
#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; }
#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; }
#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; }
#full_list ul { padding: 0; }
#full_list li { padding: 0; margin: 0; list-style: none; }
#full_list li .item { padding: 5px 5px 5px 12px; }
#noresults { padding: 7px 12px; background: #fff; }
#content.insearch #noresults { margin-left: 7px; }
li.collapsed ul { display: none; }
li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; }
li { color: #888; cursor: pointer; }
li.deprecated { text-decoration: line-through; font-style: italic; }
li.odd { background: #f0f0f0; }
li.even { background: #fafafa; }
.item:hover { background: #ddd; }
li small:before { content: "("; }
li small:after { content: ")"; }
li small.search_info { display: none; }
a, a:visited { text-decoration: none; color: #05a; }
li.clicked > .item { background: #05a; color: #ccc; }
li.clicked > .item a, li.clicked > .item a:visited { color: #eee; }
li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; }
li.collapsed.clicked a.toggle { background-position: top right; }
#search input { border: 1px solid #bbb; border-radius: 3px; }
#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; }
#full_list_nav a, #nav a:visited { color: #358; }
#full_list_nav a:hover { background: transparent; color: #5af; }
#full_list_nav span:after { content: ' | '; }
#full_list_nav span:last-child:after { content: ''; }
#content h1 { margin-top: 0; }
li { white-space: nowrap; cursor: normal; }
li small { display: block; font-size: 0.8em; }
li small:before { content: ""; }
li small:after { content: ""; }
li small.search_info { display: none; }
#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; }
#content.insearch #search { background-position: center right; }
#search input { width: 110px; }
#full_list.insearch ul { display: block; }
#full_list.insearch .item { display: none; }
#full_list.insearch .found { display: block; padding-left: 11px !important; }
#full_list.insearch li a.toggle { display: none; }
#full_list.insearch li small.search_info { display: block; }

View File

@@ -1,497 +0,0 @@
html {
width: 100%;
height: 100%;
}
body {
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
font-size: 13px;
width: 100%;
margin: 0;
padding: 0;
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
}
#nav {
position: relative;
width: 100%;
height: 100%;
border: 0;
border-right: 1px dotted #eee;
overflow: auto;
}
.nav_wrap {
margin: 0;
padding: 0;
width: 20%;
height: 100%;
position: relative;
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
flex-shrink: 0;
-webkit-flex-shrink: 0;
-ms-flex: 1 0;
}
#resizer {
position: absolute;
right: -5px;
top: 0;
width: 10px;
height: 100%;
cursor: col-resize;
z-index: 9999;
}
#main {
flex: 5 1;
-webkit-flex: 5 1;
-ms-flex: 5 1;
outline: none;
position: relative;
background: #fff;
padding: 1.2em;
padding-top: 0.2em;
box-sizing: border-box;
}
@media (max-width: 920px) {
.nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; }
#resizer { display: none; }
#nav {
z-index: 9999;
background: #fff;
display: none;
position: absolute;
top: 40px;
right: 12px;
width: 500px;
max-width: 80%;
height: 80%;
overflow-y: scroll;
border: 1px solid #999;
border-collapse: collapse;
box-shadow: -7px 5px 25px #aaa;
border-radius: 2px;
}
}
@media (min-width: 920px) {
body { height: 100%; overflow: hidden; }
#main { height: 100%; overflow: auto; }
#search { display: none; }
}
#main img { max-width: 100%; }
h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
h1.title { margin-bottom: 10px; }
h1.alphaindex { margin-top: 0; font-size: 22px; }
h2 {
padding: 0;
padding-bottom: 3px;
border-bottom: 1px #aaa solid;
font-size: 1.4em;
margin: 1.8em 0 0.5em;
position: relative;
}
h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; }
h2 small a {
display: block;
height: 20px;
border: 1px solid #aaa;
border-bottom: 0;
border-top-left-radius: 5px;
background: #f8f8f8;
position: relative;
padding: 2px 7px;
}
.clear { clear: both; }
.inline { display: inline; }
.inline p:first-child { display: inline; }
.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; }
.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt {
color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em;
border-radius: 4px;
}
.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; }
.docstring h1 { font-size: 1.2em; }
.docstring h2 { font-size: 1.1em; }
.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; }
.summary_desc .object_link a, .docstring .object_link a {
font-family: monospace; font-size: 1.05em;
color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em;
border-radius: 4px;
}
.rdoc-term { padding-right: 25px; font-weight: bold; }
.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
.summary_desc pre.code .object_link a, .docstring pre.code .object_link a {
padding: 0px; background: inherit; color: inherit; border-radius: inherit;
}
/* style for <table> */
#filecontents table, .docstring table { border-collapse: collapse; }
#filecontents table th, #filecontents table td,
.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; }
#filecontents table tr:nth-child(odd),
.docstring table tr:nth-child(odd) { background: #eee; }
#filecontents table tr:nth-child(even),
.docstring table tr:nth-child(even) { background: #fff; }
#filecontents table th, .docstring table th { background: #fff; }
/* style for <ul> */
#filecontents li > p, .docstring li > p { margin: 0px; }
#filecontents ul, .docstring ul { padding-left: 20px; }
/* style for <dl> */
#filecontents dl, .docstring dl { border: 1px solid #ccc; }
#filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; }
#filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; }
#filecontents dd > p, .docstring dd > p { margin: 0px; }
.note {
color: #222;
margin: 20px 0;
padding: 10px;
border: 1px solid #eee;
border-radius: 3px;
display: block;
}
.docstring .note {
border-left-color: #ccc;
border-left-width: 5px;
}
.note.todo { background: #ffffc5; border-color: #ececaa; }
.note.returns_void { background: #efefef; }
.note.deprecated { background: #ffe5e5; border-color: #e9dada; }
.note.title.deprecated { background: #ffe5e5; border-color: #e9dada; }
.note.private { background: #ffffc5; border-color: #ececaa; }
.note.title { padding: 3px 6px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; }
.summary_signature + .note.title { margin-left: 7px; }
h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; }
.note.title { background: #efefef; }
.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; }
.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; }
.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; }
.note.title.private { background: #d5d5d5; border-color: #c5c5c5; }
.note.title.not_defined_here { background: transparent; border: none; font-style: italic; }
.discussion .note { margin-top: 6px; }
.discussion .note:first-child { margin-top: 0; }
h3.inherited {
font-style: italic;
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
font-weight: normal;
padding: 0;
margin: 0;
margin-top: 12px;
margin-bottom: 3px;
font-size: 13px;
}
p.inherited {
padding: 0;
margin: 0;
margin-left: 25px;
}
.box_info dl {
margin: 0;
border: 0;
width: 100%;
font-size: 1em;
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
}
.box_info dl dt {
flex-shrink: 0;
-webkit-flex-shrink: 1;
-ms-flex-shrink: 1;
width: 100px;
text-align: right;
font-weight: bold;
border: 1px solid #aaa;
border-width: 1px 0px 0px 1px;
padding: 6px 0;
padding-right: 10px;
}
.box_info dl dd {
flex-grow: 1;
-webkit-flex-grow: 1;
-ms-flex: 1;
max-width: 420px;
padding: 6px 0;
padding-right: 20px;
border: 1px solid #aaa;
border-width: 1px 1px 0 0;
overflow: hidden;
position: relative;
}
.box_info dl:last-child > * {
border-bottom: 1px solid #aaa;
}
.box_info dl:nth-child(odd) > * { background: #eee; }
.box_info dl:nth-child(even) > * { background: #fff; }
.box_info dl > * { margin: 0; }
ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; }
.index_inline_list { padding-left: 0; font-size: 1.1em; }
.index_inline_list li {
list-style: none;
display: inline-block;
padding: 0 12px;
line-height: 30px;
margin-bottom: 5px;
}
dl.constants { margin-left: 10px; }
dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
dl.constants.compact dt { display: inline-block; font-weight: normal }
dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; }
dl.constants .docstring .note:first-child { margin-top: 5px; }
.summary_desc {
margin-left: 32px;
display: block;
font-family: sans-serif;
font-size: 1.1em;
margin-top: 8px;
line-height: 1.5145em;
margin-bottom: 0.8em;
}
.summary_desc tt { font-size: 0.9em; }
dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; }
dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; }
dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; }
dl.constants .discussion *:first-child { margin-top: 0; }
dl.constants .discussion *:last-child { margin-bottom: 0; }
.method_details { border-top: 1px dotted #ccc; margin-top: 25px; padding-top: 0; }
.method_details.first { border: 0; margin-top: 5px; }
.method_details.first h3.signature { margin-top: 1em; }
p.signature, h3.signature {
font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
padding: 6px 10px; margin-top: 1em;
background: #E8F4FF; border: 1px solid #d8d8e5; border-radius: 5px;
}
p.signature tt,
h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; }
p.signature .overload,
h3.signature .overload { display: block; }
p.signature .extras,
h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; }
p.signature .not_defined_here,
h3.signature .not_defined_here,
p.signature .aliases,
h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; }
p.signature .aliases .names,
h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; }
.tags .tag_title { font-size: 1.05em; margin-bottom: 0; font-weight: bold; }
.tags .tag_title tt { color: initial; padding: initial; background: initial; }
.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; }
.tags ul li { margin-bottom: 3px; }
.tags ul .name { font-family: monospace; font-weight: bold; }
.tags ul .note { padding: 3px 6px; }
.tags { margin-bottom: 12px; }
.tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; }
.tags .examples .inline p { padding: 0; margin: 0; font-weight: bold; font-size: 1em; }
.tags .examples .inline p:before { content: "▸"; font-size: 1em; margin-right: 5px; }
.tags .overload .overload_item { list-style: none; margin-bottom: 25px; }
.tags .overload .overload_item .signature {
padding: 2px 8px;
background: #F1F8FF; border: 1px solid #d8d8e5; border-radius: 3px;
}
.tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; }
.tags .overload .docstring { margin-top: 15px; }
.defines { display: none; }
#method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; }
.showSource { font-size: 0.9em; }
.showSource a, .showSource a:visited { text-decoration: none; color: #666; }
#content a, #content a:visited { text-decoration: none; color: #05a; }
#content a:hover { background: #ffffa5; }
ul.summary {
list-style: none;
font-family: monospace;
font-size: 1em;
line-height: 1.5em;
padding-left: 0px;
}
ul.summary a, ul.summary a:visited {
text-decoration: none; font-size: 1.1em;
}
ul.summary li { margin-bottom: 5px; }
.summary_signature { padding: 4px 8px; background: #f8f8f8; border: 1px solid #f0f0f0; border-radius: 5px; }
.summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; }
.summary_signature.deprecated { background: #ffe5e5; border-color: #e9dada; }
ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;}
ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; }
#content .summary_signature:hover a,
#content .summary_signature:hover a:visited {
background: transparent;
color: #049;
}
p.inherited a { font-family: monospace; font-size: 0.9em; }
p.inherited { word-spacing: 5px; font-size: 1.2em; }
p.children { font-size: 1.2em; }
p.children a { font-size: 0.9em; }
p.children strong { font-size: 0.8em; }
p.children strong.modules { padding-left: 5px; }
ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; }
ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; }
ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; }
ul.fullTree li:first-child { padding-top: 0; background: transparent; }
ul.fullTree li:last-child { padding-bottom: 0; }
.showAll ul.fullTree { display: block; }
.showAll .inheritName { display: none; }
#search { position: absolute; right: 12px; top: 0px; z-index: 9000; }
#search a {
display: block; float: left;
padding: 4px 8px; text-decoration: none; color: #05a; fill: #05a;
border: 1px solid #d8d8e5;
border-bottom-left-radius: 3px; border-bottom-right-radius: 3px;
background: #F1F8FF;
box-shadow: -1px 1px 3px #ddd;
}
#search a:hover { background: #f5faff; color: #06b; fill: #06b; }
#search a.active {
background: #568; padding-bottom: 20px; color: #fff; fill: #fff;
border: 1px solid #457;
border-top-left-radius: 5px; border-top-right-radius: 5px;
}
#search a.inactive { color: #999; fill: #999; }
.inheritanceTree, .toggleDefines {
float: right;
border-left: 1px solid #aaa;
position: absolute; top: 0; right: 0;
height: 100%;
background: #f6f6f6;
padding: 5px;
min-width: 55px;
text-align: center;
}
#menu { font-size: 1.3em; color: #bbb; }
#menu .title, #menu a { font-size: 0.7em; }
#menu .title a { font-size: 1em; }
#menu .title { color: #555; }
#menu a, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; }
#menu a:hover { color: #05a; }
#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; }
#footer a, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; }
#footer a:hover { color: #05a; }
#listing ul.alpha { font-size: 1.1em; }
#listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; }
#listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; }
#listing ul.alpha ul { margin: 0; padding-left: 15px; }
#listing ul small { color: #666; font-size: 0.7em; }
li.r1 { background: #f0f0f0; }
li.r2 { background: #fafafa; }
#content ul.summary li.deprecated .summary_signature a,
#content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; }
#toc {
position: relative;
float: right;
overflow-x: auto;
right: -3px;
margin-left: 20px;
margin-bottom: 20px;
padding: 20px; padding-right: 30px;
max-width: 300px;
z-index: 5000;
background: #fefefe;
border: 1px solid #ddd;
box-shadow: -2px 2px 6px #bbb;
}
#toc .title { margin: 0; }
#toc ol { padding-left: 1.8em; }
#toc li { font-size: 1.1em; line-height: 1.7em; }
#toc > ol > li { font-size: 1.1em; font-weight: bold; }
#toc ol > li > ol { font-size: 0.9em; }
#toc ol ol > li > ol { padding-left: 2.3em; }
#toc ol + li { margin-top: 0.3em; }
#toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; }
#toc.hidden:hover { background: #fafafa; }
#filecontents h1 + #toc.nofloat { margin-top: 0; }
@media (max-width: 560px) {
#toc {
margin-left: 0;
margin-top: 16px;
float: none;
max-width: none;
}
}
/* syntax highlighting */
.source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; }
#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; }
#filecontents pre.code, .docstring pre.code { display: block; }
.source_code .lines { padding-right: 12px; color: #555; text-align: right; }
#filecontents pre.code, .docstring pre.code,
.tags pre.example {
padding: 9px 14px;
margin-top: 4px;
border: 1px solid #e1e1e8;
background: #f7f7f9;
border-radius: 4px;
font-size: 1em;
overflow-x: auto;
line-height: 1.2em;
}
pre.code { color: #000; tab-size: 2; }
pre.code .info.file { color: #555; }
pre.code .val { color: #036A07; }
pre.code .tstring_content,
pre.code .heredoc_beg, pre.code .heredoc_end,
pre.code .qwords_beg, pre.code .qwords_end, pre.code .qwords_sep,
pre.code .words_beg, pre.code .words_end, pre.code .words_sep,
pre.code .qsymbols_beg, pre.code .qsymbols_end, pre.code .qsymbols_sep,
pre.code .symbols_beg, pre.code .symbols_end, pre.code .symbols_sep,
pre.code .tstring, pre.code .dstring { color: #036A07; }
pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s,
pre.code .rubyid_to_sym, pre.code .rubyid_to_f,
pre.code .dot + pre.code .id,
pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; }
pre.code .comment { color: #0066FF; }
pre.code .const, pre.code .constant { color: #585CF6; }
pre.code .label,
pre.code .symbol { color: #C5060B; }
pre.code .kw,
pre.code .rubyid_require,
pre.code .rubyid_extend,
pre.code .rubyid_include { color: #0000FF; }
pre.code .ivar { color: #318495; }
pre.code .gvar,
pre.code .rubyid_backref,
pre.code .rubyid_nth_ref { color: #6D79DE; }
pre.code .regexp, .dregexp { color: #036A07; }
pre.code a { border-bottom: 1px dotted #bbf; }
/* inline code */
*:not(pre) > code {
padding: 1px 3px 1px 3px;
border: 1px solid #E1E1E8;
background: #F7F7F9;
border-radius: 4px;
}
/* Color fix for links */
#content .summary_desc pre.code .id > .object_link a, /* identifier */
#content .docstring pre.code .id > .object_link a { color: #0085FF; }
#content .summary_desc pre.code .const > .object_link a, /* constant */
#content .docstring pre.code .const > .object_link a { color: #585CF6; }

View File

@@ -1,270 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="file_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> &raquo;
<span class="title">File: README</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'>
<h1 id="label-Readme">Readme</h1>
<p><a href="https://jenkins.confdroid.com/job/cd_nagios/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios"></a></p>
<p>[[<em>TOC</em>]]</p>
<h2 id="label-Synopsis">Synopsis</h2>
<p>Nagios is a powerful open source software solution for monitoring your IT environments.</p>
<p><code>cd_nagios</code> is a Puppet module allowing to fully automate the setup &amp; configuration of the Nagios server, as well as actively adding client hosts and services to the monitoring environment through defines and <code>PuppetDB</code>.</p>
<h2 id="label-WARNING">WARNING</h2>
<p><strong><em>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</em></strong></p>
<h2 id="label-Features">Features</h2>
<p>Installation:</p>
<ul><li>
<p>Nagios Server instance:</p>
</li><li>
<p>install httpd via cd_apache</p>
</li><li>
<p>install Nagios server binaries on Nagios server</p>
</li><li>
<p>Nagios clients:</p>
</li><li>
<p>install client binaries like nagios plugins etc.</p>
</li><li>
<p>include NRPE via <code>cd_nrpe</code> (optional)</p>
</li></ul>
<p>Configuration</p>
<ul><li>
<p>configure all aspects of Nagios on server</p>
</li><li>
<p>manage nagios service user</p>
</li><li>
<p>manage directories (filesystem permissions, selinux )</p>
</li><li>
<p>manage <code>cgi.cfg</code> through parameters</p>
</li><li>
<p>manage <code>nagios.cfg</code> through parameters</p>
</li><li>
<p>manage Nagios users through external Puppet rules via define</p>
</li><li>
<p>manage Nagios commands through Puppet exports</p>
</li><li>
<p>manage Nagios template definitions through external Puppet rules via define</p>
</li><li>
<p>manage Nagios main contacts through Puppet exports. Additional contacts can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main contact groups through Puppet exports. Additional contact groups can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main host groups through Puppet exports. Additional host groups can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main service groups through Puppet exports. Additional service groups can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main time periods through Puppet exports. Additional time periods can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>configure firewall (optional)</p>
</li><li>
<p>configure selinux policies (optional)</p>
</li><li>
<p>configure forwarding http to https (optional)</p>
</li><li>
<p>manage TLS certificates through certbot (optional)</p>
</li><li>
<p>manage <code>$user$</code> arguments in resource file via define</p>
</li></ul>
<p>Service</p>
<ul><li>
<p>manage Nagios service on server</p>
</li></ul>
<p>Monitoring</p>
<ul><li>
<p>monitor Nagios host</p>
</li><li>
<p>monitor Nagios service</p>
</li><li>
<p>monitor clients:</p>
</li><li>
<p>ping</p>
</li><li>
<p>root partition</p>
</li><li>
<p>swap usage</p>
</li><li>
<p>logged-in local users</p>
</li><li>
<p>amount of total processes</p>
</li><li>
<p>amount of zombie processes</p>
</li><li>
<p>current Load</p>
</li></ul>
<h2 id="label-Repo+Documentation">Repo Documentation</h2>
<p>See the full Puppet documentation including parameters in <code>docs/index.html</code></p>
<h2 id="label-Dependencies">Dependencies</h2>
<p>All dependencies must be included in the catalogue.</p>
<ul><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_resources">cd_resources</a> for Yum repos.</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_apache">cd_apache</a> for installing httpd</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_firewall">cd_firewall</a> or <a href="https://github.com/puppetlabs/puppetlabs-firewall">puppetlabs firewall</a> (optional)</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_selinux">cd_selinux</a> for selinux policy adjustments</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_certbot">cd_certbot</a> to auto-manage TLS certificates (optional)</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_nrpe">cd_nrpe</a> to manage NRPE (optional)</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_stdlib">cd_stdlib</a> or <a href="https://github.com/puppetlabs/puppetlabs-stdlib">puppetlabs stdlib</a> to facilitate concat</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_stdlib">cd_concat</a> or <a href="https://github.com/puppetlabs/puppetlabs-concat">puppetlabs concat</a> to concatenate configuration files from different sources.</p>
</li></ul>
<h2 id="label-Deployment">Deployment</h2>
<ul><li>
<p>native Puppet deployment</p>
</li></ul>
<p>via site.pp or nodes.pp</p>
<pre class="code ruby"><code class="ruby">node &#39;example.example.net&#39; {
include cd_nagios
}
</code></pre>
<ul><li>
<p>through Foreman:</p>
</li></ul>
<p>In order to apply parameters through Foreman, <strong>cd_nagios::params</strong> must be added to the host or host group in question.</p>
<p>See <a href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more details about class deployment on Confdroid.com</a>.</p>
<h2 id="label-PuppetDB">PuppetDB</h2>
<p>A working instance of PuppetDB connected to the Puppet master is required for this to work. Installation and configuration of PuppetDB is out of scope for this module, however <a href="https://gitlab.confdroid.com/puppet/cd_puppetdb">cd_puppetdb</a> is available to automate this task for you as well within a few minutes.</p>
<h2 id="label-SELINUX">SELINUX</h2>
<p>All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.</p>
<h2 id="label-Certbot">Certbot</h2>
<p>This module can optionally setup <a href="https://certbot.eff.org/">certbot</a> TLS certificate management for the front-end GUI. In order to do so, set <code>$ng_enable_certbot</code> as well as <code>$ng_use_https</code> to <code>true</code> (default). Effectively, this will manage the certs before even installing Nagios, so there will be no problems with the Nagios showing up with a self-signed certificate. Once enabled, the module will go and try to obtain a certificate automatically. For this to work, you need to have proper DNS resolution set up for your domain / nagios server. Certs are also automatically renewed.</p>
<p>If you prefer to use https but use self-signed certs or your own CA, simply set to false. This will point the SSL vhost config file to the default location for TLS certificates.</p>
<h2 id="label-httpd+vHost+files">httpd vHost files</h2>
<p>by default, Nagios creates its own <code>nagios.conf</code> file, which is not a vhost file and relies on the main <code>ssl.conf</code>. However, as Nagios might be running on a regular web server with various other web instances (not recommended through for performance reasons), we do not want to manage <code>ssl.conf</code> directly, hence the module creates a vhost for the SSL host.</p>
<h2 id="label-Client+Connections">Client Connections</h2>
<p>In order to monitor clients, NAGIOS must be able to connect to them. There are multiple ways of doing so, the most common ones being NRPE and SSH. So far this module works through the usage of NRPE, which by default is enabled. Class cd_nagios::client::nrpe configures <code>nrpe.cfg</code> and opens the required firewall port on clients (optional,default).</p>
<h2 id="label-Known+Problems">Known Problems</h2>
<ul><li>
<p>Collected resources import ordering problem: The module might try to import collected facts before nagios is even installed.</p>
</li></ul>
<h2 id="label-Support">Support</h2>
<ul><li>
<p>OS: CentOS 7</p>
</li><li>
<p>Puppet 5</p>
</li></ul>
<h2 id="label-Tests">Tests</h2>
<ul><li>
<p>Puppet Lint</p>
</li><li>
<p>excluded tests:</p>
<ul><li>
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.</p>
</li></ul>
</li><li>
<p>Puppet Parser</p>
</li><li>
<p>ERB Template Parser</p>
</li><li>
<p>Sonar Quality Gate</p>
</li></ul>
<h2 id="label-Contact+Us">Contact Us</h2>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
<h2 id="label-Disclaimer">Disclaimer</h2>
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments. The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.</p>
</div></div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,22 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Documentation by YARD 0.9.36</title>
</head>
<script type="text/javascript">
var mainUrl = 'index.html';
try {
var match = decodeURIComponent(window.location.hash).match(/^#!(.+)/);
var name = match ? match[1] : mainUrl;
var url = new URL(name, location.href);
window.top.location.replace(url.origin === location.origin ? name : mainUrl);
} catch (e) {
window.top.location.replace(mainUrl);
}
</script>
<noscript>
<h1>Oops!</h1>
<h2>YARD requires JavaScript!</h2>
</noscript>
</html>

View File

@@ -1,270 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> &raquo;
<span class="title">File: README</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'>
<h1 id="label-Readme">Readme</h1>
<p><a href="https://jenkins.confdroid.com/job/cd_nagios/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios"></a></p>
<p>[[<em>TOC</em>]]</p>
<h2 id="label-Synopsis">Synopsis</h2>
<p>Nagios is a powerful open source software solution for monitoring your IT environments.</p>
<p><code>cd_nagios</code> is a Puppet module allowing to fully automate the setup &amp; configuration of the Nagios server, as well as actively adding client hosts and services to the monitoring environment through defines and <code>PuppetDB</code>.</p>
<h2 id="label-WARNING">WARNING</h2>
<p><strong><em>Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previous configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production</em></strong></p>
<h2 id="label-Features">Features</h2>
<p>Installation:</p>
<ul><li>
<p>Nagios Server instance:</p>
</li><li>
<p>install httpd via cd_apache</p>
</li><li>
<p>install Nagios server binaries on Nagios server</p>
</li><li>
<p>Nagios clients:</p>
</li><li>
<p>install client binaries like nagios plugins etc.</p>
</li><li>
<p>include NRPE via <code>cd_nrpe</code> (optional)</p>
</li></ul>
<p>Configuration</p>
<ul><li>
<p>configure all aspects of Nagios on server</p>
</li><li>
<p>manage nagios service user</p>
</li><li>
<p>manage directories (filesystem permissions, selinux )</p>
</li><li>
<p>manage <code>cgi.cfg</code> through parameters</p>
</li><li>
<p>manage <code>nagios.cfg</code> through parameters</p>
</li><li>
<p>manage Nagios users through external Puppet rules via define</p>
</li><li>
<p>manage Nagios commands through Puppet exports</p>
</li><li>
<p>manage Nagios template definitions through external Puppet rules via define</p>
</li><li>
<p>manage Nagios main contacts through Puppet exports. Additional contacts can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main contact groups through Puppet exports. Additional contact groups can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main host groups through Puppet exports. Additional host groups can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main service groups through Puppet exports. Additional service groups can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>manage Nagios main time periods through Puppet exports. Additional time periods can be created through external Puppet rules via define, to avoid having to alter the module code.</p>
</li><li>
<p>configure firewall (optional)</p>
</li><li>
<p>configure selinux policies (optional)</p>
</li><li>
<p>configure forwarding http to https (optional)</p>
</li><li>
<p>manage TLS certificates through certbot (optional)</p>
</li><li>
<p>manage <code>$user$</code> arguments in resource file via define</p>
</li></ul>
<p>Service</p>
<ul><li>
<p>manage Nagios service on server</p>
</li></ul>
<p>Monitoring</p>
<ul><li>
<p>monitor Nagios host</p>
</li><li>
<p>monitor Nagios service</p>
</li><li>
<p>monitor clients:</p>
</li><li>
<p>ping</p>
</li><li>
<p>root partition</p>
</li><li>
<p>swap usage</p>
</li><li>
<p>logged-in local users</p>
</li><li>
<p>amount of total processes</p>
</li><li>
<p>amount of zombie processes</p>
</li><li>
<p>current Load</p>
</li></ul>
<h2 id="label-Repo+Documentation">Repo Documentation</h2>
<p>See the full Puppet documentation including parameters in <code>docs/index.html</code></p>
<h2 id="label-Dependencies">Dependencies</h2>
<p>All dependencies must be included in the catalogue.</p>
<ul><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_resources">cd_resources</a> for Yum repos.</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_apache">cd_apache</a> for installing httpd</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_firewall">cd_firewall</a> or <a href="https://github.com/puppetlabs/puppetlabs-firewall">puppetlabs firewall</a> (optional)</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_selinux">cd_selinux</a> for selinux policy adjustments</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_certbot">cd_certbot</a> to auto-manage TLS certificates (optional)</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_nrpe">cd_nrpe</a> to manage NRPE (optional)</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_stdlib">cd_stdlib</a> or <a href="https://github.com/puppetlabs/puppetlabs-stdlib">puppetlabs stdlib</a> to facilitate concat</p>
</li><li>
<p><a href="https://gitlab.confdroid.com/puppet/cd_stdlib">cd_concat</a> or <a href="https://github.com/puppetlabs/puppetlabs-concat">puppetlabs concat</a> to concatenate configuration files from different sources.</p>
</li></ul>
<h2 id="label-Deployment">Deployment</h2>
<ul><li>
<p>native Puppet deployment</p>
</li></ul>
<p>via site.pp or nodes.pp</p>
<pre class="code ruby"><code class="ruby">node &#39;example.example.net&#39; {
include cd_nagios
}
</code></pre>
<ul><li>
<p>through Foreman:</p>
</li></ul>
<p>In order to apply parameters through Foreman, <strong>cd_nagios::params</strong> must be added to the host or host group in question.</p>
<p>See <a href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more details about class deployment on Confdroid.com</a>.</p>
<h2 id="label-PuppetDB">PuppetDB</h2>
<p>A working instance of PuppetDB connected to the Puppet master is required for this to work. Installation and configuration of PuppetDB is out of scope for this module, however <a href="https://gitlab.confdroid.com/puppet/cd_puppetdb">cd_puppetdb</a> is available to automate this task for you as well within a few minutes.</p>
<h2 id="label-SELINUX">SELINUX</h2>
<p>All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.</p>
<h2 id="label-Certbot">Certbot</h2>
<p>This module can optionally setup <a href="https://certbot.eff.org/">certbot</a> TLS certificate management for the front-end GUI. In order to do so, set <code>$ng_enable_certbot</code> as well as <code>$ng_use_https</code> to <code>true</code> (default). Effectively, this will manage the certs before even installing Nagios, so there will be no problems with the Nagios showing up with a self-signed certificate. Once enabled, the module will go and try to obtain a certificate automatically. For this to work, you need to have proper DNS resolution set up for your domain / nagios server. Certs are also automatically renewed.</p>
<p>If you prefer to use https but use self-signed certs or your own CA, simply set to false. This will point the SSL vhost config file to the default location for TLS certificates.</p>
<h2 id="label-httpd+vHost+files">httpd vHost files</h2>
<p>by default, Nagios creates its own <code>nagios.conf</code> file, which is not a vhost file and relies on the main <code>ssl.conf</code>. However, as Nagios might be running on a regular web server with various other web instances (not recommended through for performance reasons), we do not want to manage <code>ssl.conf</code> directly, hence the module creates a vhost for the SSL host.</p>
<h2 id="label-Client+Connections">Client Connections</h2>
<p>In order to monitor clients, NAGIOS must be able to connect to them. There are multiple ways of doing so, the most common ones being NRPE and SSH. So far this module works through the usage of NRPE, which by default is enabled. Class cd_nagios::client::nrpe configures <code>nrpe.cfg</code> and opens the required firewall port on clients (optional,default).</p>
<h2 id="label-Known+Problems">Known Problems</h2>
<ul><li>
<p>Collected resources import ordering problem: The module might try to import collected facts before nagios is even installed.</p>
</li></ul>
<h2 id="label-Support">Support</h2>
<ul><li>
<p>OS: CentOS 7</p>
</li><li>
<p>Puppet 5</p>
</li></ul>
<h2 id="label-Tests">Tests</h2>
<ul><li>
<p>Puppet Lint</p>
</li><li>
<p>excluded tests:</p>
<ul><li>
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.</p>
</li></ul>
</li><li>
<p>Puppet Parser</p>
</li><li>
<p>ERB Template Parser</p>
</li><li>
<p>Sonar Quality Gate</p>
</li></ul>
<h2 id="label-Contact+Us">Contact Us</h2>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
<h2 id="label-Disclaimer">Disclaimer</h2>
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments. The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.</p>
</div></div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,314 +0,0 @@
(function() {
var localStorage = {}, sessionStorage = {};
try { localStorage = window.localStorage; } catch (e) { }
try { sessionStorage = window.sessionStorage; } catch (e) { }
function createSourceLinks() {
$('.method_details_list .source_code').
before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
$('.toggleSource').toggle(function() {
$(this).parent().nextAll('.source_code').slideDown(100);
$(this).text("Hide source");
},
function() {
$(this).parent().nextAll('.source_code').slideUp(100);
$(this).text("View source");
});
}
function createDefineLinks() {
var tHeight = 0;
$('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
$('.toggleDefines').toggle(function() {
tHeight = $(this).parent().prev().height();
$(this).prev().css('display', 'inline');
$(this).parent().prev().height($(this).parent().height());
$(this).text("(less)");
},
function() {
$(this).prev().hide();
$(this).parent().prev().height(tHeight);
$(this).text("more...");
});
}
function createFullTreeLinks() {
var tHeight = 0;
$('.inheritanceTree').toggle(function() {
tHeight = $(this).parent().prev().height();
$(this).parent().toggleClass('showAll');
$(this).text("(hide)");
$(this).parent().prev().height($(this).parent().height());
},
function() {
$(this).parent().toggleClass('showAll');
$(this).parent().prev().height(tHeight);
$(this).text("show all");
});
}
function searchFrameButtons() {
$('.full_list_link').click(function() {
toggleSearchFrame(this, $(this).attr('href'));
return false;
});
window.addEventListener('message', function(e) {
if (e.data === 'navEscape') {
$('#nav').slideUp(100);
$('#search a').removeClass('active inactive');
$(window).focus();
}
});
$(window).resize(function() {
if ($('#search:visible').length === 0) {
$('#nav').removeAttr('style');
$('#search a').removeClass('active inactive');
$(window).focus();
}
});
}
function toggleSearchFrame(id, link) {
var frame = $('#nav');
$('#search a').removeClass('active').addClass('inactive');
if (frame.attr('src') === link && frame.css('display') !== "none") {
frame.slideUp(100);
$('#search a').removeClass('active inactive');
}
else {
$(id).addClass('active').removeClass('inactive');
if (frame.attr('src') !== link) frame.attr('src', link);
frame.slideDown(100);
}
}
function linkSummaries() {
$('.summary_signature').click(function() {
document.location = $(this).find('a').attr('href');
});
}
function summaryToggle() {
$('.summary_toggle').click(function(e) {
e.preventDefault();
localStorage.summaryCollapsed = $(this).text();
$('.summary_toggle').each(function() {
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
var next = $(this).parent().parent().nextAll('ul.summary').first();
if (next.hasClass('compact')) {
next.toggle();
next.nextAll('ul.summary').first().toggle();
}
else if (next.hasClass('summary')) {
var list = $('<ul class="summary compact" />');
list.html(next.html());
list.find('.summary_desc, .note').remove();
list.find('a').each(function() {
$(this).html($(this).find('strong').html());
$(this).parent().html($(this)[0].outerHTML);
});
next.before(list);
next.toggle();
}
});
return false;
});
if (localStorage.summaryCollapsed == "collapse") {
$('.summary_toggle').first().click();
} else { localStorage.summaryCollapsed = "expand"; }
}
function constantSummaryToggle() {
$('.constants_summary_toggle').click(function(e) {
e.preventDefault();
localStorage.summaryCollapsed = $(this).text();
$('.constants_summary_toggle').each(function() {
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
var next = $(this).parent().parent().nextAll('dl.constants').first();
if (next.hasClass('compact')) {
next.toggle();
next.nextAll('dl.constants').first().toggle();
}
else if (next.hasClass('constants')) {
var list = $('<dl class="constants compact" />');
list.html(next.html());
list.find('dt').each(function() {
$(this).addClass('summary_signature');
$(this).text( $(this).text().split('=')[0]);
if ($(this).has(".deprecated").length) {
$(this).addClass('deprecated');
};
});
// Add the value of the constant as "Tooltip" to the summary object
list.find('pre.code').each(function() {
console.log($(this).parent());
var dt_element = $(this).parent().prev();
var tooltip = $(this).text();
if (dt_element.hasClass("deprecated")) {
tooltip = 'Deprecated. ' + tooltip;
};
dt_element.attr('title', tooltip);
});
list.find('.docstring, .tags, dd').remove();
next.before(list);
next.toggle();
}
});
return false;
});
if (localStorage.summaryCollapsed == "collapse") {
$('.constants_summary_toggle').first().click();
} else { localStorage.summaryCollapsed = "expand"; }
}
function generateTOC() {
if ($('#filecontents').length === 0) return;
var _toc = $('<ol class="top"></ol>');
var show = false;
var toc = _toc;
var counter = 0;
var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
var i;
var curli;
if ($('#filecontents h1').length > 1) tags.unshift('h1');
for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
var lastTag = parseInt(tags[0][1], 10);
$(tags.join(', ')).each(function() {
if ($(this).parents('.method_details .docstring').length != 0) return;
if (this.id == "filecontents") return;
show = true;
var thisTag = parseInt(this.tagName[1], 10);
if (this.id.length === 0) {
var proposedId = $(this).attr('toc-id');
if (typeof(proposedId) != "undefined") this.id = proposedId;
else {
var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
this.id = proposedId;
}
}
if (thisTag > lastTag) {
for (i = 0; i < thisTag - lastTag; i++) {
if ( typeof(curli) == "undefined" ) {
curli = $('<li/>');
toc.append(curli);
}
toc = $('<ol/>');
curli.append(toc);
curli = undefined;
}
}
if (thisTag < lastTag) {
for (i = 0; i < lastTag - thisTag; i++) {
toc = toc.parent();
toc = toc.parent();
}
}
var title = $(this).attr('toc-title');
if (typeof(title) == "undefined") title = $(this).text();
curli =$('<li><a href="#' + this.id + '">' + title + '</a></li>');
toc.append(curli);
lastTag = thisTag;
});
if (!show) return;
html = '<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
$('#content').prepend(html);
$('#toc').append(_toc);
$('#toc .hide_toc').toggle(function() {
$('#toc .top').slideUp('fast');
$('#toc').toggleClass('hidden');
$('#toc .title small').toggle();
}, function() {
$('#toc .top').slideDown('fast');
$('#toc').toggleClass('hidden');
$('#toc .title small').toggle();
});
}
function navResizeFn(e) {
if (e.which !== 1) {
navResizeFnStop();
return;
}
sessionStorage.navWidth = e.pageX.toString();
$('.nav_wrap').css('width', e.pageX);
$('.nav_wrap').css('-ms-flex', 'inherit');
}
function navResizeFnStop() {
$(window).unbind('mousemove', navResizeFn);
window.removeEventListener('message', navMessageFn, false);
}
function navMessageFn(e) {
if (e.data.action === 'mousemove') navResizeFn(e.data.event);
if (e.data.action === 'mouseup') navResizeFnStop();
}
function navResizer() {
$('#resizer').mousedown(function(e) {
e.preventDefault();
$(window).mousemove(navResizeFn);
window.addEventListener('message', navMessageFn, false);
});
$(window).mouseup(navResizeFnStop);
if (sessionStorage.navWidth) {
navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)});
}
}
function navExpander() {
var done = false, timer = setTimeout(postMessage, 500);
function postMessage() {
if (done) return;
clearTimeout(timer);
var opts = { action: 'expand', path: pathId };
document.getElementById('nav').contentWindow.postMessage(opts, '*');
done = true;
}
window.addEventListener('message', function(event) {
if (event.data === 'navReady') postMessage();
return false;
}, false);
}
function mainFocus() {
var hash = window.location.hash;
if (hash !== '' && $(hash)[0]) {
$(hash)[0].scrollIntoView();
}
setTimeout(function() { $('#main').focus(); }, 10);
}
function navigationChange() {
// This works around the broken anchor navigation with the YARD template.
window.onpopstate = function() {
var hash = window.location.hash;
if (hash !== '' && $(hash)[0]) {
$(hash)[0].scrollIntoView();
}
};
}
$(document).ready(function() {
navResizer();
navExpander();
createSourceLinks();
createDefineLinks();
createFullTreeLinks();
searchFrameButtons();
linkSummaries();
summaryToggle();
constantSummaryToggle();
generateTOC();
mainFocus();
navigationChange();
});
})();

View File

@@ -1,216 +0,0 @@
(function() {
var $clicked = $(null);
var searchTimeout = null;
var searchCache = [];
var caseSensitiveMatch = false;
var ignoreKeyCodeMin = 8;
var ignoreKeyCodeMax = 46;
var commandKey = 91;
RegExp.escape = function(text) {
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
}
function escapeShortcut() {
$(document).keydown(function(evt) {
if (evt.which == 27) {
window.parent.postMessage('navEscape', '*');
}
});
}
function navResizer() {
$(window).mousemove(function(e) {
window.parent.postMessage({
action: 'mousemove', event: {pageX: e.pageX, which: e.which}
}, '*');
}).mouseup(function(e) {
window.parent.postMessage({action: 'mouseup'}, '*');
});
window.parent.postMessage("navReady", "*");
}
function clearSearchTimeout() {
clearTimeout(searchTimeout);
searchTimeout = null;
}
function enableLinks() {
// load the target page in the parent window
$('#full_list li').on('click', function(evt) {
$('#full_list li').removeClass('clicked');
$clicked = $(this);
$clicked.addClass('clicked');
evt.stopPropagation();
if (evt.target.tagName === 'A') return true;
var elem = $clicked.find('> .item .object_link a')[0];
var e = evt.originalEvent;
var newEvent = new MouseEvent(evt.originalEvent.type);
newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
elem.dispatchEvent(newEvent);
evt.preventDefault();
return false;
});
}
function enableToggles() {
// show/hide nested classes on toggle click
$('#full_list a.toggle').on('click', function(evt) {
evt.stopPropagation();
evt.preventDefault();
$(this).parent().parent().toggleClass('collapsed');
highlight();
});
}
function populateSearchCache() {
$('#full_list li .item').each(function() {
var $node = $(this);
var $link = $node.find('.object_link a');
if ($link.length > 0) {
searchCache.push({
node: $node,
link: $link,
name: $link.text(),
fullName: $link.attr('title').split(' ')[0]
});
}
});
}
function enableSearch() {
$('#search input').keyup(function(event) {
if (ignoredKeyPress(event)) return;
if (this.value === "") {
clearSearch();
} else {
performSearch(this.value);
}
});
$('#full_list').after("<div id='noresults' style='display:none'></div>");
}
function ignoredKeyPress(event) {
if (
(event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) ||
(event.keyCode == commandKey)
) {
return true;
} else {
return false;
}
}
function clearSearch() {
clearSearchTimeout();
$('#full_list .found').removeClass('found').each(function() {
var $link = $(this).find('.object_link a');
$link.text($link.text());
});
$('#full_list, #content').removeClass('insearch');
$clicked.parents().removeClass('collapsed');
highlight();
}
function performSearch(searchString) {
clearSearchTimeout();
$('#full_list, #content').addClass('insearch');
$('#noresults').text('').hide();
partialSearch(searchString, 0);
}
function partialSearch(searchString, offset) {
var lastRowClass = '';
var i = null;
for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) {
var item = searchCache[i];
var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
var matchString = buildMatchString(searchString);
var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
if (searchName.match(matchRegexp) == null) {
item.node.removeClass('found');
item.link.text(item.link.text());
}
else {
item.node.addClass('found');
item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>"));
}
}
if(i == searchCache.length) {
searchDone();
} else {
searchTimeout = setTimeout(function() {
partialSearch(searchString, i);
}, 0);
}
}
function searchDone() {
searchTimeout = null;
highlight();
if ($('#full_list li:visible').size() === 0) {
$('#noresults').text('No results were found.').hide().fadeIn();
} else {
$('#noresults').text('').hide();
}
$('#content').removeClass('insearch');
}
function buildMatchString(searchString, event) {
caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
var regexSearchString = RegExp.escape(searchString);
if (caseSensitiveMatch) {
regexSearchString += "|" +
$.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
join('.+?');
}
return regexSearchString;
}
function highlight() {
$('#full_list li:visible').each(function(n) {
$(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even');
});
}
/**
* Expands the tree to the target element and its immediate
* children.
*/
function expandTo(path) {
var $target = $(document.getElementById('object_' + path));
$target.addClass('clicked');
$target.removeClass('collapsed');
$target.parentsUntil('#full_list', 'li').removeClass('collapsed');
if($target[0]) {
window.scrollTo(window.scrollX, $target.offset().top - 250);
highlight();
}
}
function windowEvents(event) {
var msg = event.data;
if (msg.action === "expand") {
expandTo(msg.path);
}
return false;
}
window.addEventListener("message", windowEvents, false);
$(document).ready(function() {
escapeShortcut();
navResizer();
enableLinks();
enableToggles();
populateSearchCache();
enableSearch();
});
})();

4
doc/js/jquery.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,236 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
<title>Puppet Class List</title>
<base id="base_target" target="_parent" />
</head>
<body>
<div id="content">
<div class="fixed_header">
<h1 id="full_list_header">Puppet Class List</h1>
<div id="full_list_nav">
<span><a target="_self" href="puppet_class_list.html">
Puppet Classes
</a></span>
<span><a target="_self" href="puppet_defined_type_list.html">
Defined Types
</a></span>
</div>
<div id="search">Search: <input type="text" /></div>
</div>
<ul id="full_list" class="puppet_class">
<li id="object_puppet_classes::cd_nagios" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios.html" title="puppet_classes::cd_nagios (puppet_class)">cd_nagios</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::certbot::certs" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Acertbot_3A_3Acerts.html" title="puppet_classes::cd_nagios::certbot::certs (puppet_class)">cd_nagios::certbot::certs</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::client::target" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aclient_3A_3Atarget.html" title="puppet_classes::cd_nagios::client::target (puppet_class)">cd_nagios::client::target</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::firewall::iptables" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nagios::firewall::iptables (puppet_class)">cd_nagios::firewall::iptables</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::main::config" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::cd_nagios::main::config (puppet_class)">cd_nagios::main::config</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::main::dirs" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html" title="puppet_classes::cd_nagios::main::dirs (puppet_class)">cd_nagios::main::dirs</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::main::install" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::cd_nagios::main::install (puppet_class)">cd_nagios::main::install</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::main::user" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html" title="puppet_classes::cd_nagios::main::user (puppet_class)">cd_nagios::main::user</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::add_contact_rules" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contact_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_contact_rules (puppet_class)">cd_nagios::nagios::objects::add_contact_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::add_contactgroups_rules" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contactgroups_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_contactgroups_rules (puppet_class)">cd_nagios::nagios::objects::add_contactgroups_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::add_hostgroup_rules" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_hostgroup_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_hostgroup_rules (puppet_class)">cd_nagios::nagios::objects::add_hostgroup_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::add_servicegroup_rules" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroup_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_servicegroup_rules (puppet_class)">cd_nagios::nagios::objects::add_servicegroup_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::add_timeperiod_rules" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_timeperiod_rules.html" title="puppet_classes::cd_nagios::nagios::objects::add_timeperiod_rules (puppet_class)">cd_nagios::nagios::objects::add_timeperiod_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::commands" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acommands.html" title="puppet_classes::cd_nagios::nagios::objects::commands (puppet_class)">cd_nagios::nagios::objects::commands</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::config" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aconfig.html" title="puppet_classes::cd_nagios::nagios::objects::config (puppet_class)">cd_nagios::nagios::objects::config</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::contactgroups" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acontactgroups.html" title="puppet_classes::cd_nagios::nagios::objects::contactgroups (puppet_class)">cd_nagios::nagios::objects::contactgroups</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::contacts" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Acontacts.html" title="puppet_classes::cd_nagios::nagios::objects::contacts (puppet_class)">cd_nagios::nagios::objects::contacts</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::hostgroups" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Ahostgroups.html" title="puppet_classes::cd_nagios::nagios::objects::hostgroups (puppet_class)">cd_nagios::nagios::objects::hostgroups</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::servicegroups" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aservicegroups.html" title="puppet_classes::cd_nagios::nagios::objects::servicegroups (puppet_class)">cd_nagios::nagios::objects::servicegroups</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::template_rules" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplate_rules.html" title="puppet_classes::cd_nagios::nagios::objects::template_rules (puppet_class)">cd_nagios::nagios::objects::template_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::objects::timeperiods" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atimeperiods.html" title="puppet_classes::cd_nagios::nagios::objects::timeperiods (puppet_class)">cd_nagios::nagios::objects::timeperiods</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::nagios::resources::resource" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource.html" title="puppet_classes::cd_nagios::nagios::resources::resource (puppet_class)">cd_nagios::nagios::resources::resource</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::params" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::selinux::config" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html" title="puppet_classes::cd_nagios::selinux::config (puppet_class)">cd_nagios::selinux::config</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::server::access_rules" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html" title="puppet_classes::cd_nagios::server::access_rules (puppet_class)">cd_nagios::server::access_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::server::files" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html" title="puppet_classes::cd_nagios::server::files (puppet_class)">cd_nagios::server::files</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::server::service" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::cd_nagios::server::service (puppet_class)">cd_nagios::server::service</a></span>
</div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,121 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/init.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class initializes the cd_nagios Module.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::init.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@confdroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/init.pp', line 6</span>
class cd_nagios {
include cd_nagios::params
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,206 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::certbot::certs
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::certbot::certs";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::certbot::certs</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::certbot::certs</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/certbot/certs.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all configuration files required for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::certbot::certs.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/certbot/certs.pp', line 6</span>
class cd_nagios::certbot::certs (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https == true {
if $ng_enable_certbot == true {
require cd_certbot
require cd_apache
if $ng_include_fw == true {
require cd_nagios::firewall::iptables
}
# create cert
exec { &#39;create_cert&#39;:
command =&gt; template($ng_get_cert_erb),
cwd =&gt; &#39;/tmp&#39;,
path =&gt; [&#39;/bin&#39;,&#39;/usr/bin&#39;],
provider =&gt; &#39;shell&#39;,
unless =&gt; template(&#39;cd_nagios/certbot/unless_get_cert.erb&#39;),
notify =&gt; Service[&#39;httpd&#39;],
creates =&gt; $ng_certbot_check,
}
# renew certs
exec { &#39;renew_cert&#39;:
command =&gt; &#39;certbot renew&#39;,
cwd =&gt; &#39;/tmp&#39;,
path =&gt; [&#39;/bin&#39;,&#39;/usr/bin&#39;,&#39;/opt/&#39;],
provider =&gt; &#39;shell&#39;,
notify =&gt; Service[&#39;httpd&#39;],
unless =&gt; template($ng_unless_renew_erb),
}
}
}
else {
# do nothing as we are not using https and certbot is not required then
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,358 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::client::target
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::client::target";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::client::target</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::client::target</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/client/target.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
CLass manages Nagios targets for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::client::target.pp Module name: nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/client/target.pp', line 6</span>
class cd_nagios::client::target (
) inherits cd_nagios::params {
if $::fqdn != $ng_nagios_server {
if $ng_include_nrpe == true {
require cd_nagios::main::user
require cd_nrpe
@@nagios_host { $::fqdn:
ensure =&gt; $ng_ping_ensure,
alias =&gt; $::hostname,
address =&gt; $::fqdn,
use =&gt; &#39;linux-server&#39;,
target =&gt; $ng_target_host,
hostgroups =&gt; &#39;linux-servers&#39;,
contacts =&gt; &#39;ops&#39;,
max_check_attempts =&gt; $ng_max_check_attempts,
notification_period =&gt; &#39;24x7&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
check_command =&gt; &quot;check_ping!${ng_ping_warn}!${ng_ping_crit}&quot;,
notify =&gt; Service[$ng_user],
}
@@nagios_service { &quot;root_partition_${::hostname}&quot;:
ensure =&gt; $ng_disk_ensure,
check_command =&gt; &quot;check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_root_partition&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
if $ng_enable_swap_check == true {
@@nagios_service { &quot;Swap_Usage_${::hostname}&quot;:
ensure =&gt; $ng_swap_ensure,
check_command =&gt; &quot;check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_swap_usage&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
}
@@nagios_service { &quot;Local_Users_${::hostname}&quot;:
ensure =&gt; $ng_users_ensure,
check_command =&gt; &quot;check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_local_users&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
@@nagios_service { &quot;Total Processes_${::hostname}&quot;:
ensure =&gt; $ng_procs_tot_ens,
check_command =&gt; &quot;check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_total_processes&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
@@nagios_service { &quot;Zombie Processes_${::hostname}&quot;:
ensure =&gt; $ng_procs_z_ensure,
check_command =&gt; &quot;check_nrpe!check_procs!${ng_procs_z_warn}!${ng_procs_z_crit}!${ng_procs_z_param}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_zombie_processes&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
@@nagios_service { &quot;Current_Load_${::hostname}&quot;:
ensure =&gt; $ng_load_ensure,
check_command =&gt; &quot;check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_current_load&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,152 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::firewall::iptables
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::firewall::iptables";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::firewall::iptables</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::firewall::iptables</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/firewall/iptables.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
manage firewall settings through cd_firewall or puppetlabs-firewall
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::firewall::iptables.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 6</span>
class cd_nagios::firewall::iptables (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https != true {
include confdroid_infrastructure::firewall::http
if $ng_use_https == true {
include confdroid_infrastructure::firewall::https
if $ng_http_https_fw == true {
include confdroid_infrastructure::firewall::http
}
}
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,173 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::main::config
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::main::config";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::main::config</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::main::config</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/main/config.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all aspects of configuring the module logic for
cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::main::config.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 7</span>
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 $ng_enable_certbot == true {
require cd_nagios::certbot::certs
}
}
if $::fqdn != $ng_nagios_server {
include cd_nagios::client::target
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,526 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::main::dirs
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::main::dirs";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::main::dirs</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::main::dirs</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/main/dirs.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all directories required for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::main::dirs.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
class cd_nagios::main::dirs (
) inherits cd_nagios::params {
require cd_nagios::main::user
# main directory
file { $ng_main_dir:
ensure =&gt; directory,
path =&gt; $ng_main_dir,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# /usr/lib64/nagios dir required for plugins
file { $ng_lib_dir:
ensure =&gt; directory,
path =&gt; $ng_lib_dir,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; lib_t,
seluser =&gt; system_u,
}
# /var/spool/nagios
file { $ng_spool_dir:
ensure =&gt; directory,
path =&gt; $ng_spool_dir,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_spool_t,
seluser =&gt; system_u,
}
if $::fqdn == $ng_nagios_server {
# /etc/nagios/conf.d
file { $ng_conf_d_dir:
ensure =&gt; directory,
path =&gt; $ng_conf_d_dir,
owner =&gt; &#39;root&#39;,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# /etc/nagios/objects
file { $ng_objects_dir:
ensure =&gt; directory,
path =&gt; $ng_objects_dir,
owner =&gt; &#39;root&#39;,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# /etc/nagios/private
file { $ng_private_dir:
ensure =&gt; directory,
path =&gt; $ng_private_dir,
owner =&gt; &#39;root&#39;,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# include dir
file { $ng_usr_incl:
ensure =&gt; directory,
path =&gt; $ng_usr_incl,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; usr_t,
seluser =&gt; system_u,
}
# log dir
file { $ng_log_dir:
ensure =&gt; directory,
path =&gt; $ng_log_dir,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_log_t,
seluser =&gt; system_u,
}
# log archives
file { $ng_log_archives:
ensure =&gt; directory,
path =&gt; $ng_log_archives,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_log_t,
seluser =&gt; system_u,
}
# /usr/share/nagios
file { $ng_usr_share:
ensure =&gt; directory,
path =&gt; $ng_usr_share,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; usr_t,
seluser =&gt; system_u,
}
# /usr/share/nagios/html
file { $ng_share_html:
ensure =&gt; directory,
path =&gt; $ng_share_html,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; usr_t,
seluser =&gt; system_u,
}
# run dir for pid file
file { $ng_run_dir:
ensure =&gt; directory,
path =&gt; $ng_run_dir,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_var_run_t,
seluser =&gt; system_u,
}
# cmd dir
file { $ng_cmd_dir:
ensure =&gt; directory,
path =&gt; $ng_cmd_dir,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0775&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_spool_t,
seluser =&gt; system_u,
}
# checkresults dir
file { $ng_checkresults_dir:
ensure =&gt; directory,
path =&gt; $ng_checkresults_dir,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0770&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_spool_t,
seluser =&gt; system_u,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,193 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::main::install
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::main::install";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::main::install</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::main::install</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/main/install.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manage all aspects of installing binaries required for
cd_nagios
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::main::install.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 7</span>
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&#39;ll need httpd installed
require cd_apache
package {$reqpackages_server:
ensure =&gt; $pkg_ensure,
}
package {$reqpackages_client:
ensure =&gt; $pkg_ensure,
}
}
# if we are not the nagios server, install client packages
if $::fqdn != $ng_nagios_server {
package {$reqpackages_client:
ensure =&gt; $pkg_ensure,
}
# if we want to use NRPE, install it
if $ng_include_nrpe == true {
require cd_nrpe
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,172 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::main::user
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::main::user";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::main::user</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::main::user</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/main/user.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages service users for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::main::user.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/user.pp', line 6</span>
class cd_nagios::main::user (
) inherits cd_nagios::params {
require cd_nagios::main::install
group { $ng_user:
ensure =&gt; present,
name =&gt; $ng_user,
gid =&gt; $ng_u_uid,
allowdupe =&gt; false,
}
user { $ng_user:
ensure =&gt; present,
name =&gt; $ng_user,
allowdupe =&gt; false,
comment =&gt; $ng_u_comment,
uid =&gt; $ng_u_uid,
gid =&gt; $ng_user,
groups =&gt; $ng_u_groups,
managehome =&gt; true,
home =&gt; $ng_user_home,
shell =&gt; $ng_user_shell,
require =&gt; Group[$ng_user],
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,193 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::add_contact_rules
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::add_contact_rules";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_contact_rules</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::add_contact_rules</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_contact_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages /etc/nagios/conf.d/nagios_add_contact.cfg through
concat.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_contact_rules.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<p class="example_title"><div class='inline'>
<p>cd_nagios::nagios::objects::add_contact { example_user:</p>
</div></p>
<pre class="example code"><code>ng_contact_name =&gt; &#39;example_user&#39;,
ng_contact_alias =&gt; &#39;Example User&#39;,
ng_contact_groups =&gt; &#39;admins&#39;,
ng_contact_email =&gt; &#39;example@example.net&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_contact_rules.pp', line 13</span>
class cd_nagios::nagios::objects::add_contact_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/conf.d/nagios_add_contacts.cfg
concat { $ng_target_add_contact:
ensure =&gt; present,
path =&gt; $ng_target_add_contact,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
# manage file header
concat::fragment { &#39;contact_header&#39;:
target =&gt; $ng_target_add_contact,
content =&gt; template($ng_contacts_head_erb),
order =&gt; &#39;000&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,189 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::add_contactgroups_rules
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::add_contactgroups_rules";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_contactgroups_rules</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::add_contactgroups_rules</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_contactgroups_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages /etc/nagios/conf.d/nagios_add_contactgroups.cfg file
and populates through define and external puppet rules
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_contactgroups_rules.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::nagios::objects::add_contactgroups { &#39;example_group&#39;:
ng_contactgroup_name =&gt; &#39;example_group&#39;,
ng_contactgroup_alias =&gt; &#39;Example Group&#39;,
ng_contactgroup_register =&gt; &#39;1&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_contactgroups_rules.pp', line 13</span>
class cd_nagios::nagios::objects::add_contactgroups_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/conf.d/nagios_add_contactgroups.cfg
concat { $ng_tgt_contactgroup_add:
ensure =&gt; present,
path =&gt; $ng_tgt_contactgroup_add,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
# manage file header
concat::fragment { &#39;contactgroups_header&#39;:
target =&gt; $ng_tgt_contactgroup_add,
content =&gt; template($ng_cntctgrps_head_erb),
order =&gt; &#39;000&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,188 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::add_hostgroup_rules
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::add_hostgroup_rules";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_hostgroup_rules</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::add_hostgroup_rules</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_hostgroup_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages /etc/nagios_conf.d/nagios_hostgroups_add.cfg and
additional hostgroups through external Puppet rules via define.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_hostgroup_rules.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::nagios::objects::add_hostgroups { &#39;example_hostgroup&#39;:
ng_hostgroup_name =&gt; &#39;example_hostgroup&#39;,
ng_hostgroup_alias =&gt; &#39;Example Hostgroup&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_hostgroup_rules.pp', line 12</span>
class cd_nagios::nagios::objects::add_hostgroup_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios_conf.d/nagios_hostgroups_add.cfg
concat { $ng_tgt_hostgroup_add:
ensure =&gt; present,
path =&gt; $ng_tgt_hostgroup_add,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
# manage file header
concat::fragment { &#39;hostgroups_header&#39;:
target =&gt; $ng_tgt_hostgroup_add,
content =&gt; template($ng_tgt_hostgrp_head_erb),
order =&gt; &#39;000&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,188 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::add_servicegroup_rules
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::add_servicegroup_rules";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_servicegroup_rules</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::add_servicegroup_rules</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_servicegroup_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages /etc/nagios_conf.d/nagios_servicegroups_add.cfg and
additional servicegroups through external Puppet rules via define.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_servicegroup_rules.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::nagios::objects::add_servicegroups { &#39;example_servicegroup&#39;:
ng_servicegroup_name =&gt; &#39;example_servicegroup&#39;,
ng_servicegroup_alias =&gt; &#39;Example Servicegroup&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_servicegroup_rules.pp', line 12</span>
class cd_nagios::nagios::objects::add_servicegroup_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios_conf.d/nagios_servicegroups_add.cfg
concat { $ng_tgt_servicegroup_add:
ensure =&gt; present,
path =&gt; $ng_tgt_servicegroup_add,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
# manage file header
concat::fragment { &#39;servicegroups_header&#39;:
target =&gt; $ng_tgt_servicegroup_add,
content =&gt; template($ng_tgt_svcgrp_head_erb),
order =&gt; &#39;000&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,197 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::add_timeperiod_rules
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::add_timeperiod_rules";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_timeperiod_rules</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::add_timeperiod_rules</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_timeperiod_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages /etc/nagios_conf.d/nagios_timeperiods_add.cfg and
add. hostgroups through external Puppet rules via define.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_timeperiod_rules.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com) }</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<p class="example_title"><div class='inline'>
<p>cd_nagios::nagios::objects::add_timeperiods { example_timeperiod:</p>
</div></p>
<pre class="example code"><code>ng_timep_name =&gt; &#39;example_timeperiod&#39;,
ng_timep_alias =&gt; &#39;Example timeperiod&#39;,
ng_timep_monday =&gt; &#39;00:00-00:00&#39;,
ng_timep_tuesday =&gt; &#39;00:00-00:00&#39;,
ng_timep_wednesday =&gt; &#39;00:00-00:00&#39;,
ng_timep_thursday =&gt; &#39;00:00-00:00&#39;,
ng_timep_friday =&gt; &#39;00:00-00:00&#39;,
ng_timep_saturday =&gt; &#39;00:00-00:00&#39;,
ng_timep_sunday =&gt; &#39;00:00-00:00&#39;,</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_timeperiod_rules.pp', line 18</span>
class cd_nagios::nagios::objects::add_timeperiod_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/conf.d/nagios_timeperiods_add.cfg
concat { $ng_tgt_timep_add:
ensure =&gt; present,
path =&gt; $ng_tgt_timep_add,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
# manage file header
concat::fragment { &#39;timeperiods_header&#39;:
target =&gt; $ng_tgt_timep_add,
content =&gt; template($ng_tgt_timep_head_erb),
order =&gt; &#39;000&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,549 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::commands
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::commands";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::commands</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::commands</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/commands.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all commands known to NAGIOS through Puppet exports,
and populates /etc/nagios/conf.d/nagios_commands.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
187
188
189
190
191
192
193
194
195
196
197
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/commands.pp', line 8</span>
class cd_nagios::nagios::objects::commands (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
@@nagios_command { &#39;notify-host-by-email&#39;:
ensure =&gt; present,
command_name =&gt; &#39;notify-host-by-email&#39;,
command_line =&gt; &#39;/usr/bin/printf &quot;%b&quot; &quot;***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n&quot; | /bin/mail -s &quot;** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **&quot; $CONTACTEMAIL$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;notify-service-by-email&#39;:
ensure =&gt; present,
command_name =&gt; &#39;notify-service-by-email&#39;,
command_line =&gt; &#39;/usr/bin/printf &quot;%b&quot; &quot;***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n&quot; | /bin/mail -s &quot;** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **&quot; $CONTACTEMAIL$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check-host-alive&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check-host-alive&#39;,
command_line =&gt; &#39;$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_disk&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_disk&#39;,
command_line =&gt; &#39;$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_load&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_load&#39;,
command_line =&gt; &#39;$USER1$/check_load -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_procs&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_procs&#39;,
command_line =&gt; &#39;$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_users&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_users&#39;,
command_line =&gt; &#39;$USER1$/check_users -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_local_swap&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_local_swap&#39;,
command_line =&gt; &#39;$USER1$/check_swap -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ftp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ftp&#39;,
command_line =&gt; &#39;$USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_snmp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_snmp&#39;,
command_line =&gt; &#39;$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_http&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_http&#39;,
command_line =&gt; &#39;$USER1$/check_http -I $HOSTADDRESS$ $ARG1$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ssh&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ssh&#39;,
command_line =&gt; &#39;$USER1$/check_ssh $ARG1$ $HOSTADDRESS$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ping&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ping&#39;,
command_line =&gt; &#39;$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_tcp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_tcp&#39;,
command_line =&gt; &#39;$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_udp&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_udp&#39;,
command_line =&gt; &#39;$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_nrpe&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_nrpe&#39;,
command_line =&gt; &#39;$USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_nagios&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_nagios&#39;,
command_line =&gt; &#39;$USER1$/check_nagios -F $ARG1$ -e $ARG2$ -C $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_bandwidth&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_bandwidth&#39;,
command_line =&gt; &#39;$USER1$/check_bandwidth.sh -t 30 -H $HOSTADDRESS$ linux $ARG1$ $ARG2$ $ARG3$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;process-service-perfdata-file&#39;:
ensure =&gt; present,
command_name =&gt; &#39;process-service-perfdata-file&#39;,
command_line =&gt; &#39;/bin/mv /var/log/pnp4nagios/service-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;process-host-perfdata-file&#39;:
ensure =&gt; present,
command_name =&gt; &#39;process-host-perfdata-file&#39;,
command_line =&gt; &#39;/bin/mv /var/log/pnp4nagios/host-perfdata /var/spool/pnp4nagios/host-perfdata.$TIMET$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
@@nagios_command { &#39;check_ntp_time&#39;:
ensure =&gt; present,
command_name =&gt; &#39;check_ntp_time&#39;,
command_line =&gt; &#39;$USER1$/check_ntp_time -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$&#39;,
owner =&gt; &#39;nagios&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0640&#39;,
target =&gt; $ng_target_command,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,158 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::config
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::config";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::config</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::config</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/config.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages the nagios objects definitions.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::nagios::objects::config.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/config.pp', line 6</span>
class cd_nagios::nagios::objects::config (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::nagios::objects::commands
require cd_nagios::nagios::objects::template_rules
require cd_nagios::nagios::objects::contacts
require cd_nagios::nagios::objects::add_contact_rules
require cd_nagios::nagios::objects::contactgroups
require cd_nagios::nagios::objects::add_contactgroups_rules
require cd_nagios::nagios::objects::hostgroups
require cd_nagios::nagios::objects::add_hostgroup_rules
require cd_nagios::nagios::objects::servicegroups
require cd_nagios::nagios::objects::add_servicegroup_rules
require cd_nagios::nagios::objects::timeperiods
require cd_nagios::nagios::objects::add_timeperiod_rules
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,213 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::contactgroups
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::contactgroups";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::contactgroups</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::contactgroups</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/contactgroups.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages base contactgroups which always should be there.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::contactgroups.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>@@nagios_contactgroup { &#39;admins&#39;:
ensure =&gt; present,
alias =&gt; &#39;Nagios Administrators&#39;,
contactgroup_name =&gt; &#39;admins&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_contactgroup_base,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
17
18
19
20
21
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/contactgroups.pp', line 17</span>
class cd_nagios::nagios::objects::contactgroups (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
@@nagios_contactgroup { &#39;admins&#39;:
ensure =&gt; present,
alias =&gt; &#39;Nagios Administrators&#39;,
contactgroup_name =&gt; &#39;admins&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_contactgroup_base,
}
@@nagios_contactgroup { &#39;operations&#39;:
ensure =&gt; present,
alias =&gt; &#39;Operations Team&#39;,
contactgroup_name =&gt; &#39;operations&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_contactgroup_base,
}
@@nagios_contactgroup { &#39;support&#39;:
ensure =&gt; present,
alias =&gt; &#39;Support Team&#39;,
contactgroup_name =&gt; &#39;support&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_contactgroup_base,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,260 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::contacts
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::contacts";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::contacts</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::contacts</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/contacts.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages basic contacts known to NAGIOS through Puppet exports,
and populates /etc/nagios/conf.d/nagios_base_contacts.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::contacts.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>@@nagios_contact { &#39;admin&#39;:
ensure =&gt; present,
alias =&gt; &#39;Nagios Admin&#39;,
contact_name =&gt; &#39;admin&#39;,
contactgroups =&gt; &#39;admins&#39;,
email =&gt; &quot;admin@${::domain}&quot;,
can_submit_commands =&gt; &#39;1&#39;,
register =&gt; &#39;1&#39;,
use =&gt; &#39;generic-contact&#39;,
target =&gt; $ng_target_base_contact,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;nagios&#39;,
mode =&gt; &#39;0664&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/contacts.pp', line 22</span>
class cd_nagios::nagios::objects::contacts (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# admin contact
@@nagios_contact { &#39;admin&#39;:
ensure =&gt; present,
alias =&gt; &#39;Nagios Admin&#39;,
contact_name =&gt; &#39;admin&#39;,
contactgroups =&gt; &#39;admins&#39;,
email =&gt; &quot;admin@${::domain}&quot;,
can_submit_commands =&gt; &#39;1&#39;,
register =&gt; &#39;1&#39;,
use =&gt; &#39;generic-contact&#39;,
target =&gt; $ng_target_base_contact,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
# ops contact
@@nagios_contact { &#39;ops&#39;:
ensure =&gt; present,
alias =&gt; &#39;Operations&#39;,
contact_name =&gt; &#39;ops&#39;,
contactgroups =&gt; &#39;operations&#39;,
email =&gt; &quot;ops@${::domain}&quot;,
can_submit_commands =&gt; &#39;1&#39;,
register =&gt; &#39;1&#39;,
use =&gt; &#39;generic-contact&#39;,
target =&gt; $ng_target_base_contact,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
# support contact
@@nagios_contact { &#39;support&#39;:
ensure =&gt; present,
alias =&gt; &#39;support&#39;,
contact_name =&gt; &#39;support&#39;,
contactgroups =&gt; &#39;support&#39;,
email =&gt; &quot;support@${::domain}&quot;,
can_submit_commands =&gt; &#39;1&#39;,
register =&gt; &#39;1&#39;,
use =&gt; &#39;generic-contact&#39;,
target =&gt; $ng_target_base_contact,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,525 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::hostgroups
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::hostgroups";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::hostgroups</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::hostgroups</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/hostgroups.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages basic hostgroups known to NAGIOS through Puppet
exports, and populates /etc/nagios/conf.d/nagios_base_hostgroups.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::hostgroups.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/hostgroups.pp', line 7</span>
class cd_nagios::nagios::objects::hostgroups (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# linux servers
@@nagios_hostgroup { &#39;linux-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;linux-servers&#39;,
alias =&gt; &#39;Linux Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# RHEL servers
@@nagios_hostgroup { &#39;rhel-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;rhel-servers&#39;,
alias =&gt; &#39;RHEL Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# CentOS servers
@@nagios_hostgroup { &#39;centos-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;centos-servers&#39;,
alias =&gt; &#39;CentOS Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# SuSE servers
@@nagios_hostgroup { &#39;suse-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;suse-servers&#39;,
alias =&gt; &#39;SuSE Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# Unix servers
@@nagios_hostgroup { &#39;unix-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;unix-servers&#39;,
alias =&gt; &#39;Unix Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# Solaris servers
@@nagios_hostgroup { &#39;solaris-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;solaris-servers&#39;,
alias =&gt; &#39;Solaris Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# AIX servers
@@nagios_hostgroup { &#39;aix-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;aix-servers&#39;,
alias =&gt; &#39;AIX Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# Windows servers
@@nagios_hostgroup { &#39;windows-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;windows-servers&#39;,
alias =&gt; &#39;Windows Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# Netware servers
@@nagios_hostgroup { &#39;netware-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;netware-servers&#39;,
alias =&gt; &#39;Netware Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# DB servers
@@nagios_hostgroup { &#39;db-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;db-servers&#39;,
alias =&gt; &#39;DB Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# Oracle servers
@@nagios_hostgroup { &#39;oracle-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;oracle-servers&#39;,
alias =&gt; &#39;Oracle Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# MySQL servers
@@nagios_hostgroup { &#39;mysql-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;mysql-servers&#39;,
alias =&gt; &#39;MySQL Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# MSSQL servers
@@nagios_hostgroup { &#39;mssql-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;mssql-servers&#39;,
alias =&gt; &#39;MSSQL Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# NOSQL servers
@@nagios_hostgroup { &#39;nosql-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;nosql-servers&#39;,
alias =&gt; &#39;NOSQL Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
# Hadoop servers
@@nagios_hostgroup { &#39;hadoop-servers&#39;:
ensure =&gt; present,
hostgroup_name =&gt; &#39;hadoop-servers&#39;,
alias =&gt; &#39;HADOOP Servers&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_hostgroup_base,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,209 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::servicegroups
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::servicegroups";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::servicegroups</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::servicegroups</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/servicegroups.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages basic hostgroups known to NAGIOS through Puppet
exports, and populates /etc/nagios/conf.d/nagios_base_hostgroups.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::servicegroups.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/servicegroups.pp', line 7</span>
class cd_nagios::nagios::objects::servicegroups (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# network services
@@nagios_servicegroup { &#39;network-services&#39;:
ensure =&gt; present,
servicegroup_name =&gt; &#39;network-services&#39;,
alias =&gt; &#39;Network Services&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_svcgrp_base,
}
# linux services
@@nagios_servicegroup { &#39;linux-services&#39;:
ensure =&gt; present,
servicegroup_name =&gt; &#39;linux-services&#39;,
alias =&gt; &#39;Linux Services&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_svcgrp_base,
}
# database services
@@nagios_servicegroup { &#39;database-services&#39;:
ensure =&gt; present,
servicegroup_name =&gt; &#39;database-services&#39;,
alias =&gt; &#39;Database Services&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_target_svcgrp_base,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,279 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::template_rules
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::template_rules";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::template_rules</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::template_rules</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/template_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages /etc/nagios/conf.d/nagios_templates.cfg through
concat.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::template_rules.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<p class="example_title"><div class='inline'>
<p>cd_nagios::nagios::objects::templates { generic contact:</p>
</div></p>
<pre class="example code"><code>ng_template_object =&gt; &#39;contact&#39;,
ng_template_object_name =&gt; &#39;generic-contact&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
11
12
13
14
15
16
17
18
19
20
21
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/template_rules.pp', line 11</span>
class cd_nagios::nagios::objects::template_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# create the templates.cfg file
concat { $ng_target_templates:
ensure =&gt; present,
path =&gt; $ng_target_templates,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
concat::fragment { &#39;template_header&#39;:
target =&gt; $ng_target_templates,
content =&gt; template($ng_templates_head_erb),
order =&gt; &#39;000&#39;,
}
# basic templates
cd_nagios::nagios::objects::templates { &#39;generic contact&#39;:
ng_template_object =&gt; &#39;contact&#39;,
ng_template_object_name =&gt; &#39;generic-contact&#39;,
}
cd_nagios::nagios::objects::templates { &#39;generic-host&#39;:
ng_template_object =&gt; &#39;host&#39;,
ng_template_object_name =&gt; &#39;generic-host&#39;,
}
cd_nagios::nagios::objects::templates { &#39;linux-server&#39;:
ng_template_object =&gt; &#39;host&#39;,
ng_template_object_name =&gt; &#39;linux-server&#39;,
ng_template_object_use =&gt; &#39;generic-host&#39;,
ng_notification_options =&gt; &#39;d,u,r&#39;,
}
cd_nagios::nagios::objects::templates { &#39;windows-server&#39;:
ng_template_object =&gt; &#39;host&#39;,
ng_template_object_name =&gt; &#39;windows-server&#39;,
ng_template_object_use =&gt; &#39;generic-host&#39;,
ng_notification_options =&gt; &#39;d,u,r&#39;,
}
cd_nagios::nagios::objects::templates { &#39;generic-switch&#39;:
ng_template_object =&gt; &#39;host&#39;,
ng_template_object_name =&gt; &#39;generic-switch&#39;,
ng_template_object_use =&gt; &#39;generic-host&#39;,
ng_notification_options =&gt; &#39;d,u,r&#39;,
}
cd_nagios::nagios::objects::templates { &#39;generic-printer&#39;:
ng_template_object =&gt; &#39;host&#39;,
ng_template_object_name =&gt; &#39;generic-printer&#39;,
ng_template_object_use =&gt; &#39;generic-host&#39;,
ng_notification_options =&gt; &#39;d,u,r&#39;,
}
cd_nagios::nagios::objects::templates { &#39;generic-service&#39;:
ng_template_object =&gt; &#39;service&#39;,
ng_template_object_name =&gt; &#39;generic-service&#39;,
ng_max_check_attempts =&gt; &#39;3&#39;,
ng_notification_options =&gt; &#39;w,u,c,r&#39;,
}
cd_nagios::nagios::objects::templates { &#39;local-service&#39;:
ng_template_object =&gt; &#39;service&#39;,
ng_template_object_name =&gt; &#39;local-service&#39;,
ng_max_check_attempts =&gt; &#39;4&#39;,
ng_template_object_use =&gt; &#39;generic-service&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,261 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::objects::timeperiods
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::objects::timeperiods";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::timeperiods</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::objects::timeperiods</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/timeperiods.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages main timeperiods for NAGIOS through Puppet exports,
and populates /etc/nagios/conf.d/nagios_timeperiods_base.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::timeperiods.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/timeperiods.pp', line 7</span>
class cd_nagios::nagios::objects::timeperiods (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
@@nagios_timeperiod { &#39;24x7&#39;:
ensure =&gt; present,
timeperiod_name =&gt; &#39;24x7&#39;,
alias =&gt; &#39;24 Hours A Day, 7 Days A Week&#39;,
monday =&gt; &#39;00:00-24:00&#39;,
tuesday =&gt; &#39;00:00-24:00&#39;,
wednesday =&gt; &#39;00:00-24:00&#39;,
thursday =&gt; &#39;00:00-24:00&#39;,
friday =&gt; &#39;00:00-24:00&#39;,
saturday =&gt; &#39;00:00-24:00&#39;,
sunday =&gt; &#39;00:00-24:00&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { &#39;office_hours&#39;:
ensure =&gt; present,
timeperiod_name =&gt; &#39;office_hours&#39;,
alias =&gt; &#39;Office hours only, 5 Days A Week 09-05&#39;,
monday =&gt; &#39;09:00-17:00&#39;,
tuesday =&gt; &#39;09:00-17:00&#39;,
wednesday =&gt; &#39;09:00-17:00&#39;,
thursday =&gt; &#39;09:00-17:00&#39;,
friday =&gt; &#39;09:00-17:00&#39;,
saturday =&gt; &#39;00:00-00:00&#39;,
sunday =&gt; &#39;00:00-00:00&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { &#39;out_of_hours&#39;:
ensure =&gt; present,
timeperiod_name =&gt; &#39;out_of_hours&#39;,
alias =&gt; &#39;Outside Office hours only&#39;,
monday =&gt; &#39;17:00-09:00&#39;,
tuesday =&gt; &#39;17:00-09:00&#39;,
wednesday =&gt; &#39;17:00-09:00&#39;,
thursday =&gt; &#39;17:00-09:00&#39;,
friday =&gt; &#39;17:00-09:00&#39;,
saturday =&gt; &#39;00:00-24:00&#39;,
sunday =&gt; &#39;00:00-24:00&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { &#39;none&#39;:
ensure =&gt; present,
timeperiod_name =&gt; &#39;none&#39;,
alias =&gt; &#39;No Time Is A Good Time&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
register =&gt; &#39;1&#39;,
target =&gt; $ng_tgt_timeperiods_base,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,220 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::nagios::resources::resource
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::nagios::resources::resource";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::nagios::resources::resource</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::nagios::resources::resource</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/resources/resource.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages the resource config file header.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::resources::resource.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
<h1 id="label-License-3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios Copyright © 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.</p>
<p>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.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/. }</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<p class="example_title"><div class='inline'>
<p>concat::fragment { “user_rule_plugins”:</p>
</div></p>
<pre class="example code"><code>ng_user_arg_name =&gt; &quot;$user1$&quot;,
ng_user_arg_value =&gt; &#39;/usr/lib64/nagios/plugins&#39;,
ng_user_arg_comment =&gt; &quot;Sets $USER1$ to be the path to the plugins&quot;,</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/resources/resource.pp', line 28</span>
class cd_nagios::nagios::resources::resource (
) inherits cd_nagios::params {
if $fqdn == $ng_nagios_server {
concat { $ng_resource_file:
ensure =&gt; present,
owner =&gt; &#39;root&#39;,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
concat::fragment { &#39;header&#39;:
target =&gt; $ng_resource_file,
content =&gt; template($ng_resource_erb),
order =&gt; &#39;000&#39;,
}
# plugins rule
cd_nagios::nagios::resources::resource_df { &#39;user_rule_plugins&#39;:
ng_user_arg_name =&gt; &#39;USER1&#39;,
ng_user_arg_value =&gt; &#39;/usr/lib64/nagios/plugins/&#39;,
ng_user_arg_comment =&gt; &#39;Sets user1 to be the path to the plugins&#39;,
}
# eventhandlers rule
cd_nagios::nagios::resources::resource_df { &#39;user_rule_eventhandlers&#39;:
ng_user_arg_name =&gt; &#39;USER2&#39;,
ng_user_arg_value =&gt; &#39;/usr/lib64/nagios/plugins/eventhandlers/&#39;,
ng_user_arg_comment =&gt; &#39;Sets user2 to be the path to the eventhandlers&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -1,392 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::selinux::config
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::selinux::config";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::selinux::config</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::selinux::config</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/selinux/config.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all aspects of selinux for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::selinux::config.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/selinux/config.pp', line 6</span>
class cd_nagios::selinux::config (
) inherits cd_nagios::params {
if $ng_use_selinux_tools == true {
require cd_selinux
# it appears that selinux behaves differently across 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 { &#39;create_avc_list&#39;:
command =&gt; &#39;sealert -a /var/log/audit/audit.log &gt; avc_alerts&#39;,
cwd =&gt; $ng_user_home,
path =&gt; [&#39;/usr/bin&#39;],
creates =&gt; &quot;${ng_user_home}/avc_alerts&quot;,
}
# sealert tac-cgi
# exec { &#39;create_policy_taccgi&#39;:
# command =&gt; template($ng_taccgi_erb),
# path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
# user =&gt; $ng_user,
# cwd =&gt; $ng_user_home,
# creates =&gt; &quot;${ng_user_home}/my-taccgi.pp&quot;,
# notify =&gt; Exec[&#39;semodule_taccgi&#39;],
# }
# exec { &#39;semodule_taccgi&#39;:
# command =&gt; &quot;semodule -i ${ng_user_home}/my-taccgi.pp&quot;,
# path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
# user =&gt; $ng_user,
# cwd =&gt; $ng_user_home,
# require =&gt; Exec[&#39;create_policy_taccgi&#39;],
# refreshonly =&gt; true,
# }
# sealert status.cgi
# exec { &#39;create_policy_statuscgi&#39;:
# command =&gt; template($ng_statcgi_erb),
# path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
# cwd =&gt; $ng_user_home,
# creates =&gt; &quot;${ng_user_home}/my-statuscgi.pp&quot;,
# notify =&gt; Exec[&#39;semodule_statuscgi&#39;],
# }
# exec { &#39;semodule_statuscgi&#39;:
# command =&gt; &#39;semodule -i my-statuscgi.pp&#39;,
# path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
# cwd =&gt; $ng_user_home,
# require =&gt; Exec[&#39;create_policy_statuscgi&#39;],
# refreshonly =&gt; true,
# notify =&gt; Service[$ng_service],
# }
# sealert check_nrpe
# exec { &#39;create_policy_checknrpe&#39;:
# command =&gt; template($ng_checknrpe_erb),
# path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
# cwd =&gt; $ng_user_home,
# creates =&gt; &quot;${ng_user_home}/my-checknrpe.pp&quot;,
# notify =&gt; Exec[&#39;semodule_checknrpe&#39;],
# }
# exec { &#39;semodule_checknrpe&#39;:
# command =&gt; &#39;semodule -i my-checknrpe.pp&#39;,
# path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
# cwd =&gt; $ng_user_home,
# require =&gt; Exec[&#39;create_policy_checknrpe&#39;],
# refreshonly =&gt; true,
# notify =&gt; Service[$ng_service],
# }
# sealert check_nagios
# exec { &#39;create_policy_checknagios&#39;:
# command =&gt; template($ng_checknagios_erb),
# path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
# cwd =&gt; $ng_user_home,
# creates =&gt; &quot;${ng_user_home}/my-checknagios.pp&quot;,
# notify =&gt; Exec[&#39;semodule_checknagios&#39;],
# }
# exec { &#39;semodule_checknagios&#39;:
# command =&gt; &#39;semodule -i my-checknagios.pp&#39;,
# path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
# cwd =&gt; $ng_user_home,
# require =&gt; Exec[&#39;create_policy_checknagios&#39;],
# refreshonly =&gt; true,
# notify =&gt; Service[$ng_service],
# }
# sealert status.dat
exec { &#39;create_policy_statusdat&#39;:
command =&gt; template($ng_statdat_erb),
path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
user =&gt; $ng_user,
cwd =&gt; $ng_user_home,
creates =&gt; &quot;${ng_user_home}/my-http.pp&quot;,
notify =&gt; Exec[&#39;semodule_statusdat&#39;],
}
exec { &#39;semodule_statusdat&#39;:
command =&gt; &quot;semodule -i ${ng_user_home}/my-httpd.pp&quot;,
path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
user =&gt; $ng_user,
cwd =&gt; $ng_user_home,
require =&gt; Exec[&#39;create_policy_statusdat&#39;],
refreshonly =&gt; true,
notify =&gt; Service[$ng_service],
}
# sealert grep
exec { &#39;create_policy_grep&#39;:
command =&gt; template($ng_grep_erb),
path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
user =&gt; $ng_user,
cwd =&gt; $ng_user_home,
creates =&gt; &quot;${ng_user_home}/my-grep.pp&quot;,
notify =&gt; Exec[&#39;semodule_statusdat&#39;],
}
exec { &#39;semodule_grep&#39;:
command =&gt; &quot;semodule -i ${ng_user_home}/my-grep.pp&quot;,
path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
user =&gt; $ng_user,
cwd =&gt; $ng_user_home,
require =&gt; Exec[&#39;create_policy_grep&#39;],
refreshonly =&gt; true,
notify =&gt; Service[$ng_service],
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,171 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::server::access_rules
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::server::access_rules";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::server::access_rules</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::server::access_rules</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/server/access_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages presence of /etc/nagios/phtpasswd file.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::access_rules.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::server::access { &#39;example&#39;:
ng_htpasswd_user =&gt; &#39;example_user&#39;,
ng_htpasswd_password =&gt; &#39;example_password_encrypted&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/access_rules.pp', line 11</span>
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 =&gt; present,
path =&gt; $ng_htpasswd_file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;apache&#39;,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
notify =&gt; Service[$ng_service],
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,306 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::server::files
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::server::files";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::server::files</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::server::files</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/server/files.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all configuration files required for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::files.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 6</span>
class cd_nagios::server::files (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https == true {
if $ng_enable_certbot == true {
require cd_nagios::certbot::certs
}
}
require cd_nagios::main::dirs
# manage nagios.cfg
file { $ng_nagios_cfg_file:
ensure =&gt; file,
path =&gt; $ng_nagios_cfg_file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
content =&gt; template($ng_nagios_cfg_erb),
notify =&gt; Service[$ng_service],
}
# manage cgi.cfg
file { $ng_cgi_cfg_file:
ensure =&gt; file,
path =&gt; $ng_cgi_cfg_file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
content =&gt; template($ng_cgi_cfg_erb),
notify =&gt; Service[$ng_service],
}
## Apache files
# since we use vhost files, we do not want the regular file to appear
# after upgrades to avoid conflicts
file { $ng_nagios_conf:
ensure =&gt; absent,
}
file { $ng_forward_conf:
ensure =&gt; file,
path =&gt; $ng_forward_conf,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; httpd_config_t,
seluser =&gt; system_u,
content =&gt; template($ng_forward_conf_erb),
notify =&gt; Service[$ae_service],
}
if $ng_use_https == true {
# create ssl vhost
file { $ng_ssl_vhost_file:
ensure =&gt; file,
path =&gt; $ng_ssl_vhost_file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; httpd_config_t,
seluser =&gt; system_u,
content =&gt; template($ng_ssl_vhost_erb),
notify =&gt; Service[$ae_service],
}
}
if $ng_use_https != true {
# remove ssl_vhost
file { $ng_ssl_vhost_file:
ensure =&gt; absent,
}
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,506 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::server::service
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_classes::cd_nagios::server::service";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::server::service</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::server::service</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/server/service.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages the service(s) for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::service.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
187
188
189
190
191
192
193
194
195
196
197
198</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
class cd_nagios::server::service (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_include_nrpe == true {
require cd_nrpe
}
require cd_nagios::server::files
require cd_nagios::server::access_rules
require cd_nagios::nagios::objects::config
require cd_nagios::nagios::resources::resource
service { $ng_service:
ensure =&gt; running,
hasstatus =&gt; true,
hasrestart =&gt; true,
enable =&gt; true,
}
@@nagios_host { &#39;localhost&#39;:
ensure =&gt; $ng_ping_ensure,
alias =&gt; &#39;localhost&#39;,
address =&gt; &#39;127.0.0.1&#39;,
use =&gt; &#39;linux-server&#39;,
target =&gt; $ng_target_localhost,
hostgroups =&gt; &#39;linux-servers&#39;,
contacts =&gt; &#39;ops&#39;,
max_check_attempts =&gt; $ng_max_check_attempts,
notification_period =&gt; &#39;24x7&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
check_command =&gt; &quot;check_ping!${ng_ping_warn}!${ng_ping_crit}&quot;,
notify =&gt; Service[$ng_service],
}
@@nagios_service { &#39;check_nagios_localhost&#39;:
check_command =&gt; $ng_nagios_service_cmd,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; &#39;localhost&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &#39;localhost_nagios_service&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
contacts =&gt; &#39;ops&#39;,
}
@@nagios_host { $::fqdn:
ensure =&gt; $ng_ping_ensure,
alias =&gt; $::hostname,
address =&gt; $::fqdn,
use =&gt; &#39;linux-server&#39;,
target =&gt; $ng_target_host,
hostgroups =&gt; &#39;linux-servers&#39;,
contacts =&gt; &#39;ops&#39;,
max_check_attempts =&gt; $ng_max_check_attempts,
notification_period =&gt; &#39;24x7&#39;,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
check_command =&gt; &quot;check_ping!${ng_ping_warn}!${ng_ping_crit}&quot;,
notify =&gt; Service[$ng_user],
}
@@nagios_service { &quot;root_partition_${::hostname}&quot;:
ensure =&gt; $ng_disk_ensure,
check_command =&gt; &quot;check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_root_partition&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
if $ng_enable_swap_check == true {
@@nagios_service { &quot;Swap_Usage_${::hostname}&quot;:
ensure =&gt; $ng_swap_ensure,
check_command =&gt; &quot;check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_swap_usage&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
}
@@nagios_service { &quot;Local_Users_${::hostname}&quot;:
ensure =&gt; $ng_users_ensure,
check_command =&gt; &quot;check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_local_users&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
@@nagios_service { &quot;Total Processes_${::hostname}&quot;:
ensure =&gt; $ng_procs_tot_ens,
check_command =&gt; &quot;check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_total_processes&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
@@nagios_service { &quot;Zombie Processes_${::hostname}&quot;:
ensure =&gt; $ng_procs_z_ensure,
check_command =&gt; &quot;check_nrpe!check_procs!${ng_procs_z_warn}!${ng_procs_z_crit}!${ng_procs_z_param}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_zombie_processes&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
@@nagios_service { &quot;Current_Load_${::hostname}&quot;:
ensure =&gt; $ng_load_ensure,
check_command =&gt; &quot;check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}&quot;,
use =&gt; &#39;generic-service&#39;,
host_name =&gt; $::fqdn,
contacts =&gt; &#39;ops&#39;,
notification_period =&gt; &#39;24x7&#39;,
service_description =&gt; &quot;${::hostname}_current_load&quot;,
servicegroups =&gt; &#39;linux-services&#39;,
target =&gt; $ng_target_service,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0640&#39;,
}
resources { [&#39;nagios_host&#39;,
&#39;nagios_hostgroup&#39;,
&#39;nagios_hostdependency&#39;,
&#39;nagios_hostescalation&#39;,
&#39;nagios_hostextinfo&#39;,
&#39;nagios_service&#39;,
&#39;nagios_servicegroup&#39;,
&#39;nagios_servicedependency&#39;,
&#39;nagios_serviceescalation&#39;,
&#39;nagios_serviceextinfo&#39;,
&#39;nagios_contact&#39;,
&#39;nagios_contactgroup&#39;,
&#39;nagios_command&#39;,
&#39;nagios_timeperiod&#39;]:
purge =&gt; true,
}
# collect resources and populate /etc/nagios/conf.d/nagios_*.cfg
Nagios_host &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostgroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostdependency &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostescalation &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_hostextinfo &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_service &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_servicegroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_servicedependency &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_serviceescalation &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_serviceextinfo &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_contact &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_contactgroup &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_command &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
Nagios_timeperiod &lt;&lt;||&gt;&gt; { notify =&gt; Service[&#39;nagios&#39;] }
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,103 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
<title>Defined Type List</title>
<base id="base_target" target="_parent" />
</head>
<body>
<div id="content">
<div class="fixed_header">
<h1 id="full_list_header">Defined Type List</h1>
<div id="full_list_nav">
<span><a target="_self" href="puppet_class_list.html">
Puppet Classes
</a></span>
<span><a target="_self" href="puppet_defined_type_list.html">
Defined Types
</a></span>
</div>
<div id="search">Search: <input type="text" /></div>
</div>
<ul id="full_list" class="puppet_defined_type">
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::add_contact" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contact.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_contact (puppet_defined_type)">cd_nagios::nagios::objects::add_contact</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::add_contactgroups" class="even">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_contactgroups.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_contactgroups (puppet_defined_type)">cd_nagios::nagios::objects::add_contactgroups</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::add_hostgroups" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_hostgroups.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_hostgroups (puppet_defined_type)">cd_nagios::nagios::objects::add_hostgroups</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::add_servicegroups" class="even">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_servicegroups.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_servicegroups (puppet_defined_type)">cd_nagios::nagios::objects::add_servicegroups</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::add_timeperiods" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Aadd_timeperiods.html" title="puppet_defined_types::cd_nagios::nagios::objects::add_timeperiods (puppet_defined_type)">cd_nagios::nagios::objects::add_timeperiods</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::objects::templates" class="even">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aobjects_3A_3Atemplates.html" title="puppet_defined_types::cd_nagios::nagios::objects::templates (puppet_defined_type)">cd_nagios::nagios::objects::templates</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::nagios::resources::resource_df" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Anagios_3A_3Aresources_3A_3Aresource_df.html" title="puppet_defined_types::cd_nagios::nagios::resources::resource_df (puppet_defined_type)">cd_nagios::nagios::resources::resource_df</a></span>
</div>
</li>
<li id="object_puppet_defined_types::cd_nagios::server::access" class="even">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html" title="puppet_defined_types::cd_nagios::server::access (puppet_defined_type)">cd_nagios::server::access</a></span>
</div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -1,261 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::nagios::objects::add_contact
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_defined_types::cd_nagios::nagios::objects::add_contact";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_contact</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::nagios::objects::add_contact</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_contact.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Define manages additional contacts known to NAGIOS through external
Puppet rules, and populates /etc/nagios/conf.d/nagios_add_contact.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_contact.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::nagios::objects::add_contact { &#39;example_user&#39;:
ng_contact_name =&gt; &#39;example_user&#39;,
ng_contact_alias =&gt; &#39;Example User&#39;,
ng_contact_groups =&gt; &#39;admins&#39;,
ng_contact_email =&gt; &#39;example@example.net&#39;,
}</code></pre>
</div>
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_contact_name</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the contact short name.</p>
</div>
</li>
<li>
<span class='name'>ng_contact_use</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;generic-contact&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>which contact template to use</p>
</div>
</li>
<li>
<span class='name'>ng_contact_alias</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the contact alias (long name).</p>
</div>
</li>
<li>
<span class='name'>ng_contact_email</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the contact email address.</p>
</div>
</li>
<li>
<span class='name'>ng_contact_groups</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>specify the contact group for the contact.</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_contact.pp', line 19</span>
define cd_nagios::nagios::objects::add_contact (
Optional[String] $ng_contact_name = undef,
String $ng_contact_use = &#39;generic-contact&#39;,
Optional[String] $ng_contact_alias = undef,
Optional[String] $ng_contact_email = undef,
Optional[String] $ng_contact_groups = undef,
) {
$ng_nagios_server = $::cd_nagios::params::ng_nagios_server
$ng_target_add_contact = $::cd_nagios::params::ng_target_add_contact
$ng_contacts_rule_erb = $::cd_nagios::params::ng_contacts_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target =&gt; $ng_target_add_contact,
content =&gt; template($ng_contacts_rule_erb),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,208 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::nagios::objects::add_contactgroups
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_defined_types::cd_nagios::nagios::objects::add_contactgroups";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_contactgroups</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::nagios::objects::add_contactgroups</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_contactgroups.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Define populates /etc/nagios/conf.d/nagios_add_contactgroups through
external puppet rules.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_contactgroups.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_contactgroup_name</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the short name of the contact group.</p>
</div>
</li>
<li>
<span class='name'>ng_contactgroup_alias</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the alias (long name) of the contact group</p>
</div>
</li>
<li>
<span class='name'>ng_contactgroup_register</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify whether the contact group should be registered in Nagios.</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_contactgroups.pp', line 13</span>
define cd_nagios::nagios::objects::add_contactgroups (
Optional[String] $ng_contactgroup_name = undef,
Optional[String] $ng_contactgroup_alias = undef,
String $ng_contactgroup_register = &#39;1&#39;,
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_tgt_contactgroup_add = $cd_nagios::params::ng_tgt_contactgroup_add
$ng_cntctgrps_rule_erb = $cd_nagios::params::ng_cntctgrps_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target =&gt; $ng_tgt_contactgroup_add,
content =&gt; template($ng_cntctgrps_rule_erb),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,219 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::nagios::objects::add_hostgroups
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_defined_types::cd_nagios::nagios::objects::add_hostgroups";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_hostgroups</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::nagios::objects::add_hostgroups</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_hostgroups.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
define populates /etc/nagios/conf.d/nagios_hostgroups_add through
external Puppet rules.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_hostgroups.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::nagios::objects::add_hostgroups { &#39;example_hostgroup&#39;:
ng_hostgroup_name =&gt; &#39;example_hostgroup&#39;,
ng_hostgroup_alias =&gt; &#39;Example Hostgroup&#39;,
}</code></pre>
</div>
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_hostgroup_name</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the hostgroup short name.</p>
</div>
</li>
<li>
<span class='name'>ng_hostgroup_alias</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the hostgroup alias (long name).</p>
</div>
</li>
<li>
<span class='name'>ng_hostgroup_register</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to register the hostgroup.</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_hostgroups.pp', line 15</span>
define cd_nagios::nagios::objects::add_hostgroups (
Optional[String] $ng_hostgroup_name = undef,
Optional[String] $ng_hostgroup_alias = undef,
String $ng_hostgroup_register = &#39;1&#39;,
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_tgt_hostgroup_add = $cd_nagios::params::ng_tgt_hostgroup_add
$ng_tgt_hostgrp_rule_erb = $cd_nagios::params::ng_tgt_hostgrp_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target =&gt; $ng_tgt_hostgroup_add,
content =&gt; template($ng_tgt_hostgrp_rule_erb),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,221 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::nagios::objects::add_servicegroups
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_defined_types::cd_nagios::nagios::objects::add_servicegroups";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_servicegroups</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::nagios::objects::add_servicegroups</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_servicegroups.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
define populates /etc/nagios/conf.d/nagios_servicegroups_add through
external Puppet rules.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_servicegroups.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
<h1 id="label-License-3A">License:</h1>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::nagios::objects::add_servicegroups { &#39;example_servicegroup&#39;:
ng_servicegroup_name =&gt; &#39;example_servicegroup&#39;,
ng_servicegroup_alias =&gt; &#39;Example servicegroup&#39;,
}</code></pre>
</div>
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_servicegroup_name</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the servicegroup short name</p>
</div>
</li>
<li>
<span class='name'>ng_servicegroup_alias</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the servicegroup alias (long name).</p>
</div>
</li>
<li>
<span class='name'>ng_servicegroup_register</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether you want to register the servicegroup</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_servicegroups.pp', line 18</span>
define cd_nagios::nagios::objects::add_servicegroups (
Optional[String] $ng_servicegroup_name = undef,
Optional[String] $ng_servicegroup_alias = undef,
String $ng_servicegroup_register = &#39;1&#39;,
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_tgt_servicegroup_add = $cd_nagios::params::ng_tgt_servicegroup_add
$ng_tgt_svcgrp_rule_erb = $cd_nagios::params::ng_tgt_svcgrp_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target =&gt; $ng_tgt_servicegroup_add,
content =&gt; template($ng_tgt_svcgrp_rule_erb),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,346 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::nagios::objects::add_timeperiods
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_defined_types::cd_nagios::nagios::objects::add_timeperiods";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::add_timeperiods</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::nagios::objects::add_timeperiods</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/add_timeperiods.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
define populates /etc/nagios/conf.d/nagios_timeperiods_add through
extermal Puppet rules.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::add_timeperiods.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::nagios::objects::add_timeperiods { &#39;example_timeperiod&#39;:
ng_timeperiod_name =&gt; &#39;example_timeperiod&#39;,
ng_timeperiod_alias =&gt; &#39;Example timeperiod&#39;,
ng_timep_monday =&gt; &#39;00:00-00:00&#39;,
ng_timep_tuesday =&gt; &#39;00:00-00:00&#39;,
ng_timep_wednesday =&gt; &#39;00:00-00:00&#39;,
ng_timep_thursday =&gt; &#39;00:00-00:00&#39;,
ng_timep_friday =&gt; &#39;00:00-00:00&#39;,
ng_timep_saturday =&gt; &#39;00:00-00:00&#39;,
ng_timep_sunday =&gt; &#39;00:00-00:00&#39;,
}</code></pre>
</div>
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_timep_name</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the timeperiod short name.</p>
</div>
</li>
<li>
<span class='name'>ng_timep_alias</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the timeperiod alias (long name)</p>
</div>
</li>
<li>
<span class='name'>ng_timep_monday</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Monday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_tuesday</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Tuesday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_wednesday</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Wednesday.</p>
</div>
</li>
<li>
<span class='name'>ng_timep_thursday</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Thursday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_friday</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Friday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_saturday</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Saturday</p>
</div>
</li>
<li>
<span class='name'>ng_timep_sunday</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;00:00-00:00&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Specify the desired hours for Sunday.</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/add_timeperiods.pp', line 28</span>
define cd_nagios::nagios::objects::add_timeperiods (
Optional[String] $ng_timep_name = undef,
Optional[String] $ng_timep_alias = undef,
String $ng_timep_monday = &#39;00:00-00:00&#39;,
String $ng_timep_tuesday = &#39;00:00-00:00&#39;,
String $ng_timep_wednesday = &#39;00:00-00:00&#39;,
String $ng_timep_thursday = &#39;00:00-00:00&#39;,
String $ng_timep_friday = &#39;00:00-00:00&#39;,
String $ng_timep_saturday = &#39;00:00-00:00&#39;,
String $ng_timep_sunday = &#39;00:00-00:00&#39;,
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_tgt_timep_add = $cd_nagios::params::ng_tgt_timep_add
$ng_tgt_timep_rule_erb = $cd_nagios::params::ng_tgt_timep_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target =&gt; $ng_tgt_timep_add,
content =&gt; template($ng_tgt_timep_rule_erb),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,765 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::nagios::objects::templates
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_defined_types::cd_nagios::nagios::objects::templates";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::nagios::objects::templates</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::nagios::objects::templates</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/objects/templates.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Define manages populates /etc/nagios/conf.d/templates.cfg.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::objects::templates.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com) notifications. for the defined service or host.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_template_object</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>the object type for the templates. Valid options are <code>contact</code>, <code>host</code> and <code>service</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_template_object_name</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>populates the name field, i.e. <code>generic-contact</code>, <code>generic-host</code>, <code>generic-service</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_svc_notification_period</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;24x7&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Period in which to send out notifications for service events, i.e. <code>24x7</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_host_notification_period</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;24x7&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Period in which to send out notifications for host events , i.e. <code>24x7</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_service_notification_options</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;w,u,c,r,f,s&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>What service events to send out notifications for: w = notify on WARNING service states, u = notify on UNKNOWN service states, c = notify on CRITICAL service states, r = notify on service recoveries (OK states), f = notify when the service starts and stops flapping. n = none (the contact will not receive any type of service notifications).</p>
</div>
</li>
<li>
<span class='name'>ng_host_notification_options</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;d,u,r,f,s&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>What host events to send out notifications for: d = notify on DOWN host states, u = notify on UNREACHABLE host states, r = notify on host recoveries (UP states), f = notify when the host starts and stops flapping, s = notify when host or service scheduled downtime starts and ends. n = none (the contact will not receive any type of host notifications).</p>
</div>
</li>
<li>
<span class='name'>ng_service_notification_commands</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;notify-service-by-email&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Command to use for service event notification. Command must be defined in commands.cfg</p>
</div>
</li>
<li>
<span class='name'>ng_host_notification_commands</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;notify-host-by-email&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Command to use for host event notification. Command must be defined in commands.cfg.</p>
</div>
</li>
<li>
<span class='name'>ng_object_register</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;0&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to register the object to Nagios. Since this is a template definition, we do not want to register those.</p>
</div>
</li>
<li>
<span class='name'>ng_template_object_use</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>Which template to use for a given host or service definition, i.e. <code>generic-host</code>, <code>generic-service</code> etc.</p>
</div>
</li>
<li>
<span class='name'>ng_notifications_enabled</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether notifications are enabled. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_event_handler_enabled</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether event handlers are enabled. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_flap_detection_enabled</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether flap detection is enabled. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_process_perf_data</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to process performance data. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_retain_status_information</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to retain status information. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_retain_nonstatus_information</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to retain non-status information. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_notification_period</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;24x7&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Which period in to send out</p>
</div>
</li>
<li>
<span class='name'>ng_notification_interval</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;30&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>how often (in minutes) we should resend notifications for the current status.</p>
</div>
</li>
<li>
<span class='name'>ng_check_period</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;24x7&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Which period in to run checks for the defined object.</p>
</div>
</li>
<li>
<span class='name'>ng_max_check_attempts</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;10&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>how often to check the defined object maximal.</p>
</div>
</li>
<li>
<span class='name'>ng_notification_options</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>see <code>ng_service_notification_options</code> and <code>ng_host_notification_options</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_contact_groups</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;admins&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>contact groups for the defined object. Specified contact group must exit in contact_groups</p>
</div>
</li>
<li>
<span class='name'>ng_active_checks_enabled</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to enable active checks. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_passive_checks_enabled</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to enable passive checks. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_parallelize_check</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to parallelize checks Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_obsess_over_service</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to obsess over the service. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_check_freshness</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;0&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether to check freshness. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_is_volatile</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;0&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether the service is volatile. Valid options are <code>0</code> and <code>1</code>.</p>
</div>
</li>
<li>
<span class='name'>ng_check_interval</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;5&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>How often to check the service under normal conditions.</p>
</div>
</li>
<li>
<span class='name'>ng_retry_interval</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;1&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>Re-check the service every x minutes until a hard state can be determined.</p>
</div>
</li>
<li>
<span class='name'>ng_host_check_command</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;check-host-alive&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>the check command for host checks</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
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</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/objects/templates.pp', line 79</span>
define cd_nagios::nagios::objects::templates (
Optional[String] $ng_template_object = undef,
Optional[String] $ng_template_object_name = undef,
String $ng_svc_notification_period = &#39;24x7&#39;,
String $ng_host_notification_period = &#39;24x7&#39;,
String $ng_service_notification_options = &#39;w,u,c,r,f,s&#39;,
String $ng_host_notification_options = &#39;d,u,r,f,s&#39;,
String $ng_service_notification_commands = &#39;notify-service-by-email&#39;,
String $ng_host_notification_commands = &#39;notify-host-by-email&#39;,
String $ng_object_register = &#39;0&#39;,
Optional[String] $ng_template_object_use = undef,
String $ng_notifications_enabled = &#39;1&#39;,
String $ng_event_handler_enabled = &#39;1&#39;,
String $ng_flap_detection_enabled = &#39;1&#39;,
String $ng_process_perf_data = &#39;1&#39;,
String $ng_retain_status_information = &#39;1&#39;,
String $ng_retain_nonstatus_information = &#39;1&#39;,
String $ng_notification_period = &#39;24x7&#39;,
String $ng_notification_interval = &#39;30&#39;,
String $ng_check_period = &#39;24x7&#39;,
String $ng_check_interval = &#39;5&#39;,
String $ng_retry_interval = &#39;1&#39;,
String $ng_max_check_attempts = &#39;10&#39;,
String $ng_host_check_command = &#39;check-host-alive&#39;,
Optional[String] $ng_notification_options = undef,
String $ng_contact_groups = &#39;admins&#39;,
String $ng_active_checks_enabled = &#39;1&#39;,
String $ng_passive_checks_enabled = &#39;1&#39;,
String $ng_parallelize_check = &#39;1&#39;,
String $ng_obsess_over_service = &#39;1&#39;,
String $ng_check_freshness = &#39;0&#39;,
String $ng_is_volatile = &#39;0&#39;,
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_target_templates = $cd_nagios::params::ng_target_templates
$ng_templates_rule_erb = $cd_nagios::params::ng_templates_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target =&gt; $ng_target_templates,
content =&gt; template($ng_templates_rule_erb),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,227 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::nagios::resources::resource_df
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_defined_types::cd_nagios::nagios::resources::resource_df";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::nagios::resources::resource_df</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::nagios::resources::resource_df</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/nagios/resources/resource_df.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
define manages the resources in/etc/nagios/private/resources.cfg
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::nagios::resources::resource_df.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_user_arg_name</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>the name of user argument i.e. $user1$</p>
</div>
</li>
<li>
<span class='name'>ng_user_arg_value</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>the value of t user argument i.e. $user1$</p>
</div>
</li>
<li>
<span class='name'>ng_user_arg_comment</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>the argument i.e. $user1$</p>
</div>
</li>
<li>
<span class='name'>ng_resource_rule_erb</span>
<span class='type'>(<tt>String</tt>)</span>
<em class="default">(defaults to: <tt>&#39;cd_nagios/nagios/resource_cfg_rule.erb&#39;</tt>)</em>
&mdash;
<div class='inline'>
<p>resource rule #</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/nagios/resources/resource_df.pp', line 10</span>
define cd_nagios::nagios::resources::resource_df (
Optional[String] $ng_user_arg_name = undef,
Optional[String] $ng_user_arg_value = undef,
Optional[String] $ng_user_arg_comment = undef,
String $ng_resource_rule_erb = &#39;cd_nagios/nagios/resource_cfg_rule.erb&#39;,
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_resource_file = $cd_nagios::params::ng_resource_file
if $fqdn == $ng_nagios_server {
concat::fragment { &quot;rule_${name}&quot;:
target =&gt; $ng_resource_file,
content =&gt; template($ng_resource_rule_erb),
order =&gt; &#39;000&#39;,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,193 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::server::access
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
<link rel="stylesheet" href="../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "puppet_defined_types::cd_nagios::server::access";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::server::access</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::server::access</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/server/access.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Define manages user- and password rules for accessing nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::access.pp Module name: cd_nagios Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_htpasswd_user</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>user name for the /etc/nagios/passwd file</p>
</div>
</li>
<li>
<span class='name'>ng_htpasswd_password</span>
<span class='type'>(<tt>Optional[String]</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
&mdash;
<div class='inline'>
<p>the encrypted password for the /etc/nagios/passwd file.</p>
</div>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/access.pp', line 9</span>
define cd_nagios::server::access (
Optional[String] $ng_htpasswd_user = undef,
Optional[String] $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
if $::fqdn == $ng_nagios_server {
# create password rules
concat::fragment { $name:
target =&gt; $ng_htpasswd_file,
content =&gt; template($ng_htpasswd_rule),
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,98 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Top Level Namespace
&mdash; Documentation by YARD 0.9.36
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
<link rel="stylesheet" href="css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> &raquo;
<span class="title">Top Level Namespace</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Top Level Namespace
</h1>
<div class="box_info">
</div>
</div>
<div id="footer">
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
</div>
</div>
</body>
</html>

View File

@@ -1,48 +0,0 @@
## cd_nagios::certbot::certs.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages all configuration files required for cd_nagios.
##############################################################################
class cd_nagios::certbot::certs (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https == true {
if $ng_enable_certbot == true {
require cd_certbot
require cd_apache
if $ng_include_fw == true {
require cd_nagios::firewall::iptables
}
# create cert
exec { 'create_cert':
command => template($ng_get_cert_erb),
cwd => '/tmp',
path => ['/bin','/usr/bin'],
provider => 'shell',
unless => template('cd_nagios/certbot/unless_get_cert.erb'),
notify => Service['httpd'],
creates => $ng_certbot_check,
}
# renew certs
exec { 'renew_cert':
command => 'certbot renew',
cwd => '/tmp',
path => ['/bin','/usr/bin','/opt/'],
provider => 'shell',
notify => Service['httpd'],
unless => template($ng_unless_renew_erb),
}
}
}
else {
# do nothing as we are not using https and certbot is not required then
}
}
}

View File

@@ -1,124 +0,0 @@
## cd_nagios::client::target.pp
# Module name: nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary CLass manages Nagios targets for cd_nagios.
###############################################################################
class cd_nagios::client::target (
) inherits cd_nagios::params {
if $::fqdn != $ng_nagios_server {
if $ng_include_nrpe == true {
require cd_nagios::main::user
require cd_nrpe
@@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 => $ng_max_check_attempts,
notification_period => '24x7',
owner => $ng_user,
group => $ng_user,
mode => '0640',
check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
notify => Service[$ng_user],
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
if $ng_enable_swap_check == true {
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
}
}
}

View File

@@ -1,21 +0,0 @@
## cd_nagios::firewall::iptables.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary manage firewall settings through cd_firewall or puppetlabs-firewall
###############################################################################
class cd_nagios::firewall::iptables (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https != true {
include confdroid_infrastructure::firewall::http
if $ng_use_https == true {
include confdroid_infrastructure::firewall::https
if $ng_http_https_fw == true {
include confdroid_infrastructure::firewall::http
}
}
}
}
}

View File

@@ -1,8 +1,8 @@
## cd_nagios::init.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class initializes the cd_nagios Module.
## confdroid_nagios::init.pp
# Module name: confdroid_nagios
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class initializes the confdroid_nagios Module.
##############################################################################
class cd_nagios {
include cd_nagios::params
class confdroid_nagios {
include confdroid_nagios::params
}

View File

@@ -1,32 +0,0 @@
## cd_nagios::main::config.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages all aspects of configuring the module logic for
# cd_nagios.
##############################################################################
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 $ng_enable_certbot == true {
require cd_nagios::certbot::certs
}
}
if $::fqdn != $ng_nagios_server {
include cd_nagios::client::target
}
}

View File

@@ -1,208 +0,0 @@
## cd_nagios::main::dirs.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages all directories required for cd_nagios.
###############################################################################
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,
}
# run dir for pid file
file { $ng_run_dir:
ensure => directory,
path => $ng_run_dir,
owner => 'nagios',
group => 'nagios',
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => nagios_var_run_t,
seluser => system_u,
}
# cmd dir
file { $ng_cmd_dir:
ensure => directory,
path => $ng_cmd_dir,
owner => 'nagios',
group => 'nagios',
mode => '0775',
selrange => s0,
selrole => object_r,
seltype => nagios_spool_t,
seluser => system_u,
}
# checkresults dir
file { $ng_checkresults_dir:
ensure => directory,
path => $ng_checkresults_dir,
owner => 'nagios',
group => 'nagios',
mode => '0770',
selrange => s0,
selrole => object_r,
seltype => nagios_spool_t,
seluser => system_u,
}
}
}

View File

@@ -1,42 +0,0 @@
## cd_nagios::main::install.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manage all aspects of installing binaries required for
# cd_nagios
###############################################################################
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,
}
}
# if we are not the nagios server, install client packages
if $::fqdn != $ng_nagios_server {
package {$reqpackages_client:
ensure => $pkg_ensure,
}
# if we want to use NRPE, install it
if $ng_include_nrpe == true {
require cd_nrpe
}
}
}

View File

@@ -1,31 +0,0 @@
## cd_nagios::main::user.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages service users for cd_nagios.
#############################################################################
class cd_nagios::main::user (
) inherits cd_nagios::params {
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],
}
}

View File

@@ -1,38 +0,0 @@
## cd_nagios::nagios::objects::add_contact.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Define manages additional contacts known to NAGIOS through external
# Puppet rules, and populates /etc/nagios/conf.d/nagios_add_contact.cfg.
# @example
# cd_nagios::nagios::objects::add_contact { 'example_user':
# ng_contact_name => 'example_user',
# ng_contact_alias => 'Example User',
# ng_contact_groups => 'admins',
# ng_contact_email => 'example@example.net',
# }
# @param [string] ng_contact_name Specify the contact short name.
# @param [string] ng_contact_use which contact template to use
# @param [string] ng_contact_alias Specify the contact alias (long name).
# @param [string] ng_contact_email Specify the contact email address.
# @param [string] ng_contact_groups specify the contact group for the contact.
################################################################################
define cd_nagios::nagios::objects::add_contact (
Optional[String] $ng_contact_name = undef,
String $ng_contact_use = 'generic-contact',
Optional[String] $ng_contact_alias = undef,
Optional[String] $ng_contact_email = undef,
Optional[String] $ng_contact_groups = undef,
) {
$ng_nagios_server = $::cd_nagios::params::ng_nagios_server
$ng_target_add_contact = $::cd_nagios::params::ng_target_add_contact
$ng_contacts_rule_erb = $::cd_nagios::params::ng_contacts_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target => $ng_target_add_contact,
content => template($ng_contacts_rule_erb),
}
}
}

View File

@@ -1,40 +0,0 @@
## cd_nagios::nagios::objects::add_contact_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages /etc/nagios/conf.d/nagios_add_contact.cfg through
# concat.
# @example cd_nagios::nagios::objects::add_contact { 'example_user':
# ng_contact_name => 'example_user',
# ng_contact_alias => 'Example User',
# ng_contact_groups => 'admins',
# ng_contact_email => 'example@example.net',
# }
################################################################################
class cd_nagios::nagios::objects::add_contact_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/conf.d/nagios_add_contacts.cfg
concat { $ng_target_add_contact:
ensure => present,
path => $ng_target_add_contact,
owner => $ng_user,
group => $ng_user,
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
notify => Service[$ng_service],
}
# manage file header
concat::fragment { 'contact_header':
target => $ng_target_add_contact,
content => template($ng_contacts_head_erb),
order => '000',
}
}
}

View File

@@ -1,30 +0,0 @@
## cd_nagios::nagios::objects::add_contactgroups.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Define populates /etc/nagios/conf.d/nagios_add_contactgroups through
# external puppet rules.
# @param [string] ng_contactgroup_name Specify the short name of the
# contact group.
# @param [string] ng_contactgroup_alias Specify the alias (long name) of the
# contact group
# @param [string] ng_contactgroup_register Specify whether the contact group
# should be registered in Nagios.
################################################################################
define cd_nagios::nagios::objects::add_contactgroups (
Optional[String] $ng_contactgroup_name = undef,
Optional[String] $ng_contactgroup_alias = undef,
String $ng_contactgroup_register = '1',
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_tgt_contactgroup_add = $cd_nagios::params::ng_tgt_contactgroup_add
$ng_cntctgrps_rule_erb = $cd_nagios::params::ng_cntctgrps_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target => $ng_tgt_contactgroup_add,
content => template($ng_cntctgrps_rule_erb),
}
}
}

View File

@@ -1,40 +0,0 @@
## cd_nagios::nagios::objects::add_contactgroups_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages /etc/nagios/conf.d/nagios_add_contactgroups.cfg file
# and populates through define and external puppet rules
# @example
# cd_nagios::nagios::objects::add_contactgroups { 'example_group':
# ng_contactgroup_name => 'example_group',
# ng_contactgroup_alias => 'Example Group',
# ng_contactgroup_register => '1',
# }
################################################################################
class cd_nagios::nagios::objects::add_contactgroups_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/conf.d/nagios_add_contactgroups.cfg
concat { $ng_tgt_contactgroup_add:
ensure => present,
path => $ng_tgt_contactgroup_add,
owner => $ng_user,
group => $ng_user,
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
notify => Service[$ng_service],
}
# manage file header
concat::fragment { 'contactgroups_header':
target => $ng_tgt_contactgroup_add,
content => template($ng_cntctgrps_head_erb),
order => '000',
}
}
}

View File

@@ -1,39 +0,0 @@
## cd_nagios::nagios::objects::add_hostgroup_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages /etc/nagios_conf.d/nagios_hostgroups_add.cfg and
# additional hostgroups through external Puppet rules via define.
# @example
# cd_nagios::nagios::objects::add_hostgroups { 'example_hostgroup':
# ng_hostgroup_name => 'example_hostgroup',
# ng_hostgroup_alias => 'Example Hostgroup',
# }
################################################################################
class cd_nagios::nagios::objects::add_hostgroup_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios_conf.d/nagios_hostgroups_add.cfg
concat { $ng_tgt_hostgroup_add:
ensure => present,
path => $ng_tgt_hostgroup_add,
owner => $ng_user,
group => $ng_user,
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
notify => Service[$ng_service],
}
# manage file header
concat::fragment { 'hostgroups_header':
target => $ng_tgt_hostgroup_add,
content => template($ng_tgt_hostgrp_head_erb),
order => '000',
}
}
}

View File

@@ -1,32 +0,0 @@
## cd_nagios::nagios::objects::add_hostgroups.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary define populates /etc/nagios/conf.d/nagios_hostgroups_add through
# external Puppet rules.
# @example
# cd_nagios::nagios::objects::add_hostgroups { 'example_hostgroup':
# ng_hostgroup_name => 'example_hostgroup',
# ng_hostgroup_alias => 'Example Hostgroup',
# }
# @param [string] ng_hostgroup_name Specify the hostgroup short name.
# @param [string] ng_hostgroup_alias Specify the hostgroup alias (long name).
# @param [string] ng_hostgroup_register Whether to register the hostgroup.
###############################################################################
define cd_nagios::nagios::objects::add_hostgroups (
Optional[String] $ng_hostgroup_name = undef,
Optional[String] $ng_hostgroup_alias = undef,
String $ng_hostgroup_register = '1',
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_tgt_hostgroup_add = $cd_nagios::params::ng_tgt_hostgroup_add
$ng_tgt_hostgrp_rule_erb = $cd_nagios::params::ng_tgt_hostgrp_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target => $ng_tgt_hostgroup_add,
content => template($ng_tgt_hostgrp_rule_erb),
}
}
}

View File

@@ -1,39 +0,0 @@
## cd_nagios::nagios::objects::add_servicegroup_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages /etc/nagios_conf.d/nagios_servicegroups_add.cfg and
# additional servicegroups through external Puppet rules via define.
# @example
# cd_nagios::nagios::objects::add_servicegroups { 'example_servicegroup':
# ng_servicegroup_name => 'example_servicegroup',
# ng_servicegroup_alias => 'Example Servicegroup',
# }
################################################################################
class cd_nagios::nagios::objects::add_servicegroup_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios_conf.d/nagios_servicegroups_add.cfg
concat { $ng_tgt_servicegroup_add:
ensure => present,
path => $ng_tgt_servicegroup_add,
owner => $ng_user,
group => $ng_user,
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
notify => Service[$ng_service],
}
# manage file header
concat::fragment { 'servicegroups_header':
target => $ng_tgt_servicegroup_add,
content => template($ng_tgt_svcgrp_head_erb),
order => '000',
}
}
}

View File

@@ -1,35 +0,0 @@
## cd_nagios::nagios::objects::add_servicegroups.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# @summary define populates /etc/nagios/conf.d/nagios_servicegroups_add through
# external Puppet rules.
# @example
# cd_nagios::nagios::objects::add_servicegroups { 'example_servicegroup':
# ng_servicegroup_name => 'example_servicegroup',
# ng_servicegroup_alias => 'Example servicegroup',
# }
# @param [string] ng_servicegroup_name Specify the servicegroup short name
# @param [string] ng_servicegroup_alias Specify the servicegroup alias
# (long name).
# @param [string] ng_servicegroup_register Whether you want to register the
# servicegroup
###############################################################################
define cd_nagios::nagios::objects::add_servicegroups (
Optional[String] $ng_servicegroup_name = undef,
Optional[String] $ng_servicegroup_alias = undef,
String $ng_servicegroup_register = '1',
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_tgt_servicegroup_add = $cd_nagios::params::ng_tgt_servicegroup_add
$ng_tgt_svcgrp_rule_erb = $cd_nagios::params::ng_tgt_svcgrp_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target => $ng_tgt_servicegroup_add,
content => template($ng_tgt_svcgrp_rule_erb),
}
}
}

View File

@@ -1,45 +0,0 @@
# cd_nagios::nagios::objects::add_timeperiod_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages /etc/nagios_conf.d/nagios_timeperiods_add.cfg and
# add. hostgroups through external Puppet rules via define.
# @example cd_nagios::nagios::objects::add_timeperiods { 'example_timeperiod':
# ng_timep_name => 'example_timeperiod',
# ng_timep_alias => 'Example timeperiod',
# ng_timep_monday => '00:00-00:00',
# ng_timep_tuesday => '00:00-00:00',
# ng_timep_wednesday => '00:00-00:00',
# ng_timep_thursday => '00:00-00:00',
# ng_timep_friday => '00:00-00:00',
# ng_timep_saturday => '00:00-00:00',
# ng_timep_sunday => '00:00-00:00',
# }
################################################################################
class cd_nagios::nagios::objects::add_timeperiod_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/conf.d/nagios_timeperiods_add.cfg
concat { $ng_tgt_timep_add:
ensure => present,
path => $ng_tgt_timep_add,
owner => $ng_user,
group => $ng_user,
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
notify => Service[$ng_service],
}
# manage file header
concat::fragment { 'timeperiods_header':
target => $ng_tgt_timep_add,
content => template($ng_tgt_timep_head_erb),
order => '000',
}
}
}

View File

@@ -1,51 +0,0 @@
## cd_nagios::nagios::objects::add_timeperiods.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary define populates /etc/nagios/conf.d/nagios_timeperiods_add through
# extermal Puppet rules.
# @example
# cd_nagios::nagios::objects::add_timeperiods { 'example_timeperiod':
# ng_timeperiod_name => 'example_timeperiod',
# ng_timeperiod_alias => 'Example timeperiod',
# ng_timep_monday => '00:00-00:00',
# ng_timep_tuesday => '00:00-00:00',
# ng_timep_wednesday => '00:00-00:00',
# ng_timep_thursday => '00:00-00:00',
# ng_timep_friday => '00:00-00:00',
# ng_timep_saturday => '00:00-00:00',
# ng_timep_sunday => '00:00-00:00',
# }
# @param [string] ng_timep_name Specify the timeperiod short name.
# @param [string] ng_timep_alias Specify the timeperiod alias (long name)
# @param [string] ng_timep_monday Specify the desired hours for Monday
# @param [string] ng_timep_tuesday Specify the desired hours for Tuesday
# @param [string] ng_timep_wednesday Specify the desired hours for Wednesday.
# @param [string] ng_timep_thursday Specify the desired hours for Thursday
# @param [string] ng_timep_friday Specify the desired hours for Friday
# @param [string] ng_timep_saturday Specify the desired hours for Saturday
# @param [string] ng_timep_sunday Specify the desired hours for Sunday.
###############################################################################
define cd_nagios::nagios::objects::add_timeperiods (
Optional[String] $ng_timep_name = undef,
Optional[String] $ng_timep_alias = undef,
String $ng_timep_monday = '00:00-00:00',
String $ng_timep_tuesday = '00:00-00:00',
String $ng_timep_wednesday = '00:00-00:00',
String $ng_timep_thursday = '00:00-00:00',
String $ng_timep_friday = '00:00-00:00',
String $ng_timep_saturday = '00:00-00:00',
String $ng_timep_sunday = '00:00-00:00',
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_tgt_timep_add = $cd_nagios::params::ng_tgt_timep_add
$ng_tgt_timep_rule_erb = $cd_nagios::params::ng_tgt_timep_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target => $ng_tgt_timep_add,
content => template($ng_tgt_timep_rule_erb),
}
}
}

View File

@@ -1,222 +0,0 @@
## cd_nagios::nagios::objects::commands.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages all commands known to NAGIOS through Puppet exports,
# and populates /etc/nagios/conf.d/nagios_commands.cfg.
################################################################################
class cd_nagios::nagios::objects::commands (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
@@nagios_command { 'notify-host-by-email':
ensure => present,
command_name => 'notify-host-by-email',
command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTADDRESS$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTADDRESS$ is $HOSTSTATE$ **" $CONTACTEMAIL$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'notify-service-by-email':
ensure => present,
command_name => 'notify-service-by-email',
command_line => '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check-host-alive':
ensure => present,
command_name => 'check-host-alive',
command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_disk':
ensure => present,
command_name => 'check_disk',
command_line => '$USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_load':
ensure => present,
command_name => 'check_local_load',
command_line => '$USER1$/check_load -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_procs':
ensure => present,
command_name => 'check_local_procs',
command_line => '$USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_users':
ensure => present,
command_name => 'check_local_users',
command_line => '$USER1$/check_users -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_local_swap':
ensure => present,
command_name => 'check_local_swap',
command_line => '$USER1$/check_swap -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ftp':
ensure => present,
command_name => 'check_ftp',
command_line => '$USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_snmp':
ensure => present,
command_name => 'check_snmp',
command_line => '$USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_http':
ensure => present,
command_name => 'check_http',
command_line => '$USER1$/check_http -I $HOSTADDRESS$ $ARG1$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ssh':
ensure => present,
command_name => 'check_ssh',
command_line => '$USER1$/check_ssh $ARG1$ $HOSTADDRESS$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ping':
ensure => present,
command_name => 'check_ping',
command_line => '$USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_tcp':
ensure => present,
command_name => 'check_tcp',
command_line => '$USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_udp':
ensure => present,
command_name => 'check_udp',
command_line => '$USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_nrpe':
ensure => present,
command_name => 'check_nrpe',
command_line => '$USER1$/check_nrpe -t 30 -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_nagios':
ensure => present,
command_name => 'check_nagios',
command_line => '$USER1$/check_nagios -F $ARG1$ -e $ARG2$ -C $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_bandwidth':
ensure => present,
command_name => 'check_bandwidth',
command_line => '$USER1$/check_bandwidth.sh -t 30 -H $HOSTADDRESS$ linux $ARG1$ $ARG2$ $ARG3$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'process-service-perfdata-file':
ensure => present,
command_name => 'process-service-perfdata-file',
command_line => '/bin/mv /var/log/pnp4nagios/service-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'process-host-perfdata-file':
ensure => present,
command_name => 'process-host-perfdata-file',
command_line => '/bin/mv /var/log/pnp4nagios/host-perfdata /var/spool/pnp4nagios/host-perfdata.$TIMET$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
@@nagios_command { 'check_ntp_time':
ensure => present,
command_name => 'check_ntp_time',
command_line => '$USER1$/check_ntp_time -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$',
owner => 'nagios',
group => 'nagios',
mode => '0640',
target => $ng_target_command,
}
}
}

View File

@@ -1,24 +0,0 @@
## cd_nagios::server::nagios::objects::config.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages the nagios objects definitions.
#############################################################################
class cd_nagios::nagios::objects::config (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::nagios::objects::commands
require cd_nagios::nagios::objects::template_rules
require cd_nagios::nagios::objects::contacts
require cd_nagios::nagios::objects::add_contact_rules
require cd_nagios::nagios::objects::contactgroups
require cd_nagios::nagios::objects::add_contactgroups_rules
require cd_nagios::nagios::objects::hostgroups
require cd_nagios::nagios::objects::add_hostgroup_rules
require cd_nagios::nagios::objects::servicegroups
require cd_nagios::nagios::objects::add_servicegroup_rules
require cd_nagios::nagios::objects::timeperiods
require cd_nagios::nagios::objects::add_timeperiod_rules
}
}

View File

@@ -1,54 +0,0 @@
## cd_nagios::nagios::objects::contactgroups.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages base contactgroups which always should be there.
# @example
# @@nagios_contactgroup { 'admins':
# ensure => present,
# alias => 'Nagios Administrators',
# contactgroup_name => 'admins',
# owner => $ng_user,
# group => $ng_user,
# mode => '0640',
# register => '1',
# target => $ng_tgt_contactgroup_base,
# }
################################################################################
class cd_nagios::nagios::objects::contactgroups (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
@@nagios_contactgroup { 'admins':
ensure => present,
alias => 'Nagios Administrators',
contactgroup_name => 'admins',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_contactgroup_base,
}
@@nagios_contactgroup { 'operations':
ensure => present,
alias => 'Operations Team',
contactgroup_name => 'operations',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_contactgroup_base,
}
@@nagios_contactgroup { 'support':
ensure => present,
alias => 'Support Team',
contactgroup_name => 'support',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_contactgroup_base,
}
}
}

View File

@@ -1,80 +0,0 @@
## cd_nagios::nagios::objects::contacts.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages basic contacts known to NAGIOS through Puppet exports,
# and populates /etc/nagios/conf.d/nagios_base_contacts.cfg.
# @example
# @@nagios_contact { 'admin':
# ensure => present,
# alias => 'Nagios Admin',
# contact_name => 'admin',
# contactgroups => 'admins',
# email => "admin@${::domain}",
# can_submit_commands => '1',
# register => '1',
# use => 'generic-contact',
# target => $ng_target_base_contact,
# owner => 'root',
# group => 'nagios',
# mode => '0664',
# }
################################################################################
class cd_nagios::nagios::objects::contacts (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# admin contact
@@nagios_contact { 'admin':
ensure => present,
alias => 'Nagios Admin',
contact_name => 'admin',
contactgroups => 'admins',
email => "admin@${::domain}",
can_submit_commands => '1',
register => '1',
use => 'generic-contact',
target => $ng_target_base_contact,
owner => $ng_user,
group => $ng_user,
mode => '0640',
}
# ops contact
@@nagios_contact { 'ops':
ensure => present,
alias => 'Operations',
contact_name => 'ops',
contactgroups => 'operations',
email => "ops@${::domain}",
can_submit_commands => '1',
register => '1',
use => 'generic-contact',
target => $ng_target_base_contact,
owner => $ng_user,
group => $ng_user,
mode => '0640',
}
# support contact
@@nagios_contact { 'support':
ensure => present,
alias => 'support',
contact_name => 'support',
contactgroups => 'support',
email => "support@${::domain}",
can_submit_commands => '1',
register => '1',
use => 'generic-contact',
target => $ng_target_base_contact,
owner => $ng_user,
group => $ng_user,
mode => '0640',
}
}
}

View File

@@ -1,208 +0,0 @@
## cd_nagios::nagios::objects::hostgroups.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages basic hostgroups known to NAGIOS through Puppet
# exports, and populates /etc/nagios/conf.d/nagios_base_hostgroups.cfg.
################################################################################
class cd_nagios::nagios::objects::hostgroups (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# linux servers
@@nagios_hostgroup { 'linux-servers':
ensure => present,
hostgroup_name => 'linux-servers',
alias => 'Linux Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# RHEL servers
@@nagios_hostgroup { 'rhel-servers':
ensure => present,
hostgroup_name => 'rhel-servers',
alias => 'RHEL Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# CentOS servers
@@nagios_hostgroup { 'centos-servers':
ensure => present,
hostgroup_name => 'centos-servers',
alias => 'CentOS Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# SuSE servers
@@nagios_hostgroup { 'suse-servers':
ensure => present,
hostgroup_name => 'suse-servers',
alias => 'SuSE Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# Unix servers
@@nagios_hostgroup { 'unix-servers':
ensure => present,
hostgroup_name => 'unix-servers',
alias => 'Unix Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# Solaris servers
@@nagios_hostgroup { 'solaris-servers':
ensure => present,
hostgroup_name => 'solaris-servers',
alias => 'Solaris Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# AIX servers
@@nagios_hostgroup { 'aix-servers':
ensure => present,
hostgroup_name => 'aix-servers',
alias => 'AIX Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# Windows servers
@@nagios_hostgroup { 'windows-servers':
ensure => present,
hostgroup_name => 'windows-servers',
alias => 'Windows Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# Netware servers
@@nagios_hostgroup { 'netware-servers':
ensure => present,
hostgroup_name => 'netware-servers',
alias => 'Netware Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# DB servers
@@nagios_hostgroup { 'db-servers':
ensure => present,
hostgroup_name => 'db-servers',
alias => 'DB Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# Oracle servers
@@nagios_hostgroup { 'oracle-servers':
ensure => present,
hostgroup_name => 'oracle-servers',
alias => 'Oracle Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# MySQL servers
@@nagios_hostgroup { 'mysql-servers':
ensure => present,
hostgroup_name => 'mysql-servers',
alias => 'MySQL Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# MSSQL servers
@@nagios_hostgroup { 'mssql-servers':
ensure => present,
hostgroup_name => 'mssql-servers',
alias => 'MSSQL Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# NOSQL servers
@@nagios_hostgroup { 'nosql-servers':
ensure => present,
hostgroup_name => 'nosql-servers',
alias => 'NOSQL Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
# Hadoop servers
@@nagios_hostgroup { 'hadoop-servers':
ensure => present,
hostgroup_name => 'hadoop-servers',
alias => 'HADOOP Servers',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_hostgroup_base,
}
}
}

View File

@@ -1,50 +0,0 @@
## cd_nagios::nagios::objects::servicegroups.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages basic hostgroups known to NAGIOS through Puppet
# exports, and populates /etc/nagios/conf.d/nagios_base_hostgroups.cfg.
################################################################################
class cd_nagios::nagios::objects::servicegroups (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# network services
@@nagios_servicegroup { 'network-services':
ensure => present,
servicegroup_name => 'network-services',
alias => 'Network Services',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_svcgrp_base,
}
# linux services
@@nagios_servicegroup { 'linux-services':
ensure => present,
servicegroup_name => 'linux-services',
alias => 'Linux Services',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_svcgrp_base,
}
# database services
@@nagios_servicegroup { 'database-services':
ensure => present,
servicegroup_name => 'database-services',
alias => 'Database Services',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_target_svcgrp_base,
}
}
}

View File

@@ -1,82 +0,0 @@
## cd_nagios::nagios::objects::template_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages /etc/nagios/conf.d/nagios_templates.cfg through
# concat.
# @example cd_nagios::nagios::objects::templates { 'generic contact':
# ng_template_object => 'contact',
# ng_template_object_name => 'generic-contact',
# }
################################################################################
class cd_nagios::nagios::objects::template_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# create the templates.cfg file
concat { $ng_target_templates:
ensure => present,
path => $ng_target_templates,
owner => $ng_user,
group => $ng_user,
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
notify => Service[$ng_service],
}
concat::fragment { 'template_header':
target => $ng_target_templates,
content => template($ng_templates_head_erb),
order => '000',
}
# basic templates
cd_nagios::nagios::objects::templates { 'generic contact':
ng_template_object => 'contact',
ng_template_object_name => 'generic-contact',
}
cd_nagios::nagios::objects::templates { 'generic-host':
ng_template_object => 'host',
ng_template_object_name => 'generic-host',
}
cd_nagios::nagios::objects::templates { 'linux-server':
ng_template_object => 'host',
ng_template_object_name => 'linux-server',
ng_template_object_use => 'generic-host',
ng_notification_options => 'd,u,r',
}
cd_nagios::nagios::objects::templates { 'windows-server':
ng_template_object => 'host',
ng_template_object_name => 'windows-server',
ng_template_object_use => 'generic-host',
ng_notification_options => 'd,u,r',
}
cd_nagios::nagios::objects::templates { 'generic-switch':
ng_template_object => 'host',
ng_template_object_name => 'generic-switch',
ng_template_object_use => 'generic-host',
ng_notification_options => 'd,u,r',
}
cd_nagios::nagios::objects::templates { 'generic-printer':
ng_template_object => 'host',
ng_template_object_name => 'generic-printer',
ng_template_object_use => 'generic-host',
ng_notification_options => 'd,u,r',
}
cd_nagios::nagios::objects::templates { 'generic-service':
ng_template_object => 'service',
ng_template_object_name => 'generic-service',
ng_max_check_attempts => '3',
ng_notification_options => 'w,u,c,r',
}
cd_nagios::nagios::objects::templates { 'local-service':
ng_template_object => 'service',
ng_template_object_name => 'local-service',
ng_max_check_attempts => '4',
ng_template_object_use => 'generic-service',
}
}
}

View File

@@ -1,123 +0,0 @@
## cd_nagios::nagios::objects::templates.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Define manages populates /etc/nagios/conf.d/templates.cfg.
# @param [String] ng_template_object the object type for the templates.
# Valid options are `contact`, `host` and `service`.
# @param [String] ng_template_object_name populates the name field,
# i.e. `generic-contact`, `generic-host`, `generic-service`.
# @param [String] ng_svc_notification_period Period in which to send out
# notifications for service events, i.e. `24x7`.
# @param [String] ng_host_notification_period Period in which to send out
# notifications for host events , i.e. `24x7`.
# @param [String] ng_service_notification_options What service events to send
# out notifications for:
# w = notify on WARNING service states,
# u = notify on UNKNOWN service states,
# c = notify on CRITICAL service states,
# r = notify on service recoveries (OK states),
# f = notify when the service starts and stops flapping.
# n = none (the contact will not receive any type of service notifications).
# @param [String] ng_host_notification_options What host events to send
# out notifications for:
# d = notify on DOWN host states,
# u = notify on UNREACHABLE host states,
# r = notify on host recoveries (UP states),
# f = notify when the host starts and stops flapping,
# s = notify when host or service scheduled downtime starts and ends.
# n = none (the contact will not receive any type of host notifications).
# @param [String] ng_service_notification_commands Command to use for
# service event notification. Command must be defined in commands.cfg
# @param [String] ng_host_notification_commands Command to use for
# host event notification. Command must be defined in commands.cfg.
# @param [String] ng_object_register Whether to register the object to Nagios.
# Since this is a template definition, we do not want to register those.
# @param [String] ng_template_object_use Which template to use for a given
# host or service definition, i.e. `generic-host`, `generic-service` etc.
# @param [String] ng_notifications_enabled Whether notifications are enabled.
# Valid options are `0` and `1`.
# @param [String] ng_event_handler_enabled Whether event handlers are enabled.
# Valid options are `0` and `1`.
# @param [String] ng_flap_detection_enabled Whether flap detection is enabled.
# Valid options are `0` and `1`.
# @param [String] ng_process_perf_data Whether to process performance data.
# Valid options are `0` and `1`.
# @param [String] ng_retain_status_information Whether to retain status
# information. Valid options are `0` and `1`.
# @param [String] ng_retain_nonstatus_information Whether to retain non-status
# information. Valid options are `0` and `1`.
# @param [String] ng_notification_period Which period in to send out
# notifications. for the defined service or host.
# @param [String] ng_notification_interval how often (in minutes) we should
# resend notifications for the current status.
# @param [String] ng_check_period Which period in to run checks for the defined
# object.
# @param [String] ng_max_check_attempts how often to check the defined object
# maximal.
# @param [String] ng_notification_options see `ng_service_notification_options`
# and `ng_host_notification_options`.
# @param [String] ng_contact_groups contact groups for the defined object.
# Specified contact group must exit in contact_groups
# @param [String] ng_active_checks_enabled Whether to enable active checks.
# Valid options are `0` and `1`.
# @param [String] ng_passive_checks_enabled Whether to enable passive checks.
# Valid options are `0` and `1`.
# @param [String] ng_parallelize_check Whether to parallelize checks
# Valid options are `0` and `1`.
# @param [String] ng_obsess_over_service Whether to obsess over the service.
# Valid options are `0` and `1`.
# @param [String] ng_check_freshness Whether to check freshness.
# Valid options are `0` and `1`.
# @param [String] ng_is_volatile Whether the service is volatile.
# Valid options are `0` and `1`.
# @param [String] ng_check_interval How often to check the service
# under normal conditions.
# @param [String] ng_retry_interval Re-check the service every x minutes
# until a hard state can be determined.
# @param [String] ng_host_check_command the check command for host checks
################################################################################
define cd_nagios::nagios::objects::templates (
Optional[String] $ng_template_object = undef,
Optional[String] $ng_template_object_name = undef,
String $ng_svc_notification_period = '24x7',
String $ng_host_notification_period = '24x7',
String $ng_service_notification_options = 'w,u,c,r,f,s',
String $ng_host_notification_options = 'd,u,r,f,s',
String $ng_service_notification_commands = 'notify-service-by-email',
String $ng_host_notification_commands = 'notify-host-by-email',
String $ng_object_register = '0',
Optional[String] $ng_template_object_use = undef,
String $ng_notifications_enabled = '1',
String $ng_event_handler_enabled = '1',
String $ng_flap_detection_enabled = '1',
String $ng_process_perf_data = '1',
String $ng_retain_status_information = '1',
String $ng_retain_nonstatus_information = '1',
String $ng_notification_period = '24x7',
String $ng_notification_interval = '30',
String $ng_check_period = '24x7',
String $ng_check_interval = '5',
String $ng_retry_interval = '1',
String $ng_max_check_attempts = '10',
String $ng_host_check_command = 'check-host-alive',
Optional[String] $ng_notification_options = undef,
String $ng_contact_groups = 'admins',
String $ng_active_checks_enabled = '1',
String $ng_passive_checks_enabled = '1',
String $ng_parallelize_check = '1',
String $ng_obsess_over_service = '1',
String $ng_check_freshness = '0',
String $ng_is_volatile = '0',
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_target_templates = $cd_nagios::params::ng_target_templates
$ng_templates_rule_erb = $cd_nagios::params::ng_templates_rule_erb
if $::fqdn == $ng_nagios_server {
concat::fragment { $name:
target => $ng_target_templates,
content => template($ng_templates_rule_erb),
}
}
}

View File

@@ -1,76 +0,0 @@
# cd_nagios::nagios::objects::timeperiods.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages main timeperiods for NAGIOS through Puppet exports,
# and populates /etc/nagios/conf.d/nagios_timeperiods_base.cfg.
################################################################################
class cd_nagios::nagios::objects::timeperiods (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
@@nagios_timeperiod { '24x7':
ensure => present,
timeperiod_name => '24x7',
alias => '24 Hours A Day, 7 Days A Week',
monday => '00:00-24:00',
tuesday => '00:00-24:00',
wednesday => '00:00-24:00',
thursday => '00:00-24:00',
friday => '00:00-24:00',
saturday => '00:00-24:00',
sunday => '00:00-24:00',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { 'office_hours':
ensure => present,
timeperiod_name => 'office_hours',
alias => 'Office hours only, 5 Days A Week 09-05',
monday => '09:00-17:00',
tuesday => '09:00-17:00',
wednesday => '09:00-17:00',
thursday => '09:00-17:00',
friday => '09:00-17:00',
saturday => '00:00-00:00',
sunday => '00:00-00:00',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { 'out_of_hours':
ensure => present,
timeperiod_name => 'out_of_hours',
alias => 'Outside Office hours only',
monday => '17:00-09:00',
tuesday => '17:00-09:00',
wednesday => '17:00-09:00',
thursday => '17:00-09:00',
friday => '17:00-09:00',
saturday => '00:00-24:00',
sunday => '00:00-24:00',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_timeperiods_base,
}
@@nagios_timeperiod { 'none':
ensure => present,
timeperiod_name => 'none',
alias => 'No Time Is A Good Time',
owner => $ng_user,
group => $ng_user,
mode => '0640',
register => '1',
target => $ng_tgt_timeperiods_base,
}
}
}

View File

@@ -1,65 +0,0 @@
## cd_nagios::nagios::resources::resource.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 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 <http://www.gnu.org/licenses/>.
# @summary Class manages the resource config file header.
# @example concat::fragment { "user_rule_plugins":
# ng_user_arg_name => "$user1$",
# ng_user_arg_value => '/usr/lib64/nagios/plugins',
# ng_user_arg_comment => "Sets $USER1$ to be the path to the plugins",
# }
#############################################################################
class cd_nagios::nagios::resources::resource (
) inherits cd_nagios::params {
if $fqdn == $ng_nagios_server {
concat { $ng_resource_file:
ensure => present,
owner => 'root',
group => $ng_user,
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
notify => Service[$ng_service],
}
concat::fragment { 'header':
target => $ng_resource_file,
content => template($ng_resource_erb),
order => '000',
}
# plugins rule
cd_nagios::nagios::resources::resource_df { 'user_rule_plugins':
ng_user_arg_name => 'USER1',
ng_user_arg_value => '/usr/lib64/nagios/plugins/',
ng_user_arg_comment => 'Sets user1 to be the path to the plugins',
}
# eventhandlers rule
cd_nagios::nagios::resources::resource_df { 'user_rule_eventhandlers':
ng_user_arg_name => 'USER2',
ng_user_arg_value => '/usr/lib64/nagios/plugins/eventhandlers/',
ng_user_arg_comment => 'Sets user2 to be the path to the eventhandlers',
}
}
}

View File

@@ -1,28 +0,0 @@
## cd_nagios::nagios::resources::resource_df.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary define manages the resources in/etc/nagios/private/resources.cfg
# @param [String] ng_user_arg_name the name of user argument i.e. $user1$
# @param [String] ng_user_arg_value the value of t user argument i.e. $user1$
# @param [String] ng_user_arg_comment the argument i.e. $user1$
# @param [String] ng_resource_rule_erb resource rule #
#############################################################################
define cd_nagios::nagios::resources::resource_df (
Optional[String] $ng_user_arg_name = undef,
Optional[String] $ng_user_arg_value = undef,
Optional[String] $ng_user_arg_comment = undef,
String $ng_resource_rule_erb = 'cd_nagios/nagios/resource_cfg_rule.erb',
) {
$ng_nagios_server = $cd_nagios::params::ng_nagios_server
$ng_resource_file = $cd_nagios::params::ng_resource_file
if $fqdn == $ng_nagios_server {
concat::fragment { "rule_${name}":
target => $ng_resource_file,
content => template($ng_resource_rule_erb),
order => '000',
}
}
}

View File

@@ -1,988 +1,18 @@
## cd_nagios::params.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class holds all parameters for the cd_nagios module and is
## confdroid_nagios::params.pp
# Module name: confdroid_nagios
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class holds all parameters for the confdroid_nagios module and is
# inherited by all classes except defines.
# @see https://confdroid.com/2017/07/nagios-cgi-cfg/
# @param [String] pkg_ensure
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
# to choose, i.e. `latest` or `present`.
# @param [String] ng_nagios_server Specify the FQDN of the nagios server host.
# Must be a proper A-name, no CNAME i.e. on Loadbalancer. When the FQDN
# matches the configured value, Nagios server components will be installed
# and the clients will allow to be connected by that host. Impacts also
# firewall ports (optional).
# @param [String] ng_nagios_ext_ip Specify the IP address of the
# nagios server. Required for NRPE configuration to allow the Nagios server
# to connect to NRPE, which as of now does not trust DNS names. Must be the
# public interface in case of NAT environments.
# @param [Boolean] ng_include_nrpe Whether to include NRPE to allow
# Nagios to connect to clients
# @param [String] ng_ping_warn Default value for ping warning check. Can be
# overridden on host level.
# @param [String] ng_ping_crit Default value for ping critical check. Can be
# overridden on host level.
# @param [Boolean] ng_ping_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [String] ng_disk_warn Default value for disk space warning check.
# Can be overridden on host level.
# @param [String] ng_disk_crit Default value for disk space critical check
# Can be overridden on host level.
# @param [Boolean] ng_disk_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [String] ng_swap_warn Default value for swap space warning check.
# Can be overridden on host level.
# @param [String] ng_swap_crit Default value for swap space critical check.
# Can be overridden on host level.
# @param [Boolean] ng_swap_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [String] ng_users_warn Default value for user logins warning check.
# Can be overridden on host level.
# @param [String] ng_users_crit Default value for user logins critical check
# Can be overridden on host level.
# @param [Boolean] ng_users_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [String] ng_procs_tot_warn Default warning for the total processes
# warning check. Can be overridden on host level.
# @param [String] ng_procs_tot_crit Default warning for the total processes
# critical check. Can be overridden on host level.
# @param [String] ng_procs_tot_param Default value for the process flags to be
# checked. Can be overridden on host level.
# @param [Boolean] ng_procs_tot_ens Whether to include or exclude the check.
# Can be overridden on host level.
# @param [String] ng_procs_z_warn Default value for the zombie processes
# warning check. Can be overridden on host level.
# @param [String] ng_procs_z_crit Default value for the zombie processes
# critical check. Can be overridden on host level.
# @param [String] ng_procs_z_param Default value for the zombie processes flag.
# Can be overridden on host level.
# @param [Boolean] ng_procs_z_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [String] ng_load_warn Default value for the load warning check.
# Can be overridden on host level.
# @param [String] ng_load_crit Default value for the load critical check.
# Can be overridden on host level.
# @param [Boolean] ng_load_ensure Whether to include or exclude the load check.
# Can be overridden on host level.
# @param [Boolean] ng_include_fw Whether to include firewall management.
# requires cd_firewall or puppetlabs-firewall module.
# @param [String] ng_fw_order Prefix for the port number to establish proper
# firewall rule ordering.
# @param [Boolean] ng_use_https Whether to use https.
# @param [Boolean] ng_http_https_fw Whether we want to forward http to https.
# only active if `ng_use_https` is set to `true`.
# @param [String] ng_http_port Specify the port to use for httpd. Used in
# templates and for firewall (Optional)
# @param [String] ng_https_port Specify the port to use for httpd. Used in
# templates and for firewall (Optional)
# @param [String] ng_user The name of the Nagios service user.
# @param [String] ng_user_home The home directory for the Nagios service user
# @param [String] ng_user_shell The shell for the Nagios service user, which
# never should be allowed to login.
# @param [String] ng_u_comment The comment for the Nagios service user for
# /etc/passwd. Shows up in email notifications from the Nagios daemon.
# @param [String] ng_u_uid The UID for the Nagios service user. Important when
# using shared environments like NFS.
# @param [String] ng_u_groups The secondary groups for the Nagios service user.
# Must not contain the primary group.
# @param [String] ng_context_help whether or not a context-sensitive
# help icon will be displayed for most of the CGIs.
# @param [String] ng_pending_state what states should be displayed in the web
# interface for hosts/services that have not yet been checked
# @param [String] ng_use_auth whether or not the CGIs will use any
# authentication when displaying host and service information, as
# well as committing commands to Nagios for processing. This should
# **__not__** be set to 0.
# @param [String] ng_use_ssl_auth allows you to use x509 cert (SSL)
# authentication in the CGIs. This is an advanced option and should
# not be enabled unless you know what you're doing.
# @param [Boolean] ng_enable_def_user Whether to enable a default user
# (**__not recommended__**).
# @param [String] ng_def_user_name default user name that can
# access pages without authentication. This allows people within a
# secure domain (i.e., behind a firewall) to see the current status
# without authenticating. Only active if `ng_enable_def_user` is set to `true`
# @param [String] ng_nagios_admin Specify the name of a nagios administration
# user here. Value will be used in cgi.cfg for all authorized commands and
# info,i.e. nagiosadmin. however, its strongly suggested to use a different
# name. Can be overridden per host / hostgroups to allow flexibility and
# increased security. You can also add a comma-separated list of people in
# here instead, which then would function like a group instead a single user.
# @param [String] ng_sysinfo_auth comma-delimited list of all usernames that
# have access to viewing the Nagios process information as
# provided by the Extended Information CGI (extinfo.cgi).
# @param [String] ng_confinfo_auth comma-delimited list of all usernames that
# can view ALL configuration information (hosts, commands, etc).
# @param [String] ng_command_auth comma-delimited list of all usernames that
# can issue shutdown and restart commands to Nagios via the
# command CGI (cmd.cgi).
# @param [String] ng_hostview_auth comma-delimited lists of all usernames that
# can view information for all hosts
# @param [String] ng_serviceview_auth comma-delimited lists of all usernames
# that can view information for all services.
# @param [String] ng_host_cmd_auth comma-delimited lists of all usernames that
# can issue host related commands.
# @param [String] ng_svc_cmd_auth comma-delimited lists of all usernames that
# can issue service related commands.
# @param [String] ng_readonly_auth comma-delimited list of usernames that have
# read-only rights in the CGIs.
# @param [String] ng_statusmap_img specify an image to be used as a
# background in the statusmap CGI.
# @param [Boolean] ng_use_colormap Whether to set values of background colors.
# @param [String] ng_colormap_red value for the `red` area of the color map.
# @param [String] ng_colormap_green value for the `green` area of the color map
# @param [String] ng_colormap_blue value for the `blue` area of the color map.
# @param [String] ng_statusmap_layout Value for the default statusmap layout.
# @param [String] ng_wrl_layout Value for the default statuswrl layout.
# @param [Boolean] ng_incl_own_wrl Whether to include your own objects in the
# generated VRML world.
# @param [String] ng_statuswrl_include Specify your own wrl object to be
# included in the generated VRML world. Only active if `ng_incl_own_wrl`
# is set to `true`.
# @param [String] ng_ping_syntax what syntax should be used when
# attempting to ping a host from the WAP interface
# @param [String] ng_refresh_rate specify the refresh rate in seconds
# of various CGIs
# @param [String] ng_result_limit specify the default number of results
# displayed on the status.cgi.
# @param [String] ng_escape_html whether HTML tags in host and service
# status output is escaped in the web interface. If enabled,
# your plugin output will not be able to contain clickable links.
# @param [Boolean] ng_use_sound whether to enable sound usage.
# @param [String] ng_host_unreachable sound file for `host unreachable`
# Only active if `ng_use_sound` is set to `true`.
# @param [String] ng_host_down sound file for `host down`
# Only active if `ng_use_sound` is set to `true`.
# @param [String] ng_svc_critical sound file for `service critical`.
# Only active if `ng_use_sound` is set to `true`.
# @param [String] ng_svc_warn sound file for `service warning`
# Only active if `ng_use_sound` is set to `true`.
# @param [String] ng_svc_unknown sound file for `service unknown`
# Only active if `ng_use_sound` is set to `true`.
# @param [String] ng_normal_sound sound file for `normal`
# Only active if `ng_use_sound` is set to `true`.
# @param [String] ng_action_url_target Specify target frames in which
# action URLs will open
# @param [String] ng_notes_url_target Specify target frames in which
# notes URLs will open
# @param [String] ng_lock_author_names whether users can change the author
# name when submitting comments, scheduling downtime.
# @param [Boolean] ng_enable_splunk Whether to enable splunk integration.
# @param [String] ng_splunk_url the URL for your Splunk URL
# @param [String] ng_navbar_addresses allow navbar search queries IP addresses
# @param [String] ng_navbar_aliases allow navbar search for aliases
# @param [String] ng_ack_no_sticky Enabling ack_no_sticky will default the
# "Sticky Acknowledgement" to be unchecked.
# @param [String] ng_ack_no_send Enabling ack_no_send will default the
# "Send Notification" to be unchecked.
# @param [Boolean] ng_use_selinux_tools Whether to enable selinux tools and
# policies. only effective if selinux is enabled.
# @param [String] ng_required_hosts String of **__FQDNs__** for hosts which
# should be allowed/required. Requires format
# 'host1.example.com host2.example.com'. If you want no restriction, chose
# 'all'.
# @param [String] ng_required_ips String of **__Ip addresses __** for hosts
# which should be allowed/required. Requires format 'ipaddress ip address
# range'. If you want no restriction, choose '0.0.0.0/0'.
# @param [Boolean] ng_enable_certbot Whether to use certbot for automated TLS
# certificate management
# @param [String] ng_certbot_webroot the path for certbot to place
# challenges for the certification process.
# @param [String] ng_mail_user email address to receive administrative mail.
# used for nagios itself as well as for certbot. Mail environment must be
# configured separately, i.e. through `cd_postfix`.
# @param [String] ng_page_user pager address to be used by Nagios for
# notifications. Paging environment must be configured separately.
# @param [Boolean] ng_enable_index Whether to create an index file to allow
# httpd checks with nagios on the nagios server.
# @param [String] ng_webserver_name the name of the web server nagios should
# listen to, i.e. 'nagios.example.net'. Unlike `ng_nagios_server`, this
# should not be the FQDN of the nagios host, but a web server domain name.
# required for certbot and used in the web templates.
# @param [String] ng_log_file main log file where service- and host events
# are logged.
# @param [String] ng_max_check_attempts maximum amount of checks done by nagios
# @param [String] ng_object_cache_file determines where object definitions are
# cached when # Nagios starts/restarts.
# @param [String] ng_precached_obj_file determines the location of the
# precached object file.
# @param [String] ng_resource_file resource file that contains $USERx$ macro
# definitions.
# @param [String] ng_status_file where the current status of all monitored
# services and hosts is stored.
# @param [String] ng_status_upd_interval status file update interval.
# determines the frequency (in seconds) that # Nagios will periodically dump
# program, host, and # service status data.
# @param [String] ng_check_ext_commands allows you to specify whether or not
# Nagios should check # for external commands in the command file specified
# by `ng_command_file`.
# @param [String] ng_command_file file that Nagios checks for external command
# requests. It is also where the command CGI will write commands that are
# submitted # by users, so it must be writeable by the user that the web
# server is running as.
# @param [Boolean] ng_enable_query_handler Whether to enable the query handler
# for running nagios in cluster mode.
# @param [String] ng_query_socket the socket for the query handler
# @param [String] ng_lock_file lockfile that Nagios will use to store its PID
# number in when it is running in daemon mode.
# @param [String] ng_temp_file temporary file that is used as scratch space
# when Nagios # updates the status log, cleans the comment file, etc.
# @param [String] ng_temp_path path where Nagios can create temp files for
# service and # host check results, etc.
# @param [String] ng_event_broker_options Controls what (if any) data gets sent
# to the event broker.
# @param [String] ng_event_broker_module specify an event broker
# (including full path) module that should # by loaded by Nagios at startup.
# Specify multiple modules as array ['path/to/module1','/path/to/module2']
# @param [String] ng_log_rotation_method Valid options:
# n = None - don't rotate the log
# h = Hourly rotation (top of the hour)
# d = Daily rotation (midnight every day)
# w = Weekly rotation (midnight on Saturday evening)
# m = Monthly rotation (midnight last day of month)
# @param [String] ng_log_archive_path directory where archived (rotated)
# log files should be # placed (assuming you've chosen to do log rotation).
# @param [String] ng_use_syslog whether to log messages to the syslog
# facility, as well as the Nagios log file. Valid options are `0` and `1`.
# @param [String] ng_log_notifications Whether to log notifications in addition
# to regular messages. Valid options are `0` and `1`.
# @param [String] ng_log_service_retries Whether to log service retries.
# Valid options are `0` and `1`.
# @param [String] ng_log_host_retries Whether to log host retries.
# Valid options are `0` and `1`.
# @param [String] ng_log_event_handlers Whether to log host and service event
# handlers. Valid options are `0` and `1`.
# @param [String] ng_log_initial_states Whether to log initial states.
# Valid options are `0` and `1`.
# @param [String] ng_log_current_states Whether to log all current host and
# service states to the main log file after log has been rotated.
# Valid options are `0` and `1`.
# @param [String] ng_log_external_commands Whether to log external commands.
# Valid options are `0` and `1`.
# @param [String] ng_log_passive_checks Whether to log passive checks.
# Valid options are `0` and `1`.
# @param [String] ng_glob_host_evt_handler Specify a global host event
# handler # command that is to be run for every host or service state change.
# The global event handler is executed immediately prior to the event
# handler that you have optionally specified in each host or # service
# definition. The command argument is the short name of a # command definition
# that you define in your host configuration file.
# @param [String] ng_glob_svc_evt_handler Specify a global service event
# handler # command that is to be run for every host or service state change.
# The global event handler is executed immediately prior to the event
# handler that you have optionally specified in each host or # service
# definition. The command argument is the short name of a # command definition
# that you define in your host configuration file.
# @param [String] ng_svc_int_check_delay method that Nagios should use when
# initially "spreading out" service checks when it starts monitoring.
# Valid options:
# n = None - don't use any delay between checks
# d = Use a "dumb" delay of 1 second between checks
# s = Use "smart" inter-check delay calculation
# x.xx = Use an inter-check delay of x.xx seconds
# @param [String] ng_max_svc_check_spread timeframe (in minutes) from the
# program start time that an initial check of all services should be completed
# @param [String] ng_svc_interleave_factor determines how service checks are
# interleaved. Valid options: s = Use "smart" interleave factor calculation
# x = Use an interleave factor of x, where x is greater than or equal to 1.
# @param [String] ng_host_int_check_delay method that Nagios should use when
# initially "spreading out" host checks when it starts monitoring.
# Valid options:
# n = None - don't use any delay between checks
# d = Use a "dumb" delay of 1 second between checks
# s = Use "smart" inter-check delay calculation
# x.xx = Use an inter-check delay of x.xx seconds
# @param [String] ng_max_host_check_spread timeframe (in minutes) from the
# program start time that an initial check of all hosts should # be completed.
# @param [String] ng_max_concurrent_checks specify the maximum number of
# service checks that can be run in parallel at any given time. A value of 0
# will not restrict the number of concurrent checks that are being executed.
# @param [String] ng_check_res_reaper_freq frequency (in seconds!) in which
# Nagios will process the results of host and service checks.
# @param [String] ng_max_check_res_reap_time max amount of time (in seconds)
# that a single # check result reaper event will be allowed to run before
# returning control back to Nagios so it can perform other duties.
# @param [String] ng_check_result_path directory where Nagios stores the
# results of host and service checks that have not yet been processed.
# @param [String] ng_max_check_res_file_age maximum age (in seconds) which
# check result files are considered to be valid.
# @param [String] ng_cached_h_check_horizon maximum amount of time (in seconds)
# that the state of a previous host check is considered current.
# Cached host states (from host checks that were performed more recently
# that the timeframe specified by this value) can immensely improve
# performance in regards to the host check logic. Too high of a value for
# this option may result in inaccurate host states being used by Nagios,
# while a lower value may result in a performance hit for host checks.
# Use a value of 0 to disable host check caching.
# @param [String] ng_cached_s_check_horizon maximum amount of time (in seconds)
# that the state of a previous service check is considered current.
# Cached service states (from service checks that were performed more recently
# that the timeframe specified by this value) can immensely improve
# performance in regards to the service check logic. Too high of a value for
# this option may result in inaccurate service states being used by Nagios,
# while a lower value may result in a performance hit for service checks.
# Use a value of 0 to disable service check caching.
# @param [String] ng_pred_host_dep_checks Whether Nagios will attempt to
# execute checks of hosts when it predicts that future dependency logic test
# may be needed. Valid options are `0` and `1`.
# @param [String] ng_pred_svc_dep_checks Whether Nagios will attempt to execute
# checks of services when it predicts that future dependency logic test may be
# needed. Valid options are `0` and `1`.
# @param [String] ng_soft_state_dependencies Whether or not Nagios will use
# soft state information when checking host and service dependencies.
# Valid options are `0` and `1`.
# @param [String] ng_time_change_threshold when Nagios will react to detected
# changes in system time (either forward or backwards).
# @param [String] ng_auto_reschedule_checks Whether Nagios will attempt to
# automatically reschedule active host and service checks to
# "smooth" them out over time. Experimental feature.
# Valid options are `0` and `1`.
# @param [String] ng_auto_reschedule_intval how often (in seconds) Nagios will
# attempt to automatically reschedule checks. only has an effect if
# `ng_auto_reschedule_checks` is set to `1`.
# @param [String] ng_auto_reschedule_window determines the "window" of time
# (in seconds) that # Nagios will look at when automatically rescheduling
# checks. Only host and service checks that occur in the next X seconds
# (determined by this variable) will be rescheduled.
# @param [String] ng_service_check_timeout how much time Nagios will allow
# service check commands to execute before killing them off.
# @param [String] ng_host_check_timeout how much time Nagios will allow
# host check commands to execute before killing them off.
# @param [String] ng_event_handler_timeout how much time Nagios will allow
# event handler commands to execute before killing them off.
# @param [String] ng_notification_timeout how much time Nagios will allow
# notification commands to execute before killing them off.
# @param [String] ng_ocsp_timeout how much time Nagios will allow
# ocsp commands to execute before killing them off.
# @param [String] ng_perfdata_timeout how much time Nagios will allow
# performance data commands to execute before killing them off.
# @param [String] ng_retain_state_inf Whether Nagios will save state
# information for services and hosts before it shuts down. Upon
# startup Nagios will reload all saved service and host state information
# before starting to monitor. Valid options are `0` and `1`.
# @param [String] ng_state_retention_file Where Nagios should use to store
# host and # service state information before it shuts down. The state
# information in this file is also read immediately prior to starting to
# monitor the network when Nagios is restarted. This file is used only if
# the `ng_retain_state_inf` variable is set to 1.
# @param [String] ng_retention_update_intval how often (in minutes) that
# Nagios # will automatically save retention data during normal operation.
# If you set this value to 0, Nagios will not save retention data at regular
# interval, but it will still save retention data before shutting down or
# restarting. If you have disabled state retention, this option has no effect.
# @param [String] ng_use_ret_program_state Whether Nagios will set
# program status variables based on the values saved in the retention file.
# Valid options are `0` and `1`.
# @param [String] ng_use_ret_scheduling_info Whether Nagios will retain
# the scheduling info (next check time) for hosts and services based on the
# values saved in the retention file. Valid options are `0` and `1`.
# @param [String] ng_ret_host_attr_mask mask determines what host
# attributes are not retained
# @param [String] ng_ret_service_attr_mask mask determines what service
# attributes are not retained
# @param [String] ng_ret_proc_host_attr_mask what host process attributes
# are not retained.
# @param [String] ng_ret_proc_svc_attr_mask what service process attributes
# are not retained
# @param [String] ng_ret_contact_h_attr_mask what host contact attributes are
# not retained.
# @param [String] ng_ret_contact_s_attr_mask what service contact attributes
# are not retained.
# @param [String] ng_interval_length seconds per unit interval as used in the
# host/contact/service configuration files.
# @param [String] ng_check_for_updates whether Nagios will automatically check
# to see if new updates (releases) are available. Effectively, setting
# `$pkg_ensure` to `latest` will have Puppet take care for that automatically
# though through the packages available in the yum repos.
# Valid options are `0` and `1`.
# @param [String] ng_bare_update_check what data Nagios will send to
# api.nagios.org when it checks for updates. Valid options are `0` and `1`.
# @param [String] ng_use_aggr_host_checking Whether to enable aggressive host
# checking. Read Nagios documentation for more infos aggressive host checking.
# @param [String] ng_execute_service_checks Whether Nagios will actively
# execute service checks when it initially starts.
# Valid options are `0` and `1`.
# @param [String] ng_accept_pass_svc_checks Whether or not Nagios will accept
# passive # service checks results when it initially (re)starts.
# Valid options are `0` and `1`.
# @param [String] ng_execute_host_checks whether or not Nagios will actively
# execute host checks when it initially starts.
# Valid options are `0` and `1`.
# @param [String] ng_accept_pass_host_checks Whether or not Nagios will accept
# passive # host checks results when it initially (re)starts.
# Valid options are `0` and `1`.
# @param [String] ng_enable_notifications Whether Nagios will sent out any host
# or service notifications when it is initially (re)started.
# Valid options are `0` and `1`.
# @param [String] ng_enable_event_handlers Whether Nagios will run any host or
# service event handlers when it is initially (re)started.
# Valid options are `0` and `1`.
# @param [String] ng_process_perf_data Whether Nagios will process performance
# data returned from service and host checks.
# Valid options are `0` and `1`.
# @param [String] ng_host_perfdata_command Short name of a command definition
# defined in your host configuration file. Only active if
# `ng_process_perf_data` is set to `1`
# @param [String] ng_svc_perfdata_command Short name of a command definition
# defined in your service configuration file. Only active if
# `ng_process_perf_data` is set to `1`
# @param [String] ng_host_perfdata_file used to store host performance data.
# Only active if `ng_process_perf_data` is set to `1`
# @param [String] ng_service_perfdata_file used to store service performance
# data. Only active if `ng_process_perf_data` is set to `1`
# @param [String] ng_host_perfdata_template What data is written (and how)
# to the performance data files. The templates may contain macros, special
# characters (\t for tab, \r for carriage return, \n for newline)
# and plain text. Only active if `ng_process_perf_data` is set to `1`
# @param [String] ng_svc_perfdata_template What data is written (and how)
# to the performance data files. The templates may contain macros, special
# characters (\t for tab, \r for carriage return, \n for newline)
# and plain text. Only active if `ng_process_perf_data` is set to `1`
# @param [String] ng_host_perfdata_file_mode Whether the host performance data
# files are opened in write ("w"), append ("a") or named pipe ("p") mode.
# Only active if `ng_process_perf_data` is set to `1`.
# @param [String] ng_svc_perfdata_file_mode Whether the service performance
# data files are opened in write ("w"), append ("a") or named pipe ("p") mode.
# Only active if `ng_process_perf_data` is set to `1`.
# @param [String] ng_h_perfdata_proc_intval How often (in seconds) the host
# performance data files are processed using the commands defined below.
# `0` indicates that the files should not be periodically processed.
# Only active if `ng_process_perf_data` is set to `1`.
# @param [String] ng_s_perfdata_proc_intval How often (in seconds) the service
# performance data files are processed using the commands defined below.
# `0` indicates that the files should not be periodically processed.
# Only active if `ng_process_perf_data` is set to `1`.
# @param [String] ng_h_perfdata_proc_cmd Commands used to periodically process
# the host performance data files.
# Only active if `ng_process_perf_data` is set to `1`.
# @param [String] ng_s_perfdata_proc_cmd Commands used to periodically process
# the service performance data files.
# Only active if `ng_process_perf_data` is set to `1`.
# @param [String] ng_h_perfdata_proc_e_res Whether the core will process empty
# host perfdata results. Valid options are `0` and `1`.
# Only active if `ng_process_perf_data` is set to `1`.
# @param [String] ng_s_perfdata_proc_e_res Whether the core will process empty
# service perfdata results. Valid options are `0` and `1`.
# Only active if `ng_process_perf_data` is set to `1`.
# @param [String] ng_obsess_over_services Whether Nagios will obsess over
# service checks and run the ocsp_command defined. Unless you are
# planning on implementing distributed monitoring, do not enable this option.
# @param [String] ng_ocsp_command Command that is run for every service check
# that is processed by Nagios. This command is executed only if the
# `ng_obsess_over_services` option is set to 1. The command argument is the
# short name of a command definition defined in your service configuration
# file. Read the HTML docs for # more information on implementing distributed
# monitoring.
# @param [String] ng_obsess_over_hosts Whether Nagios will obsess over
# host checks and run the ocsp_command defined. Unless you are
# planning on implementing distributed monitoring, do not enable this option.
# @param [String] ng_ochp_command Command that is run for every service check
# that is processed by Nagios. This command is executed only if the
# `ng_obsess_over_hosts` option is set to 1. The command argument is the
# short name of a command definition defined in your host configuration file.
# Read the HTML docs for # more information on implementing distributed
# monitoring.
# @param [String] ng_translate_pass_h_checks Whether or not Nagios will
# translate # DOWN/UNREACHABLE passive host check results into their proper
# state for this instance of Nagios. This option is useful only if you have
# distributed or failover monitoring setup. Valid options are `0` and `1`.
# @param [String] ng_pass_h_checks_are_soft Whether Nagios will treat passive
# host checks as being HARD or SOFT. Valid options are `0` and `1`.
# @param [String] ng_check_orphaned_svc Whether Nagios will periodically check
# for orphaned service checks.Valid options are `0` and `1`.
# @param [String] ng_check_orphaned_hosts Whether Nagios will periodically
# check for orphaned host checks.Valid options are `0` and `1`.
# @param [String] ng_check_service_freshness Whether Nagios will periodically
# check the "freshness" of service results. Valid options are `0` and `1`.
# @param [String] ng_svc_fresh_check_intval how often (in seconds) Nagios will
# check the "freshness" of service check results. Only active if
# `ng_check_service_freshness` is set to `1`.
# @param [String] ng_svc_check_timeout_state The state Nagios will report when
# a service check times out - that is does not respond within
# `ng_service_check_timeout` seconds. Valid settings are:
# c - Critical (default)
# u - Unknown
# w - Warning
# o - OK
# @param [String] ng_check_host_freshness Whether Nagios will periodically
# check the "freshness" of host check results. Valid options are `0` and `1`.
# @param [String] ng_host_fresh_check_intval how often (in seconds) Nagios
# will check the "freshness" of host check results. Only active if
# `ng_check_service_freshness` is set to `1`.
# @param [String] ng_add_freshness_latency number of seconds that Nagios will
# add to any host and service freshness thresholds that it calculates
# (those not explicitly specified by the user).
# @param [String] ng_enable_flap_detection Whether or not Nagios will try
# and detect hosts and services that are "flapping". Flapping occurs when a
# host or service changes between # states too frequently. When Nagios
# detects that a # host or service is flapping, it will temporarily suppress
# notifications for that host/service until it stops flapping.
# @param [String] ng_low_svc_flap_threshold Low threshold for service flapping.
# only active if `ng_enable_flap_detection` is set to `1`.
# @param [String] ng_high_svc_flap_threshold High threshold for service
# flapping. Only active if `ng_enable_flap_detection` is set to `1`.
# @param [String] ng_low_h_flap_threshold Low threshold for host flapping.
# only active if `ng_enable_flap_detection` is set to `1`.
# @param [String] ng_high_h_flap_threshold High threshold for host
# flapping. Only active if `ng_enable_flap_detection` is set to `1`.
# @param [String] ng_date_format How short dates are displayed.
# Valid options include:
# us (MM-DD-YYYY HH:MM:SS)
# euro (DD-MM-YYYY HH:MM:SS)
# iso8601 (YYYY-MM-DD HH:MM:SS)
# strict-iso8601 (YYYY-MM-DDTHH:MM:SS)
# @param [Boolean] ng_use_timezone_offset Whether to use timezone offsets.
# if set to `false`, the system configured timezone will be used.
# @param [String] ng_use_timezone used to override the default timezone that
# this # instance of Nagios runs in. If not specified, Nagios will use the
# system configured timezone. NOTE: In order to display the correct timezone
# in the CGIs, you # will also need to alter the Apache directives for the
# CGI path # to include your timezone. It is highly recommended to configure
# the timezone correctly at system level anyway. Only active if
# `ng_use_timezone_offset` is set to `true`.
# @param [String] ng_illegal_obj_name_chars specify illegal characters that
# cannot # be used in host names, service descriptions, or names of other
# object types.
# @param [String] ng_ill_macro_output_chars Specify illegal characters that
# are stripped from macros before being used in notifications, event handlers,
# etc. This DOES NOT affect macros used in service or host check commands.
# The following macros are stripped of the characters you specify:
# $HOSTOUTPUT$
# $HOSTPERFDATA$
# $HOSTACKAUTHOR$
# $HOSTACKCOMMENT$
# $SERVICEOUTPUT$
# $SERVICEPERFDATA$
# $SERVICEACKAUTHOR$
# $SERVICEACKCOMMENT$
# @param [String] ng_use_regexp_matching Whether regular expression
# matching takes place in the object config files. Regular expression
# matching is used to match host, hostgroup, service, and service group
# names/descriptions in some fields of various object types.
# Valid options are `0` and `1`.
# @param [String] ng_true_regexp_matching Whether or not "true" regular
# expression # matching takes place in the object config files. Only active if
# `ng_use_regexp_matching` is set to true.
# @param [String] ng_daemon_dumps_core Whether Nagios is allowed to create
# a core dump when it runs as a daemon.
# @param [String] ng_use_large_inst_tweaks Whether or not Nagios will take some
# shortcuts # which can save on memory and CPU usage in large Nagios
# installations. Valid options are `0` or `1`.
# @param [String] ng_enable_env_macros Whether Nagios will make all standard
# macros available as environment variables when host/service checks and
# system commands (event handlers, notifications, etc.) are executed. Can
# cause performance problems in large installations if enabled.
# Valid options are `0` or `1`.
# @param [String] ng_free_child_process_mem Whether Nagios should free up
# memory on child processes. Valid options are `0` and `1`.
# @param [String] ng_child_proc_fork_twice ow Nagios will fork child processes.
# Valid options are `0` or `1`.
# @param [String] ng_debug_level how much (if any) debugging information will
# be written to the debug file. Valid options are:
# -1 = Everything
# 0 = Nothing
# 1 = Functions
# 2 = Configuration
# 4 = Process information
# 8 = Scheduled events
# 16 = Host/service checks
# 32 = Notifications
# 64 = Event broker
# 128 = External commands
# 256 = Commands
# 512 = Scheduled downtime
# 1024 = Comments
# 2048 = Macros
# @param [String] ng_debug_verbosity How verbose the debug log out will be.
# Valid options:
# 0 = Brief output
# 1 = More detailed
# 2 = Very detailed
# @param [String] ng_debug_file FQDN where Nagios should write debug
# information.
# @param [String] ng_max_debug_file_size Maximum size (in bytes) of the debug
# file. If the file grows larger than this size, it will be renamed with
# a .old # extension. If a file already exists with a .old extension it will
# automatically be deleted.
# @param [String] ng_allow_empty_hostgroups Should we allow hostgroups to have
# no hosts, we default this to off since that was the old behavior.
# @param [String] ng_check_workers Normally worker count is dynamically
# allocated based on 1.5 * number of cpu's with a minimum of 4 workers.
# This value will override the defaults.
# @param [String] ng_host_down_svc_checks This option will disable all service
# checks if the host is not in an UP state. While desirable in some
# environments, enabling this value can distort report values as the expected
# quantity of checks will not have been performed. Valid options are `0` and
# `1`.
# @param [Boolean] ng_enable_load_ctl_options Whether to enable loadctl_options
# To get current defaults based on your system issue a command to
# the query handler. Experimental feature and not recommended for production.
# @param [String] ng_loadctl_options load controlling options
# jobs_max - The maximum amount of jobs to run at one time
# jobs_min - The minimum amount of jobs to run at one time
# jobs_limit - The maximum amount of jobs the current load lets us run
# backoff_limit - The minimum backoff_change
# backoff_change - # of jobs to remove from jobs_limit when backing off
# rampup_limit - Minimum rampup_change
# rampup_change - # of jobs to add to jobs_limit when ramping up
# @param [String] ng_nrpe_port the port for NRPE. used by firewall and in
# configuration file.
# @param [Boolean] ng_enable_swap_check Whether to enable the declaration of
# the swap check. Disabling this makes sense when you use the `cd_swap`
# Puppet module and have enabled the check declaration from there, so the
# Nagios check is properly aligned to the Puppet module controlling the
# particular item.
# @param [Array] reqpackages_server the packages for the server
# @param [Array] reqpackages_client the packages for the clients
###############################################################################
class cd_nagios::params (
String $pkg_ensure = 'latest',
String $ng_nagios_server = "nagios.${::domain}",
String $ng_nagios_ext_ip = undef,
String $ng_mail_user = "admin@${::domain}",
String $ng_page_user = "pageadmin@${::domain}",
Boolean $ng_include_nrpe = true,
# firewall
Boolean $ng_include_fw = true,
Boolean $ng_use_https = true,
Boolean $ng_http_https_fw = true,
String $ng_fw_order = '50',
String $ng_http_port = '80',
String $ng_https_port = '443',
String $ng_nrpe_port = '5666',
# check command parameters
## ping
String $ng_ping_warn = '100.0,20%',
String $ng_ping_crit = '500.0,60%',
String $ng_ping_ensure = 'present',
## disk
String $ng_disk_warn = '20%',
String $ng_disk_crit = '10%' ,
String $ng_disk_ensure = 'present',
# swap
String $ng_swap_warn = '20',
String $ng_swap_crit = '10',
String $ng_swap_ensure = 'present',
# users
String $ng_users_warn = '20',
String $ng_users_crit = '50',
String $ng_users_ensure = 'present',
#total procs
String $ng_procs_tot_warn = '330',
String $ng_procs_tot_crit = '400',
String $ng_procs_tot_param = 'RDST',
String $ng_procs_tot_ens = 'present',
# zombie procs
String $ng_procs_z_warn = '10',
String $ng_procs_z_crit = '30',
String $ng_procs_z_param = 'Z',
String $ng_procs_z_ensure = 'present',
# load
String $ng_load_warn = '5.00,4.00,3.00',
String $ng_load_crit = '10.00,6.00,4.00',
String $ng_load_ensure = 'present',
# user settings
String $ng_user = 'nagios',
String $ng_u_comment = 'Nagios service user',
String $ng_u_uid = '1004',
String $ng_user_home = '/var/spool/nagios',
Optional[String] $ng_u_groups = undef,
String $ng_user_shell = '/bin/bash',
# cgi settings
String $ng_context_help = '1',
String $ng_pending_state = '1',
String $ng_use_auth = '1',
String $ng_use_ssl_auth = '0',
Boolean $ng_enable_def_user = false,
String $ng_def_user_name = 'nagios_insecure',
String $ng_nagios_admin = 'nagios_sec_adm',
String $ng_sysinfo_auth = '',
String $ng_confinfo_auth = '',
String $ng_command_auth = '',
String $ng_hostview_auth = '',
String $ng_serviceview_auth = '',
String $ng_host_cmd_auth = '',
String $ng_svc_cmd_auth = '',
String $ng_readonly_auth = '' ,
String $ng_statusmap_img = 'smbackground.gd2',
Boolean $ng_use_colormap = false,
String $ng_colormap_red = '255',
String $ng_colormap_green = '255',
String $ng_colormap_blue = '255',
String $ng_statusmap_layout = '6',
String $ng_wrl_layout = '4',
Boolean $ng_incl_own_wrl = false,
String $ng_statuswrl_include = '',
String $ng_ping_syntax = '/bin/ping -n -U -c 5 $HOSTADDRESS$',
String $ng_refresh_rate = '90',
String $ng_result_limit = '100',
String $ng_escape_html = '1',
Boolean $ng_use_sound = false,
String $ng_host_unreachable = 'hostdown.wav',
String $ng_host_down = 'hostdown.wav',
String $ng_svc_critical = 'critical.wav',
String $ng_svc_warn = 'warning.wav',
String $ng_svc_unknown = 'warning.wav',
String $ng_normal_sound = 'noproblem.wav',
String $ng_action_url_target = '_blank',
String $ng_notes_url_target = '_blank',
String $ng_lock_author_names = '1',
Boolean $ng_enable_splunk = false,
String $ng_splunk_url = 'http://127.0.0.1:8000/',
String $ng_navbar_addresses = '1',
String $ng_navbar_aliases = '1',
String $ng_ack_no_sticky = '0',
String $ng_ack_no_send = '0',
# selinux
Boolean $ng_use_selinux_tools = true,
# httpd
String $ng_required_hosts = '',
String $ng_required_ips = '127.0.0.0/8',
Boolean $ng_enable_index = true,
# certbot
Boolean $ng_enable_certbot = true,
String $ng_certbot_webroot = '/var/www/html',
String $ng_webserver_name = "nagios.${::domain}",
# main settings
String $ng_log_file = '/var/log/nagios/nagios.log',
String $ng_max_check_attempts = '10',
String $ng_object_cache_file = '/var/spool/nagios/objects.cache',
String $ng_precached_obj_file = '/var/spool/nagios/objects.precache',
String $ng_resource_file = '/etc/nagios/private/resource.cfg',
String $ng_status_file = '/var/log/nagios/status.dat',
String $ng_status_upd_interval = '10',
String $ng_check_ext_commands = '1',
String $ng_command_file = '/var/spool/nagios/cmd/nagios.cmd',
Boolean $ng_enable_query_handler = false,
String $ng_query_socket = '/var/spool/nagios/cmd/nagios.qh',
String $ng_lock_file = '/var/run/nagios/nagios.pid',
String $ng_temp_file = '/var/spool/nagios/nagios.tmp',
String $ng_temp_path = '/tmp',
String $ng_event_broker_options = '-1',
String $ng_event_broker_module = '',
String $ng_log_rotation_method = 'h',
String $ng_log_archive_path = '/var/log/nagios/archives',
String $ng_use_syslog = '1',
String $ng_log_notifications = '1',
String $ng_log_service_retries = '1',
String $ng_log_host_retries = '1',
String $ng_log_event_handlers = '1',
String $ng_log_initial_states = '0',
String $ng_log_current_states = '1',
String $ng_log_external_commands = '1',
String $ng_log_passive_checks = '1',
String $ng_glob_host_evt_handler = '',
String $ng_glob_svc_evt_handler = '',
String $ng_svc_int_check_delay = 's',
String $ng_max_svc_check_spread = '30',
String $ng_svc_interleave_factor = 's',
String $ng_host_int_check_delay = 's',
String $ng_max_host_check_spread = '30',
String $ng_max_concurrent_checks = '0',
String $ng_check_res_reaper_freq = '10',
String $ng_max_check_res_reap_time = '30',
String $ng_check_result_path = '/var/spool/nagios/checkresults',
String $ng_max_check_res_file_age = '3600',
String $ng_cached_h_check_horizon = '15',
String $ng_cached_s_check_horizon = '15',
String $ng_pred_host_dep_checks = '1',
String $ng_pred_svc_dep_checks = '1',
String $ng_soft_state_dependencies = '0',
String $ng_time_change_threshold = '900',
String $ng_auto_reschedule_checks = '0',
String $ng_auto_reschedule_intval = '30',
String $ng_auto_reschedule_window = '180',
String $ng_service_check_timeout = '60',
String $ng_host_check_timeout = '30',
String $ng_event_handler_timeout = '30',
String $ng_notification_timeout = '30',
String $ng_ocsp_timeout = '5',
String $ng_perfdata_timeout = '5',
String $ng_retain_state_inf = '1',
String $ng_state_retention_file = '/var/spool/nagios/retention.dat',
String $ng_retention_update_intval = '60',
String $ng_use_ret_program_state = '1',
String $ng_use_ret_scheduling_info = '1',
String $ng_ret_host_attr_mask = '0',
String $ng_ret_service_attr_mask = '0',
String $ng_ret_proc_host_attr_mask = '0',
String $ng_ret_proc_svc_attr_mask = '0',
String $ng_ret_contact_h_attr_mask = '0',
String $ng_ret_contact_s_attr_mask = '0',
String $ng_interval_length = '60',
String $ng_check_for_updates = '1',
String $ng_bare_update_check = '0',
String $ng_use_aggr_host_checking = '0',
String $ng_execute_service_checks = '1',
String $ng_accept_pass_svc_checks = '1',
String $ng_execute_host_checks = '1',
String $ng_accept_pass_host_checks = '1',
String $ng_enable_notifications = '1',
String $ng_enable_event_handlers = '1',
String $ng_process_perf_data = '0',
String $ng_host_perfdata_command = 'process-host-perfdata',
String $ng_svc_perfdata_command = 'process-service-perfdata',
String $ng_host_perfdata_file = '/var/spool/nagios/host-perfdata',
String $ng_service_perfdata_file = '/var/spool/nagios/service-perfdata',
String $ng_host_perfdata_template = '[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$',
String $ng_svc_perfdata_template = '[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$',
String $ng_host_perfdata_file_mode = 'a',
String $ng_svc_perfdata_file_mode = 'a',
String $ng_h_perfdata_proc_intval = '0',
String $ng_s_perfdata_proc_intval = '0',
String $ng_h_perfdata_proc_cmd = 'process-host-perfdata-file',
String $ng_s_perfdata_proc_cmd = 'process-service-perfdata-file',
String $ng_h_perfdata_proc_e_res = '1',
String $ng_s_perfdata_proc_e_res = '1',
String $ng_obsess_over_services = '0',
String $ng_ocsp_command = '',
String $ng_obsess_over_hosts = '0',
String $ng_ochp_command = '',
String $ng_translate_pass_h_checks = '0',
String $ng_pass_h_checks_are_soft = '0',
String $ng_check_orphaned_svc = '1',
String $ng_check_orphaned_hosts = '1',
String $ng_check_service_freshness = '1',
String $ng_svc_fresh_check_intval = '60',
String $ng_svc_check_timeout_state = 'c',
String $ng_check_host_freshness = '0',
String $ng_host_fresh_check_intval = '60',
String $ng_add_freshness_latency = '15',
String $ng_enable_flap_detection = '1',
String $ng_low_svc_flap_threshold = '5.0',
String $ng_high_svc_flap_threshold = '20.0',
String $ng_low_h_flap_threshold = '5.0',
String $ng_high_h_flap_threshold = '20.0',
String $ng_date_format = 'us',
Boolean $ng_use_timezone_offset = false,
String $ng_use_timezone = '',
String $ng_illegal_obj_name_chars = '`~!$%^&*|\'"<>?,()=',
String $ng_ill_macro_output_chars = '`~$&|\'"<>',
String $ng_use_regexp_matching = '0',
String $ng_true_regexp_matching = '0',
String $ng_daemon_dumps_core = '0',
String $ng_use_large_inst_tweaks = '0',
String $ng_enable_env_macros = '0',
String $ng_free_child_process_mem = '1',
String $ng_child_proc_fork_twice = '1',
String $ng_debug_level = '0',
String $ng_debug_verbosity = '1',
String $ng_debug_file = '/var/spool/nagios/nagios.debug',
String $ng_max_debug_file_size = '1000000',
String $ng_allow_empty_hostgroups = '0',
String $ng_check_workers = '',
String $ng_host_down_svc_checks = '0',
Boolean $ng_enable_load_ctl_options = false,
String $ng_loadctl_options = 'jobs_max=100;backoff_limit=10;rampup_change=5',
# single nagios checks
Boolean $ng_enable_swap_check = true,
# installation
Array $reqpackages_server = ['nagios','nagios-devel'],
Array $reqpackages_client = ['net-snmp-utils','nagios-plugins','nagios-plugins-all','nagios-plugins-nrpe','nagios-common'],
class confdroid_nagios::params (
) {
# service
$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_run_dir = '/var/run/nagios'
$ng_cmd_dir = "${ng_spool_dir}/cmd"
$ng_checkresults_dir = "${ng_spool_dir}/checkresults"
# 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_statdat_erb = 'cd_nagios/selinux/statusdat.erb'
$ng_checknrpe_erb = 'cd_nagios/selinux/checknrpe.erb'
$ng_checknagios_erb = 'cd_nagios/selinux/checknagios.erb'
$ng_nagios_conf = '/etc/httpd/conf.d/nagios.conf'
$ng_nagios_conf_erb = 'cd_nagios/httpd/nagios_conf.erb'
$ng_welcome_conf = '/etc/httpd/conf.d/welcome.conf'
$ng_welcome_conf_erb = 'cd_nagios/httpd/welcome_conf.erb'
$ng_forward_conf = '/etc/httpd/conf.d/nagios_forward.conf'
$ng_forward_conf_erb = 'cd_nagios/httpd/forward_conf.erb'
$ng_get_cert_erb = 'cd_nagios/certbot/get_cert.erb'
$ng_unless_get_cert = 'cd_nagios/certbot/unless_get_cert.erb'
$ng_unless_renew_erb = 'cd_nagios/certbot/unless_renew_cert.erb'
$ng_index_html_file = '/var/www/html/index.html'
$ng_index_html_erb = 'cd_nagios/httpd/index_html.erb'
$ng_ssl_vhost_file = '/etc/httpd/conf.d/nagios_ssl.conf'
$ng_ssl_vhost_erb = 'cd_nagios/httpd/nagios_ssl_vhost.erb'
$ng_nagios_cfg_file = "${ng_main_dir}/nagios.cfg"
$ng_nagios_cfg_erb = 'cd_nagios/nagios/nagios_cfg.erb'
$ng_resource_erb = 'cd_nagios/nagios/resource_cfg.erb'
$ng_grep_erb = 'cd_nagios/selinux/grep.erb'
# certbot
$ng_certbot_main_dir = '/etc/letsencrypt'
$ng_certbot_archive = "${ng_certbot_main_dir}/archive"
$ng_certbot_check = "${ng_certbot_archive}/${ng_webserver_name}/cert1.pem"
$ng_certbot_live = "${ng_certbot_main_dir}/live"
# nagios
$ng_target_templates = "${ng_conf_d_dir}/nagios_templates.cfg"
$ng_templates_head_erb = 'cd_nagios/nagios/templates_cfg_head.erb'
$ng_templates_rule_erb = 'cd_nagios/nagios/templates_cfg_rule.erb'
$ng_tgt_timeperiods_base = "${ng_conf_d_dir}/nagios_timeperiods.cfg"
$ng_tgt_timep_add = "${ng_conf_d_dir}/nagios_timeperiods_add.cfg"
$ng_tgt_timep_head_erb = 'cd_nagios/nagios/timeperiods_cfg_head.erb'
$ng_tgt_timep_rule_erb = 'cd_nagios/nagios/timeperiods_cfg_rule.erb'
$ng_target_localhost = "${ng_conf_d_dir}/nagios_localhost.cfg"
$ng_target_host = "${ng_conf_d_dir}/nagios_host.cfg"
$ng_target_hostgroup_base = "${ng_conf_d_dir}/nagios_hostgroups_base.cfg"
$ng_tgt_hostgroup_add = "${ng_conf_d_dir}/nagios_hostgroups_add.cfg"
$ng_tgt_hostgrp_head_erb = 'cd_nagios/nagios/hostgroups_cfg_head.erb'
$ng_tgt_hostgrp_rule_erb = 'cd_nagios/nagios/hostgroups_cfg_rule.erb'
$ng_target_hostdep = "${ng_conf_d_dir}/nagios_hostdependency.cfg"
$ng_target_hostesc = "${ng_conf_d_dir}/nagios_hostescalation.cfg"
$ng_target_hostext = "${ng_conf_d_dir}/nagios_hostextinfo.cfg"
$ng_target_service = "${ng_conf_d_dir}/nagios_service.cfg"
$ng_target_svcgrp_base = "${ng_conf_d_dir}/nagios_servicegroups_base.cfg"
$ng_tgt_servicegroup_add = "${ng_conf_d_dir}/nagios_servicegroups_add.cfg"
$ng_tgt_svcgrp_head_erb = 'cd_nagios/nagios/svcgroups_cfg_head.erb'
$ng_tgt_svcgrp_rule_erb = 'cd_nagios/nagios/svcgroups_cfg_rule.erb'
$ng_target_base_contact = "${ng_conf_d_dir}/nagios_contact_base.cfg"
$ng_target_add_contact = "${ng_conf_d_dir}/nagios_contact_add.cfg"
$ng_contacts_head_erb = 'cd_nagios/nagios/contacts_cfg_head.erb'
$ng_contacts_rule_erb = 'cd_nagios/nagios/contacts_cfg_rule.erb'
$ng_tgt_contactgroup_base = "${ng_conf_d_dir}/nagios_contactgroup_base.cfg"
$ng_tgt_contactgroup_add = "${ng_conf_d_dir}/nagios_contactgroup_add.cfg"
$ng_cntctgrps_head_erb = 'cd_nagios/nagios/contactgroups_cfg_head.erb'
$ng_cntctgrps_rule_erb = 'cd_nagios/nagios/contactgroups_cfg_rule.erb'
$ng_target_command = "${ng_conf_d_dir}/nagios_commands_base.cfg"
$ng_nagios_service_cmd = 'check_nagios!/var/log/nagios/status.dat!5!/usr/sbin/nagios'
# Default facts
$fqdn = $facts['networking']['fqdn']
$domain = $facts['networking']['domain']
$os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major']
# includes must be last
include cd_nagios::main::config
include confdroid_nagios::main::config
}

View File

@@ -1,141 +0,0 @@
## cd_nagios::selinux::config.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages all aspects of selinux for cd_nagios.
##############################################################################
class cd_nagios::selinux::config (
) inherits cd_nagios::params {
if $ng_use_selinux_tools == true {
require cd_selinux
# it appears that selinux behaves differently across 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'],
# user => $ng_user,
# cwd => $ng_user_home,
# creates => "${ng_user_home}/my-taccgi.pp",
# notify => Exec['semodule_taccgi'],
# }
# exec { 'semodule_taccgi':
# command => "semodule -i ${ng_user_home}/my-taccgi.pp",
# path => ['/usr/bin','/usr/sbin'],
# user => $ng_user,
# cwd => $ng_user_home,
# 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 => $ng_user_home,
# creates => "${ng_user_home}/my-statuscgi.pp",
# notify => Exec['semodule_statuscgi'],
# }
# exec { 'semodule_statuscgi':
# command => 'semodule -i my-statuscgi.pp',
# path => ['/usr/bin','/usr/sbin'],
# cwd => $ng_user_home,
# require => Exec['create_policy_statuscgi'],
# refreshonly => true,
# notify => Service[$ng_service],
# }
# sealert check_nrpe
# exec { 'create_policy_checknrpe':
# command => template($ng_checknrpe_erb),
# path => ['/usr/bin','/usr/sbin'],
# cwd => $ng_user_home,
# creates => "${ng_user_home}/my-checknrpe.pp",
# notify => Exec['semodule_checknrpe'],
# }
# exec { 'semodule_checknrpe':
# command => 'semodule -i my-checknrpe.pp',
# path => ['/usr/bin','/usr/sbin'],
# cwd => $ng_user_home,
# require => Exec['create_policy_checknrpe'],
# refreshonly => true,
# notify => Service[$ng_service],
# }
# sealert check_nagios
# exec { 'create_policy_checknagios':
# command => template($ng_checknagios_erb),
# path => ['/usr/bin','/usr/sbin'],
# cwd => $ng_user_home,
# creates => "${ng_user_home}/my-checknagios.pp",
# notify => Exec['semodule_checknagios'],
# }
# exec { 'semodule_checknagios':
# command => 'semodule -i my-checknagios.pp',
# path => ['/usr/bin','/usr/sbin'],
# cwd => $ng_user_home,
# require => Exec['create_policy_checknagios'],
# refreshonly => true,
# notify => Service[$ng_service],
# }
# sealert status.dat
exec { 'create_policy_statusdat':
command => template($ng_statdat_erb),
path => ['/usr/bin','/usr/sbin'],
user => $ng_user,
cwd => $ng_user_home,
creates => "${ng_user_home}/my-http.pp",
notify => Exec['semodule_statusdat'],
}
exec { 'semodule_statusdat':
command => "semodule -i ${ng_user_home}/my-httpd.pp",
path => ['/usr/bin','/usr/sbin'],
user => $ng_user,
cwd => $ng_user_home,
require => Exec['create_policy_statusdat'],
refreshonly => true,
notify => Service[$ng_service],
}
# sealert grep
exec { 'create_policy_grep':
command => template($ng_grep_erb),
path => ['/usr/bin','/usr/sbin'],
user => $ng_user,
cwd => $ng_user_home,
creates => "${ng_user_home}/my-grep.pp",
notify => Exec['semodule_statusdat'],
}
exec { 'semodule_grep':
command => "semodule -i ${ng_user_home}/my-grep.pp",
path => ['/usr/bin','/usr/sbin'],
user => $ng_user,
cwd => $ng_user_home,
require => Exec['create_policy_grep'],
refreshonly => true,
notify => Service[$ng_service],
}
}
}

View File

@@ -1,28 +0,0 @@
## cd_nagios::server::access.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Define manages user- and password rules for accessing nagios.
# @param [string] ng_htpasswd_user user name for the /etc/nagios/passwd file
# @param [string] ng_htpasswd_password the encrypted password for the
# /etc/nagios/passwd file.
##############################################################################
define cd_nagios::server::access (
Optional[String] $ng_htpasswd_user = undef,
Optional[String] $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
if $::fqdn == $ng_nagios_server {
# create password rules
concat::fragment { $name:
target => $ng_htpasswd_file,
content => template($ng_htpasswd_rule),
}
}
}

View File

@@ -1,30 +0,0 @@
## cd_nagios::server::access_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages presence of /etc/nagios/phtpasswd file.
# @example
# cd_nagios::server::access { 'example':
# ng_htpasswd_user => 'example_user',
# ng_htpasswd_password => 'example_password_encrypted',
# }
##############################################################################
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,
notify => Service[$ng_service],
}
}
}

View File

@@ -1,98 +0,0 @@
## cd_nagios::server::files.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages all configuration files required for cd_nagios.
##############################################################################
class cd_nagios::server::files (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https == true {
if $ng_enable_certbot == true {
require cd_nagios::certbot::certs
}
}
require cd_nagios::main::dirs
# manage nagios.cfg
file { $ng_nagios_cfg_file:
ensure => file,
path => $ng_nagios_cfg_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
content => template($ng_nagios_cfg_erb),
notify => Service[$ng_service],
}
# 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],
}
## Apache files
# since we use vhost files, we do not want the regular file to appear
# after upgrades to avoid conflicts
file { $ng_nagios_conf:
ensure => absent,
}
file { $ng_forward_conf:
ensure => file,
path => $ng_forward_conf,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_forward_conf_erb),
notify => Service[$ae_service],
}
if $ng_use_https == true {
# create ssl vhost
file { $ng_ssl_vhost_file:
ensure => file,
path => $ng_ssl_vhost_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => httpd_config_t,
seluser => system_u,
content => template($ng_ssl_vhost_erb),
notify => Service[$ae_service],
}
}
if $ng_use_https != true {
# remove ssl_vhost
file { $ng_ssl_vhost_file:
ensure => absent,
}
}
}
}

View File

@@ -1,198 +0,0 @@
## cd_nagios::server::service.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# @summary Class manages the service(s) for cd_nagios.
#############################################################################
class cd_nagios::server::service (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_include_nrpe == true {
require cd_nrpe
}
require cd_nagios::server::files
require cd_nagios::server::access_rules
require cd_nagios::nagios::objects::config
require cd_nagios::nagios::resources::resource
service { $ng_service:
ensure => running,
hasstatus => true,
hasrestart => true,
enable => true,
}
@@nagios_host { 'localhost':
ensure => $ng_ping_ensure,
alias => 'localhost',
address => '127.0.0.1',
use => 'linux-server',
target => $ng_target_localhost,
hostgroups => 'linux-servers',
contacts => 'ops',
max_check_attempts => $ng_max_check_attempts,
notification_period => '24x7',
owner => $ng_user,
group => $ng_user,
mode => '0640',
check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
notify => Service[$ng_service],
}
@@nagios_service { 'check_nagios_localhost':
check_command => $ng_nagios_service_cmd,
use => 'generic-service',
host_name => 'localhost',
notification_period => '24x7',
service_description => 'localhost_nagios_service',
target => $ng_target_service,
owner => $ng_user,
group => $ng_user,
mode => '0640',
contacts => 'ops',
}
@@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 => $ng_max_check_attempts,
notification_period => '24x7',
owner => $ng_user,
group => $ng_user,
mode => '0640',
check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
notify => Service[$ng_user],
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
if $ng_enable_swap_check == true {
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
@@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 => $ng_user,
group => $ng_user,
mode => '0640',
}
resources { ['nagios_host',
'nagios_hostgroup',
'nagios_hostdependency',
'nagios_hostescalation',
'nagios_hostextinfo',
'nagios_service',
'nagios_servicegroup',
'nagios_servicedependency',
'nagios_serviceescalation',
'nagios_serviceextinfo',
'nagios_contact',
'nagios_contactgroup',
'nagios_command',
'nagios_timeperiod']:
purge => true,
}
# collect resources and populate /etc/nagios/conf.d/nagios_*.cfg
Nagios_host <<||>> { notify => Service['nagios'] }
Nagios_hostgroup <<||>> { notify => Service['nagios'] }
Nagios_hostdependency <<||>> { notify => Service['nagios'] }
Nagios_hostescalation <<||>> { notify => Service['nagios'] }
Nagios_hostextinfo <<||>> { notify => Service['nagios'] }
Nagios_service <<||>> { notify => Service['nagios'] }
Nagios_servicegroup <<||>> { notify => Service['nagios'] }
Nagios_servicedependency <<||>> { notify => Service['nagios'] }
Nagios_serviceescalation <<||>> { notify => Service['nagios'] }
Nagios_serviceextinfo <<||>> { notify => Service['nagios'] }
Nagios_contact <<||>> { notify => Service['nagios'] }
Nagios_contactgroup <<||>> { notify => Service['nagios'] }
Nagios_command <<||>> { notify => Service['nagios'] }
Nagios_timeperiod <<||>> { notify => Service['nagios'] }
}
}

View File

@@ -1 +0,0 @@
certbot certonly -t -n --agree-tos --webroot -w <%= @ng_certbot_webroot %>/ -d <%= @ng_webserver_name %> --email <%= @ng_mail_user %>

View File

@@ -1,4 +0,0 @@
#!/bin/bash
<% if @ng_enable_certbot == true %>
test -d /etc/letsencrypt/archive/<%= @ng_nagios_server %>
<% end %>

View File

@@ -1,7 +0,0 @@
#!/bin/bash
<% if @ng_enable_certbot == true %>
case `find /etc/letsencrypt/renewal -type f -name "<%= @ng_nagios_server %>.conf" -mtime +80` in
'') echo 'No filename found' exit 0 ;;
*) echo 'Found filename' exit 1 ;;
esac
<% end %>

View File

@@ -1,96 +0,0 @@
<VirtualHost *:<%= @ng_http_port %>>
ServerAdmin root@localhost
DocumentRoot /var/www/html
ServerName www.<%= @ng_webserver_name %>/nagios
ServerAlias <%= @ng_webserver_name %>
<% if @ng_use_https == true -%>
Redirect permanent / https://<%= @ng_webserver_name %>/
<% end -%>
<% if @ng_use_https != true -%>
ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
<Directory "/usr/lib64/nagios/cgi-bin/">
<% if @ng_use_https == true -%>
SSLRequireSSL
<% else -%>
# SSLRequireSSL
<% end -%>
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
<% unless @ng_required_hosts.empty? -%>
Require host <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Require ip <%= @ng_required_ips %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
<% unless @ng_required_hosts.empty? -%>
Allow from <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Allow from <%= @ng_required_ips %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</IfVersion>
</Directory>
Alias /nagios "/usr/share/nagios/html"
<Directory "/usr/share/nagios/html">
<% if @ng_use_https == true -%>
SSLRequireSSL
<% else -%>
# SSLRequireSSL
<% end -%>
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
<% unless @ng_required_hosts.empty? -%>
Require host <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Require ip <%= @ng_required_ips %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
<% unless @ng_required_hosts.empty? -%>
Allow from <%= @ng_required_hosts %>
<% end -%>
<% unless @ng_required_ips.empty? -%>
Allow from <%= @ng_required_ips %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</IfVersion>
</Directory>
<% end -%>
<Directory />
AllowOverride All
</Directory>
ErrorLog /var/log/httpd/<%= @ng_webserver_name %>-error_log
CustomLog /var/log/httpd/<%= @ng_webserver_name %>-access_log common
</VirtualHost>

View File

@@ -1,126 +0,0 @@
###############################################################################
##### virtual_host file created by puppet, changes will be overwritten ######
###############################################################################
<VirtualHost *:<%= @ng_https_port %>>
ServerAdmin root@localhost
DocumentRoot /var/www/html
ServerName <%= @ng_webserver_name %>
ServerAlias <%= @ng_webserver_name %>
ErrorLog /var/log/httpd/nagios_ssl_error_log
# ErrorLog syslog:local1
TransferLog /var/log/httpd/nagios_ssl_transfer_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"
<% if @ng_enable_certbot == true -%>
SSLCertificateFile <%= @ng_certbot_live %>/<%= @ng_webserver_name %>/cert.pem
SSLCertificateKeyFile <%= @ng_certbot_live %>/<%= @ng_webserver_name %>/privkey.pem
SSLCACertificateFile <%= @ng_certbot_live %>/<%= @ng_webserver_name %>/fullchain.pem
<% elsif @ng_enable_certbot != true -%>
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
<% end -%>
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
ScriptAlias /nagios/cgi-bin/ "/usr/lib64/nagios/cgi-bin/"
<Directory "/usr/lib64/nagios/cgi-bin/">
<% if @ng_use_https == true -%>
SSLRequireSSL
<% else -%>
# SSLRequireSSL
<% end -%>
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
<% unless @ng_required_hosts.empty? -%>
Require host <%= @ng_required_hosts %>
<% end -%>
<% unless @source_range.empty? -%>
Require ip <%= @source_range %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
<% unless @ng_required_hosts.empty? -%>
Allow from <%= @ng_required_hosts %>
<% end -%>
<% unless @source_range.empty? -%>
Allow from <%= @source_range %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</IfVersion>
</Directory>
Alias /nagios "/usr/share/nagios/html"
<Directory "/usr/share/nagios/html">
<% if @ng_use_https == true -%>
SSLRequireSSL
<% else -%>
# SSLRequireSSL
<% end -%>
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
<% unless @ng_required_hosts.empty? -%>
Require host <%= @ng_required_hosts %>
<% end -%>
<% unless @source_range.empty? -%>
Require ip <%= @source_range %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
<% unless @ng_required_hosts.empty? -%>
Allow from <%= @ng_required_hosts %>
<% end -%>
<% unless @source_range.empty? -%>
Allow from <%= @source_range %>
<% end -%>
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios/passwd
Require valid-user
</IfVersion>
</Directory>
RedirectMatch ^/$ https://<%= @ng_webserver_name %>/nagios
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

View File

@@ -1,90 +0,0 @@
###############################################################################
########## parameterized cgi.cfg created by Puppet ##########
########## manual changes will be overwritten !!! ##########
###############################################################################
main_config_file=<%= @ng_main_config %>
physical_html_path=<%= @ng_share_html %>
url_html_path=/nagios
show_context_help=<%= @ng_context_help %>
use_pending_states=<%= @ng_pending_state %>
use_authentication=<%= @ng_use_auth %>
use_ssl_authentication=<%= @ng_use_ssl_auth %>
<% if @ng_enable_def_user == true -%>
default_user_name=<%= @ng_def_user_name %>
<% else -%>
#default_user_name=guest
<% end -%>
authorized_for_system_information=<%= @ng_nagios_admin %>,<%= @ng_sysinfo_auth %>
authorized_for_configuration_information=<%= @ng_nagios_admin %>,<%= @ng_confinfo_auth %>
authorized_for_system_commands=<%= @ng_nagios_admin %>,<%= @ng_command_auth %>
authorized_for_all_services=<%= @ng_nagios_admin %>,<%= @ng_serviceview_auth %>
authorized_for_all_hosts=<%= @ng_nagios_admin %>,<%= @ng_hostview_auth %>
authorized_for_all_service_commands=<%= @ng_nagios_admin %>,<%= @ng_svc_cmd_auth %>
authorized_for_all_host_commands=<%= @ng_nagios_admin %>,<%= @ng_host_cmd_auth %>
authorized_for_read_only=<%= @ng_readonly_auth %>
statusmap_background_image=<%= @ng_statusmap_img %>
<% if @ng_use_colormap == true -%>
color_transparency_index_r=<%= @ng_colormap_red %>
color_transparency_index_g=<%= @ng_colormap_green %>
color_transparency_index_b=<%= @ng_colormap_blue %>
<% else -%>
#color_transparency_index_r=255
#color_transparency_index_g=255
#color_transparency_index_b=255
<% end -%>
default_statusmap_layout=<%= @ng_statusmap_layout%>
default_statuswrl_layout=<%= @ng_wrl_layout %>
<% if @ng_incl_own_wrl == true -%>
statuswrl_include=<%= @ng_statuswrl_include %>
<% else -%>
#statuswrl_include=myworld.wrl
<% end -%>
ping_syntax=<%= @ng_ping_syntax %>
refresh_rate=<%= @ng_refresh_rate %>
result_limit=1<%= @ng_result_limit %>
escape_html_tags=<%= @ng_escape_html %>
<% if @ng_use_sound == true -%>
host_unreachable_sound=<%= @ng_host_unreachable %>
host_down_sound=<%= @ng_host_down %>
service_critical_sound=<%= @ng_svc_critical %>
service_warning_sound=<%= @ng_svc_warn %>
service_unknown_sound=<%= @ng_svc_unknown %>
normal_sound=<%= @ng_normal_sound %>
<% else -%>
#host_unreachable_sound=hostdown.wav
#host_down_sound=hostdown.wav
#service_critical_sound=critical.wav
#service_warning_sound=warning.wav
#service_unknown_sound=warning.wav
#normal_sound=noproblem.wav
<% end -%>
action_url_target=<%= @ng_action_url_target %>
notes_url_target=<%= @ng_notes_url_target %>
lock_author_names=<%= @ng_lock_author_names %>
<% if @ng_enable_splunk -%>
enable_splunk_integration=1
splunk_url=<%= @ng_splunk_url %>
<% else -%>
enable_splunk_integration=0
#splunk_url=http://127.0.0.1:8000/
<% end -%>
navbar_search_for_addresses=<%= @ng_navbar_addresses %>
navbar_search_for_aliases=<%= @ng_navbar_aliases %>
ack_no_sticky=<%= @ng_ack_no_sticky %>
ack_no_send=<%= @ng_ack_no_send %>

View File

@@ -1,6 +0,0 @@
###############################################################################
########## nagios_add_contactgroups.cfg created by Puppet ##########
########## manual changes are overwritten! ##########
###############################################################################
# rules are created below by external puppet rules.

View File

@@ -1,6 +0,0 @@
define contactgroup {
contactgroup_name <%= @ng_contactgroup_name %>
alias <%= @ng_contactgroup_alias %>
register <%= @ng_contactgroup_register %>
}

View File

@@ -1,8 +0,0 @@
###############################################################################
########## nagios_add_contact.cfg created by Puppet ##########
########## manual changes are overwritten! ##########
###############################################################################
########## Full reference file available at ##########
########## https://confdroid.com/2017/07/nagios-contacts-cfg/ ##########
###############################################################################
# rules are created below by external puppet rules.

View File

@@ -1,8 +0,0 @@
define contact {
contact_name <%= @ng_contact_name %>
use <%= @ng_contact_use %>
alias <%= @ng_contact_alias %>
email <%= @ng_contact_email %>
contactgroups <%= @ng_contact_groups %>
}

View File

@@ -1,5 +0,0 @@
###############################################################################
########## nagios_hostgroups_add.cfg created by Puppet ##########
########## manual changes are overwritten! ##########
###############################################################################
# rules are created below by external puppet rules.

View File

@@ -1,6 +0,0 @@
define hostgroup {
hostgroup_name <%= @ng_hostgroup_name %>
alias <%= @ng_hostgroup_alias %>
register <%= @ng_hostgroup_register %>
}

View File

@@ -1 +0,0 @@
<%= @ng_htpasswd_user %>:<%= @ng_htpasswd_password %>

Some files were not shown because too many files have changed in this diff Show More