Merge branch 'develop' for version 0.6.2.
This commit is contained in:
commit
c3697ba730
51 changed files with 944 additions and 324 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
|
.*.swp
|
||||||
|
.*.swo
|
||||||
pkg/
|
pkg/
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
vendor/
|
vendor/
|
||||||
|
@ -5,3 +7,4 @@ spec/fixtures/
|
||||||
.vagrant/
|
.vagrant/
|
||||||
.bundle/
|
.bundle/
|
||||||
coverage/
|
coverage/
|
||||||
|
.ruby-version
|
||||||
|
|
6
.mailmap
6
.mailmap
|
@ -3,3 +3,9 @@
|
||||||
<michael.friedrich@netways.de> <Michael.Friedrich@netways.de>
|
<michael.friedrich@netways.de> <Michael.Friedrich@netways.de>
|
||||||
Nick Chappell <nick@intronic.org> nickchappell <nick@intronic.org>
|
Nick Chappell <nick@intronic.org> nickchappell <nick@intronic.org>
|
||||||
Mélanie Gault <melanie.gault@ville-noumea.nc> melanie <melanie.gault@ville-noumea.nc>
|
Mélanie Gault <melanie.gault@ville-noumea.nc> melanie <melanie.gault@ville-noumea.nc>
|
||||||
|
Mélanie Gault <melanie.gault@ville-noumea.nc> Melanie Gault <melanie.gault@ville-noumea.nc>
|
||||||
|
Ricardo Cropalato de Melo <ricardo@cropalato.com.br> ricardo@cropalato.com.br <ricardo@cropalato.com.br>
|
||||||
|
Ricardo Cropalato de Melo <ricardo@cropalato.com.br> Ricardo Melo <ricardo.melo@gameloft.com>
|
||||||
|
Olivier Fontannaud <albustax@gmail.com> ofontannaud <ofontannaud@etai.fr>
|
||||||
|
Olivier Fontannaud <albustax@gmail.com> Olivier FONTANNAUD <albustax@gmail.com>
|
||||||
|
Matthew J. Brooks <matthew@sonomatechpartners.com> Matthew Brooks <matthew@sonomatechpartners.com>
|
||||||
|
|
17
AUTHORS
17
AUTHORS
|
@ -1,11 +1,18 @@
|
||||||
|
Achim Ledermüller <achim.ledermueller@netways.de>
|
||||||
Adam Stephens <adam.c.stephens@noaa.gov>
|
Adam Stephens <adam.c.stephens@noaa.gov>
|
||||||
|
Alessandro Franceschi <al@lab42.it>
|
||||||
|
Alexandre Beche <alexandre.beche@gmail.com>
|
||||||
|
Devon Mizelle <devon@arin.net>
|
||||||
Gunnar Beutner <gunnar.beutner@netways.de>
|
Gunnar Beutner <gunnar.beutner@netways.de>
|
||||||
|
Josh Holland <josh@inv.alid.pw>
|
||||||
|
Markus Frosch <markus@lazyfrosch.de>
|
||||||
|
Matthew J. Brooks <matthew@sonomatechpartners.com>
|
||||||
Mélanie Gault <melanie.gault@ville-noumea.nc>
|
Mélanie Gault <melanie.gault@ville-noumea.nc>
|
||||||
Michael Friedrich <michael.friedrich@netways.de>
|
Michael Friedrich <michael.friedrich@netways.de>
|
||||||
Nick Chappell <nick@intronic.org>
|
Nick Chappell <nick@intronic.org>
|
||||||
Thomas Weißschuh <thomas@t-8ch.de>
|
Nicolas Bigler <bigli@bigli.ch>
|
||||||
|
Olivier Fontannaud <albustax@gmail.com>
|
||||||
|
Ricardo Cropalato de Melo <ricardo@cropalato.com.br>
|
||||||
Steven Bambling <smbambling@gmail.com>
|
Steven Bambling <smbambling@gmail.com>
|
||||||
Josh Holland <josh@inv.alid.pw>
|
Thomas Weißschuh <thomas@t-8ch.de>
|
||||||
Ricardo Melo <ricardo.melo@gameloft.com>
|
Tom De Vylder <tom@penumbra.be>
|
||||||
Tom De Vylder
|
|
||||||
Devon Mizelle <devon@arin.net>
|
|
||||||
|
|
20
CHANGELOG.md
20
CHANGELOG.md
|
@ -1,6 +1,26 @@
|
||||||
#Changelog
|
#Changelog
|
||||||
- - -
|
- - -
|
||||||
|
|
||||||
|
###v0.6.2 (January 29th, 2015)
|
||||||
|
|
||||||
|
* Feature: [PR-58](https://github.com/Icinga/puppet-icinga2/pull/58) and [dev.icinga.org issue #8156](https://dev.icinga.org/issues/8156): Added the ability to use hashes directly in host `vars` parameters (instead of rendering hashes into a series of `vars.` lines in the rendered object file).
|
||||||
|
* Feature: [PR-63](https://github.com/Icinga/puppet-icinga2/pull/63) and [dev.icinga.org issue #7232](https://dev.icinga.org/issues/7232): Added an Endpoint object defined type.
|
||||||
|
* Feature: [PR-62](https://github.com/Icinga/puppet-icinga2/pull/62) and [dev.icinga.org issue #7230](https://dev.icinga.org/issues/7230): Added an IcingaStatusWriter object defined type.
|
||||||
|
* Feature: [PR-61](https://github.com/Icinga/puppet-icinga2/pull/61) and [dev.icinga.org issue #7229](https://dev.icinga.org/issues/7229): Added a FileLogger object defined type.
|
||||||
|
* Feature: [PR-70](https://github.com/Icinga/puppet-icinga2/pull/70) and [dev.icinga.org issue #8153](https://dev.icinga.org/issues/8153): Change validation of interval parameters.
|
||||||
|
* Feature: [PR-68](https://github.com/Icinga/puppet-icinga2/pull/68) and [dev.icinga.org issue #7346](https://dev.icinga.org/issues/7346): Added OS support for Red Hat.
|
||||||
|
* Feature: [dev.icinga.org issue #7231](https://dev.icinga.org/issues/7231): Added an `ApiListener` object defined type.
|
||||||
|
* Feature: [PR-76](https://github.com/Icinga/puppet-icinga2/pull/76) and [dev.icinga.org issue #8154](https://dev.icinga.org/issues/8154): Ensure ordering of hashes in ERB templates
|
||||||
|
* Bug: [PR-75](https://github.com/Icinga/puppet-icinga2/pull/75): Use `$ipaddress` as the default fact for IP addresses in `icinga2::object::host` definitions; `$ipaddress_eth0` won't work on systems with systemd that use consistent network device naming.
|
||||||
|
* Bug: [PR-74](https://github.com/Icinga/puppet-icinga2/pull/74): Remove the empty `icinga2` and `icinga2::obect` classes.
|
||||||
|
* Feature: [PR-77](https://github.com/Icinga/puppet-icinga2/pull/77/) and [dev.icinga.org issue #8239](https://dev.icinga.org/issues/8239): Added the ability to specify the contents of check plugins inline.
|
||||||
|
* Bug: [PR-81](https://github.com/Icinga/puppet-icinga2/pull/81): Fixed typo in the ERB template for `Notification` objects.
|
||||||
|
* Feature: [PR-83](https://github.com/Icinga/puppet-icinga2/pull/83): Added Red Hat support.
|
||||||
|
* Feature: [PR-60](https://github.com/Icinga/puppet-icinga2/pull/60) and [dev.icinga.org issue #7228](https://dev.icinga.org/issues/7228): Added a NotificationComponent object defined type.
|
||||||
|
* Feature: [PR-59](https://github.com/Icinga/puppet-icinga2/pull/59) and [dev.icinga.org issue #7227](https://dev.icinga.org/issues/7227): Added a CheckerComponent object defined type.
|
||||||
|
* Bug: [PR-88](https://github.com/Icinga/puppet-icinga2/pull/88): Fix unquoted string in the ERB template for apply objects that apply services to hosts.
|
||||||
|
* Feature: [PR-85](https://github.com/Icinga/puppet-icinga2/pull/85): Improve notifications of the NRPE daemon when config files or command definition files are changed.
|
||||||
|
|
||||||
###v0.6.1 (December 2nd, 2014)
|
###v0.6.1 (December 2nd, 2014)
|
||||||
|
|
||||||
* Feature: [PR-54](https://github.com/Icinga/puppet-icinga2/pull/54) and [dev.icinga.org issue #7225](https://dev.icinga.org/issues/7225): Added a CompatLogger object defined type.
|
* Feature: [PR-54](https://github.com/Icinga/puppet-icinga2/pull/54) and [dev.icinga.org issue #7225](https://dev.icinga.org/issues/7225): Added a CompatLogger object defined type.
|
||||||
|
|
14
Gemfile
Normal file
14
Gemfile
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
||||||
|
|
||||||
|
#Install the gems but don't run `require gemname` when bundler runs
|
||||||
|
#Source: http://stackoverflow.com/questions/4800721/bundler-what-does-require-false-in-a-gemfile-mean
|
||||||
|
#Source of the list of gems: https://github.com/puppetlabs/puppetlabs-ntp/blob/master/Gemfile
|
||||||
|
group :development, :unit_tests do
|
||||||
|
gem 'rake', :require => false
|
||||||
|
gem 'rspec-puppet', :require => false
|
||||||
|
gem 'puppetlabs_spec_helper', :require => false
|
||||||
|
gem 'puppet-lint', :require => false
|
||||||
|
gem 'simplecov', :require => false
|
||||||
|
gem 'puppet_facts', :require => false
|
||||||
|
gem 'json', :require => false
|
||||||
|
end
|
139
README.md
139
README.md
|
@ -38,6 +38,15 @@ For Ubuntu systems, this module requires the [Puppet Labs apt module](https://gi
|
||||||
|
|
||||||
On EL-based systems (CentOS, Red Hat Enterprise Linux, Fedora, etc.), the [EPEL package repository](https://fedoraproject.org/wiki/EPEL) is required. You can also use the [icinga2::nrpe class](#nrpe-usage) to set up NRPE on CentOS 5. It is discouraged to set up Icinga2 Server on this old of a distribution. You are encouraged to use at least CentOS 6 or higher.
|
On EL-based systems (CentOS, Red Hat Enterprise Linux, Fedora, etc.), the [EPEL package repository](https://fedoraproject.org/wiki/EPEL) is required. You can also use the [icinga2::nrpe class](#nrpe-usage) to set up NRPE on CentOS 5. It is discouraged to set up Icinga2 Server on this old of a distribution. You are encouraged to use at least CentOS 6 or higher.
|
||||||
|
|
||||||
|
####Note for RedHat
|
||||||
|
|
||||||
|
If you are using RedHat Satellite server, set
|
||||||
|
<pre>
|
||||||
|
$manage_repos = false
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
in `icinga2::server` class and make sure, you have a channel set up with the contents of the icinga2 repository and the needed packages from EPEL. If you leave it at true, the EPEL repository will be used directly.
|
||||||
|
|
||||||
If you would like to use the `icinga2::object` defined types as [exported resources](https://docs.puppetlabs.com/guides/exported_resources.html), you'll need to have your Puppet master set up with PuppetDB. See the Puppet Labs documentation for more info: [Docs: PuppetDB](https://docs.puppetlabs.com/puppetdb/)
|
If you would like to use the `icinga2::object` defined types as [exported resources](https://docs.puppetlabs.com/guides/exported_resources.html), you'll need to have your Puppet master set up with PuppetDB. See the Puppet Labs documentation for more info: [Docs: PuppetDB](https://docs.puppetlabs.com/puppetdb/)
|
||||||
|
|
||||||
###Server requirements
|
###Server requirements
|
||||||
|
@ -173,7 +182,7 @@ If you would like to use the [Debmon repository](http://debmon.org/packages) for
|
||||||
class { 'icinga2::server':
|
class { 'icinga2::server':
|
||||||
server_db_type => 'pgsql',
|
server_db_type => 'pgsql',
|
||||||
# default to false
|
# default to false
|
||||||
use_debmon => true,
|
use_debmon_repo => true,
|
||||||
db_host => 'localhost'
|
db_host => 'localhost'
|
||||||
db_port => '5432'
|
db_port => '5432'
|
||||||
db_name => 'icinga2_data'
|
db_name => 'icinga2_data'
|
||||||
|
@ -211,7 +220,7 @@ If you would like to install packages to make a `mail` command binary available
|
||||||
|
|
||||||
**Enabling and disabling Icinga 2 features**
|
**Enabling and disabling Icinga 2 features**
|
||||||
|
|
||||||
To manage the features that are enabled or disabled on an Icinga 2 server, you can specify them with the `server_enabled_features` and `server_enabled_features` parameters.
|
To manage the features that are enabled or disabled on an Icinga 2 server, you can specify them with the `server_enabled_features` and `server_disabled_features` parameters.
|
||||||
|
|
||||||
The parameters should be given as arrays of single-quoted strings.
|
The parameters should be given as arrays of single-quoted strings.
|
||||||
|
|
||||||
|
@ -296,6 +305,23 @@ icinga2::checkplugin { 'check_diskstats':
|
||||||
}
|
}
|
||||||
````
|
````
|
||||||
|
|
||||||
|
Example 3: Distribute check plugin in a manifest
|
||||||
|
```
|
||||||
|
icinga2::checkplugin { 'check_diskstats':
|
||||||
|
checkplugin_file_distribution_method => 'inline',
|
||||||
|
checkplugin_source_inline => 'command[check_disks]=/usr/lib64/nagios/plugins/check_disk -w 20 -c 10 -p /',
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Example 4: Distribute check plugin stored in Hiera(-yaml)
|
||||||
|
```
|
||||||
|
---
|
||||||
|
icinga2::checkplugin:
|
||||||
|
check_diskstats:
|
||||||
|
checkplugin_file_distribution_method: 'inline'
|
||||||
|
checkplugin_source_inline: 'command[check_disks]=/usr/lib64/nagios/plugins/check_disk -w 20 -c 10 -p /'
|
||||||
|
```
|
||||||
|
|
||||||
###[Object type usage](id:object_type_usage)
|
###[Object type usage](id:object_type_usage)
|
||||||
|
|
||||||
This module includes several defined types that can be used to automatically generate Icinga 2 format object definitions. They function in a similar way to [the built-in Nagios types that are included in Puppet](http://docs.puppetlabs.com/guides/exported_resources.html#exported-resources-with-nagios).
|
This module includes several defined types that can be used to automatically generate Icinga 2 format object definitions. They function in a similar way to [the built-in Nagios types that are included in Puppet](http://docs.puppetlabs.com/guides/exported_resources.html#exported-resources-with-nagios).
|
||||||
|
@ -392,21 +418,27 @@ icinga2::object::apply_dependency { 'usermail_dep_on_icinga2mail':
|
||||||
|
|
||||||
Object types:
|
Object types:
|
||||||
|
|
||||||
|
* [icinga2::object::apilistener](#icinga2objectapilistener)
|
||||||
* [icinga2::object::applyservicetohost](#icinga2objectapplyservicetohost)
|
* [icinga2::object::applyservicetohost](#icinga2objectapplyservicetohost)
|
||||||
* [icinga2::object::applynotificationtohost](#icinga2objectapplynotificationtohost)
|
* [icinga2::object::applynotificationtohost](#icinga2objectapplynotificationtohost)
|
||||||
* [icinga2::object::applynotificationtoservice](#icinga2objectapplynotificationtoservice)
|
* [icinga2::object::applynotificationtoservice](#icinga2objectapplynotificationtoservice)
|
||||||
* [icinga2::object::checkcommand](#icinga2objectcheckcommand)
|
* [icinga2::object::checkcommand](#icinga2objectcheckcommand)
|
||||||
* [icinga2::object::compatlogger](#icinga2objectcompatlogger)
|
* [icinga2::object::compatlogger](#icinga2objectcompatlogger)
|
||||||
|
* [icinga2::object::checkercomponent](#icinga2objectcheckercomponent)
|
||||||
* [icinga2::object::checkresultreader](#icinga2objectcheckresultreader)
|
* [icinga2::object::checkresultreader](#icinga2objectcheckresultreader)
|
||||||
|
* [icinga2::object::endpoint](#icinga2objectendpoint)
|
||||||
* [icinga2::object::eventcommand](#icinga2objecteventcommand)
|
* [icinga2::object::eventcommand](#icinga2objecteventcommand)
|
||||||
* [icinga2::object::externalcommandlistener](#icinga2objectexternalcommandlistener)
|
* [icinga2::object::externalcommandlistener](#icinga2objectexternalcommandlistener)
|
||||||
|
* [icinga2::object::filelogger](#icinga2objectfilelogger)
|
||||||
* [icinga2::object::host](#icinga2objecthost)
|
* [icinga2::object::host](#icinga2objecthost)
|
||||||
* [icinga2::object::hostgroup](#icinga2objecthostgroup)
|
* [icinga2::object::hostgroup](#icinga2objecthostgroup)
|
||||||
|
* [icinga2::object::icingastatuswriter](#icinga2objecticingastatuswriter)
|
||||||
* [icinga2::object::idomysqlconnection](#icinga2objectidomysqlconnection)
|
* [icinga2::object::idomysqlconnection](#icinga2objectidomysqlconnection)
|
||||||
* [icinga2::object::idopgsqlconnection](#icinga2objectidopgsqlconnection)
|
* [icinga2::object::idopgsqlconnection](#icinga2objectidopgsqlconnection)
|
||||||
* [icinga2::object::livestatuslistener](#icinga2objectlivestatuslistener)
|
* [icinga2::object::livestatuslistener](#icinga2objectlivestatuslistener)
|
||||||
* [icinga2::object::notification](#icinga2objectnotification)
|
* [icinga2::object::notification](#icinga2objectnotification)
|
||||||
* [icinga2::object::notificationcommand](#icinga2objectnotificationcommand)
|
* [icinga2::object::notificationcommand](#icinga2objectnotificationcommand)
|
||||||
|
* [icinga2::object::notificationcomponent](#icinga2objectnotificationcomponent)
|
||||||
* [icinga2::object::perfdatawriter](#icinga2objectperfdatawriter)
|
* [icinga2::object::perfdatawriter](#icinga2objectperfdatawriter)
|
||||||
* [icinga2::object::scheduleddowntime](#icinga2objectscheduleddowntime)
|
* [icinga2::object::scheduleddowntime](#icinga2objectscheduleddowntime)
|
||||||
* [icinga2::object::service](#icinga2objectservice)
|
* [icinga2::object::service](#icinga2objectservice)
|
||||||
|
@ -417,6 +449,22 @@ Object types:
|
||||||
* [icinga2::object::user](#icinga2objectuser)
|
* [icinga2::object::user](#icinga2objectuser)
|
||||||
* [icinga2::object::usergroup](#icinga2objectusergroup)
|
* [icinga2::object::usergroup](#icinga2objectusergroup)
|
||||||
|
|
||||||
|
####[`icinga2::object::apilistener`](id:icinga2objectapilistener)
|
||||||
|
|
||||||
|
The `apilistener` defined type can create `ApiLister` objects that set the bind address and port for Icinga 2's API listener, as well as the locations of the machine's Icinga 2 cert, key and Icinga 2 CA key:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
#Create an API listener object:
|
||||||
|
icinga2::object::apilistener { 'master-api':
|
||||||
|
bind_host => $ipaddress_eth1,
|
||||||
|
accept_commands => true,
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
The `accept_config` and `accept_commands` parameters default to **false**.
|
||||||
|
|
||||||
|
See the Icinga 2 documention for more info: [http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-apilistener](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-apilistener)
|
||||||
|
|
||||||
####[`icinga2::object::apply_service_to_host`](id:object_apply_service_to_host)
|
####[`icinga2::object::apply_service_to_host`](id:object_apply_service_to_host)
|
||||||
|
|
||||||
The `apply_service_to_host` defined type can create `apply` objects to apply services to hosts:
|
The `apply_service_to_host` defined type can create `apply` objects to apply services to hosts:
|
||||||
|
@ -553,6 +601,27 @@ icinga2::object::compatlogger { 'daily-log':
|
||||||
Both patameters as optionals. The parameter `rotation_method` can one of `HOURLY`, `DAILY`, `WEEKLY` or `MONTHY`.
|
Both patameters as optionals. The parameter `rotation_method` can one of `HOURLY`, `DAILY`, `WEEKLY` or `MONTHY`.
|
||||||
See [CompatLogger](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-compatlogger) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for a full list of parameters.
|
See [CompatLogger](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-compatlogger) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for a full list of parameters.
|
||||||
|
|
||||||
|
####[`icinga2::object::checkercomponent`](id:object_checkercomponent)
|
||||||
|
|
||||||
|
The `checkercomponent` defined type can create `checkercomponent` objects.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
icinga2::object::checkercomponent {'checker':}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
This object support the following parameters:
|
||||||
|
* `ensure` - Optional parameter used to remove or create the file, Default value is 'file'. Use 'absent' to remove the file.
|
||||||
|
* `object_name` - Optional. Used to define file name. default value is 'checker'
|
||||||
|
* `target_dir` - Optional. Define where the conf fil will be created. Default value is '/etc/icinga2/conf.d'
|
||||||
|
* `target_file_name` - Optional. Define the file name. Default value is '${object_name}.conf'.
|
||||||
|
* `target_file_owner` - Optional. File Owner. Default value is 'root'.
|
||||||
|
* `target_file_group` - Optional. File Group. Default value is 'root'.
|
||||||
|
* `target_file_mode` - Optional. File Mode. Default value is '0644'.
|
||||||
|
|
||||||
|
See [CheckerComponent](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-checkercomponent) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for more details about this object.
|
||||||
|
|
||||||
####[`icinga2::object::checkresultreader`](id:object_checkresultreader)
|
####[`icinga2::object::checkresultreader`](id:object_checkresultreader)
|
||||||
|
|
||||||
The `checkresultreader` defined type can create `checkresultreader` objects.
|
The `checkresultreader` defined type can create `checkresultreader` objects.
|
||||||
|
@ -567,6 +636,19 @@ icinga2::object::checkresultreader {'reader':
|
||||||
|
|
||||||
See [CheckResultReader](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-checkresultreader) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for a full list of parameters.
|
See [CheckResultReader](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-checkresultreader) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for a full list of parameters.
|
||||||
|
|
||||||
|
####[`icinga2::object::endpoint`](id:object_endpoint)
|
||||||
|
|
||||||
|
The `endpoint` defined type can create `endpoint` objects.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
icinga2::object::endpoint { 'icinga2b':
|
||||||
|
host => '192.168.5.46',
|
||||||
|
port => 5665
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
See [EndPoint](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-endpoint) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for a full list of parameters.
|
||||||
|
|
||||||
####`icinga2::object::eventcommand`
|
####`icinga2::object::eventcommand`
|
||||||
|
|
||||||
The `eventcommand` defined type can create `eventcommand` objects.
|
The `eventcommand` defined type can create `eventcommand` objects.
|
||||||
|
@ -593,6 +675,21 @@ icinga2::object::externalcommandlistener { 'external':
|
||||||
|
|
||||||
See [ExternalCommandListener](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-externalcommandlistener) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for a full list of parameters.
|
See [ExternalCommandListener](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-externalcommandlistener) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for a full list of parameters.
|
||||||
|
|
||||||
|
####[`icinga2::object::filelogger`](id:object_filelogger)
|
||||||
|
|
||||||
|
This defined type creates file logger objects.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
icinga2::object::filelogger { 'debug-file':
|
||||||
|
severity => 'debug',
|
||||||
|
path => '/var/log/icinga2/debug.log',
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
See [FileLogger](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-filelogger) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for a full list of parameters.
|
||||||
|
|
||||||
####[`icinga2::object::host`](id:object_host)
|
####[`icinga2::object::host`](id:object_host)
|
||||||
|
|
||||||
This defined type creates host objects.
|
This defined type creates host objects.
|
||||||
|
@ -635,6 +732,20 @@ If you would like to use an IPv6 address, make sure to set the `ipv6_address` pa
|
||||||
|
|
||||||
Coming soon...
|
Coming soon...
|
||||||
|
|
||||||
|
####[`icinga2::object::icingastatuswriter`](id:object_icingastatuswriter)
|
||||||
|
|
||||||
|
This defined type creates an **IcingaStatusWriter** objects.
|
||||||
|
|
||||||
|
Example usage:
|
||||||
|
<pre>
|
||||||
|
icinga2::object::icingastatuswriter { 'status':
|
||||||
|
status_path => '/cache/icinga2/status.json',
|
||||||
|
update_interval => '15s',
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
See [IcingaStatusWriter](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-icingastatuswriter) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for more details about the object.
|
||||||
|
|
||||||
####[`icinga2::object::idomysqlconnection`](id:object_idomysqlconnection)
|
####[`icinga2::object::idomysqlconnection`](id:object_idomysqlconnection)
|
||||||
|
|
||||||
This defined type creates an **IdoMySqlConnection** objects.
|
This defined type creates an **IdoMySqlConnection** objects.
|
||||||
|
@ -785,6 +896,30 @@ icinga2::object::notificationcommand { 'mail-service-notification':
|
||||||
|
|
||||||
This object use the same parameter defined to `checkcommand`.
|
This object use the same parameter defined to `checkcommand`.
|
||||||
|
|
||||||
|
####[`icinga2::object::notificationcomponent`](id:object_notificationcomponent)
|
||||||
|
|
||||||
|
The `notificationcomponent` defined type can create `notificationcomponent` objects.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
icinga2::object::notificationcomponent {'notification':}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
This object support the following parameters:
|
||||||
|
* `ensure` - Optional parameter used to remove or create the file, Default value is 'file'. Use 'absent' to remove the file.
|
||||||
|
* `object_name` - Optional. Used to define file name. default value is 'checker'
|
||||||
|
* `enable_ha` - Optional. Enable the high availability functionality. Only valid in a cluster setup. Default value is true.
|
||||||
|
* `target_dir` - Optional. Define where the conf fil will be created. Default value is '/etc/icinga2/features-available'
|
||||||
|
* `target_file_name` - Optional. Define the file name. Default value is '${object_name}.conf'.
|
||||||
|
* `target_file_owner` - Optional. File Owner. Default value is 'root'.
|
||||||
|
* `target_file_group` - Optional. File Group. Default value is 'root'.
|
||||||
|
* `target_file_mode` - Optional. File Mode. Default value is '0644'.
|
||||||
|
|
||||||
|
See [NotificationComponent](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-notificationcomponent) on [docs.icinga.org](http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc) for more details about this object.
|
||||||
|
|
||||||
|
Should be enable/disable using `icinga2::server::features::enable` or `icinga2::server::features::disable`.
|
||||||
|
|
||||||
####[`icinga2::object::perfdatawriter`](id:object_perfdatawriter)
|
####[`icinga2::object::perfdatawriter`](id:object_perfdatawriter)
|
||||||
|
|
||||||
This defined type creates a **PerfdataWriter** object
|
This defined type creates a **PerfdataWriter** object
|
||||||
|
|
13
Rakefile
Normal file
13
Rakefile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
require 'puppet-lint/tasks/puppet-lint'
|
||||||
|
|
||||||
|
task :unit_tests => [:lint]
|
||||||
|
|
||||||
|
PuppetLint.configuration.fail_on_warnings
|
||||||
|
PuppetLint.configuration.send('relative')
|
||||||
|
PuppetLint.configuration.send('disable_80chars')
|
||||||
|
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
|
||||||
|
PuppetLint.configuration.send('disable_documentation')
|
||||||
|
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
|
||||||
|
PuppetLint.configuration.send('disable_variable_scope')
|
||||||
|
PuppetLint.configuration.send('disable_autoloader_layout')
|
||||||
|
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
|
|
@ -13,6 +13,7 @@ define icinga2::checkplugin (
|
||||||
$checkplugin_template_module = 'icinga2',
|
$checkplugin_template_module = 'icinga2',
|
||||||
$checkplugin_template = undef,
|
$checkplugin_template = undef,
|
||||||
$checkplugin_source_file = undef,
|
$checkplugin_source_file = undef,
|
||||||
|
$checkplugin_source_inline = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
#Do some validation of the class' parameters:
|
#Do some validation of the class' parameters:
|
||||||
|
@ -29,7 +30,6 @@ define icinga2::checkplugin (
|
||||||
group => $checkplugin_target_file_group,
|
group => $checkplugin_target_file_group,
|
||||||
mode => $checkplugin_target_file_mode,
|
mode => $checkplugin_target_file_mode,
|
||||||
content => template("${checkplugin_template_module}/${checkplugin_template}"),
|
content => template("${checkplugin_template_module}/${checkplugin_template}"),
|
||||||
require => Package[$icinga2::params::icinga2_client_packages],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif $checkplugin_file_distribution_method == 'source' {
|
elsif $checkplugin_file_distribution_method == 'source' {
|
||||||
|
@ -38,7 +38,14 @@ define icinga2::checkplugin (
|
||||||
group => $checkplugin_target_file_group,
|
group => $checkplugin_target_file_group,
|
||||||
mode => $checkplugin_target_file_mode,
|
mode => $checkplugin_target_file_mode,
|
||||||
source => $checkplugin_source_file,
|
source => $checkplugin_source_file,
|
||||||
require => Package[$icinga2::params::icinga2_client_packages],
|
}
|
||||||
|
}
|
||||||
|
elsif $checkplugin_file_distribution_method == 'inline' {
|
||||||
|
file { "${checkplugin_libdir}/${checkplugin_name}":
|
||||||
|
owner => $checkplugin_target_file_owner,
|
||||||
|
group => $checkplugin_target_file_group,
|
||||||
|
mode => $checkplugin_target_file_mode,
|
||||||
|
content => $checkplugin_source_inline,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
# == Class: icinga2
|
|
||||||
#
|
|
||||||
# This module installs the Icinga 2 monitoring system.
|
|
||||||
#
|
|
||||||
# === Parameters
|
|
||||||
#
|
|
||||||
# Coming soon...
|
|
||||||
#
|
|
||||||
# === Examples
|
|
||||||
#
|
|
||||||
# Coming soon...
|
|
||||||
#
|
|
||||||
|
|
||||||
#Our base class.
|
|
||||||
|
|
||||||
class icinga2 {
|
|
||||||
|
|
||||||
}
|
|
|
@ -34,7 +34,7 @@ class icinga2::nrpe::install::packages inherits icinga2::nrpe {
|
||||||
package {$icinga2::params::icinga2_client_packages:
|
package {$icinga2::params::icinga2_client_packages:
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
provider => $icinga2::params::package_provider,
|
provider => $icinga2::params::package_provider,
|
||||||
install_options => $client_plugin_package_install_options,
|
install_options => $icinga2::params::client_plugin_package_install_options,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# == Class: icinga2::params
|
|
||||||
#
|
|
||||||
# This class is intentionally empty. It just serves as a container class for other
|
|
||||||
# icinga2::object:: classes to make the module's file layout cleaner (all object defined types
|
|
||||||
# can be put into an objects/ subdirectory)
|
|
||||||
#
|
|
||||||
# === Parameters
|
|
||||||
#
|
|
||||||
# None. See inline comments for parameters on the individual object type manifests for
|
|
||||||
# more details.
|
|
||||||
#
|
|
||||||
|
|
||||||
class icinga2::objects { }
|
|
74
manifests/object/apilistener.pp
Normal file
74
manifests/object/apilistener.pp
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
# == Defined type: icinga2::object::apilistener
|
||||||
|
#
|
||||||
|
# This is a defined type for Icinga 2 apply objects that create apilistener objects.
|
||||||
|
# See the following Icinga 2 doc page for more info:
|
||||||
|
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-apilistener
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# See the inline comments.
|
||||||
|
#
|
||||||
|
|
||||||
|
define icinga2::object::apilistener (
|
||||||
|
$ensure = 'file',
|
||||||
|
$object_name = $name,
|
||||||
|
$cert_path = 'SysconfDir + "/icinga2/pki/" + NodeName + ".crt"',
|
||||||
|
$key_path = 'SysconfDir + "/icinga2/pki/" + NodeName + ".key"',
|
||||||
|
$ca_path = 'SysconfDir + "/icinga2/pki/ca.crt"',
|
||||||
|
$crl_path = undef,
|
||||||
|
$bind_host = '0.0.0.0',
|
||||||
|
$bind_port = 5665,
|
||||||
|
$accept_config = false,
|
||||||
|
$accept_commands = false,
|
||||||
|
$target_dir = '/etc/icinga2/objects/apilisteners',
|
||||||
|
$target_file_name = "${name}.conf",
|
||||||
|
$target_file_ensure = file,
|
||||||
|
$target_file_owner = 'root',
|
||||||
|
$target_file_group = 'root',
|
||||||
|
$target_file_mode = '0644',
|
||||||
|
$refresh_icinga2_service = true,
|
||||||
|
) {
|
||||||
|
|
||||||
|
validate_string($cert_path)
|
||||||
|
validate_string($key_path)
|
||||||
|
validate_string($ca_path)
|
||||||
|
if $crl_path { validate_string($crl_path) }
|
||||||
|
if $bind_host { validate_string($bind_host) }
|
||||||
|
if $bind_port { validate_re($bind_port, '^\d{1,5}$') }
|
||||||
|
if $accept_config { validate_bool($accept_config) }
|
||||||
|
if $accept_commands { validate_bool($accept_commands) }
|
||||||
|
validate_string($target_dir)
|
||||||
|
validate_string($target_file_name)
|
||||||
|
validate_string($target_file_owner)
|
||||||
|
validate_string($target_file_group)
|
||||||
|
validate_re($target_file_mode, '^\d{4}$')
|
||||||
|
validate_bool($refresh_icinga2_service)
|
||||||
|
|
||||||
|
#If the refresh_icinga2_service parameter is set to true...
|
||||||
|
if $refresh_icinga2_service == true {
|
||||||
|
|
||||||
|
file { "${target_dir}/${target_file_name}":
|
||||||
|
ensure => $target_file_ensure,
|
||||||
|
owner => $target_file_owner,
|
||||||
|
group => $target_file_group,
|
||||||
|
mode => $target_file_mode,
|
||||||
|
content => template('icinga2/object_apilistener.conf.erb'),
|
||||||
|
#...notify the Icinga 2 daemon so it can restart and pick up changes made to this config file...
|
||||||
|
notify => Service['icinga2'],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#...otherwise, use the same file resource but without a notify => parameter:
|
||||||
|
else {
|
||||||
|
|
||||||
|
file { "${target_dir}/${target_file_name}":
|
||||||
|
ensure => $target_file_ensure,
|
||||||
|
owner => $target_file_owner,
|
||||||
|
group => $target_file_group,
|
||||||
|
mode => $target_file_mode,
|
||||||
|
content => template('icinga2/object_apilistener.conf.erb'),
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -42,7 +42,7 @@ define icinga2::object::apply_notification_to_host (
|
||||||
validate_array($user_groups)
|
validate_array($user_groups)
|
||||||
validate_hash($times)
|
validate_hash($times)
|
||||||
if $interval {
|
if $interval {
|
||||||
validate_re($interval, '^\d$')
|
validate_string($interval)
|
||||||
}
|
}
|
||||||
if $period {
|
if $period {
|
||||||
validate_string($period)
|
validate_string($period)
|
||||||
|
|
|
@ -44,7 +44,7 @@ define icinga2::object::apply_notification_to_service (
|
||||||
validate_array($user_groups)
|
validate_array($user_groups)
|
||||||
validate_hash($times)
|
validate_hash($times)
|
||||||
if $interval {
|
if $interval {
|
||||||
validate_re($interval, '^\d$')
|
validate_string($interval)
|
||||||
}
|
}
|
||||||
if $period {
|
if $period {
|
||||||
validate_string($period)
|
validate_string($period)
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
define icinga2::object::checkcommand (
|
define icinga2::object::checkcommand (
|
||||||
$object_checkcommandname = $name,
|
$object_checkcommandname = $name,
|
||||||
$template_to_import = 'plugin-check-command',
|
$template_to_import = 'plugin-check-command',
|
||||||
/* $methods = undef, */ /* Need to get more details about this attribute */
|
#$methods = undef, Need to get more details about this attribute
|
||||||
$command = undef,
|
$command = undef,
|
||||||
$cmd_path = 'PluginDir',
|
$cmd_path = 'PluginDir',
|
||||||
$arguments = {},
|
$arguments = {},
|
||||||
|
|
36
manifests/object/checkercomponent.pp
Normal file
36
manifests/object/checkercomponent.pp
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# == Defined type: icinga2::object::checkercomponent
|
||||||
|
#
|
||||||
|
# This is a defined type for Icinga 2 apply objects that create Checker Component
|
||||||
|
# See the following Icinga 2 doc page for more info:
|
||||||
|
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-checkercomponent
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# See the inline comments.
|
||||||
|
#
|
||||||
|
|
||||||
|
define icinga2::object::checkercomponent (
|
||||||
|
$ensure = 'file',
|
||||||
|
$object_name = $name,
|
||||||
|
$target_dir = '/etc/icinga2/features-available',
|
||||||
|
$target_file_name = "${name}.conf",
|
||||||
|
$target_file_owner = 'root',
|
||||||
|
$target_file_group = 'root',
|
||||||
|
$target_file_mode = '0644'
|
||||||
|
) {
|
||||||
|
|
||||||
|
validate_string($target_dir)
|
||||||
|
validate_string($target_file_name)
|
||||||
|
validate_string($target_file_owner)
|
||||||
|
validate_string($target_file_group)
|
||||||
|
validate_re($target_file_mode, '^\d{4}$')
|
||||||
|
|
||||||
|
file {"${target_dir}/${target_file_name}":
|
||||||
|
ensure => $ensure,
|
||||||
|
owner => $target_file_owner,
|
||||||
|
group => $target_file_group,
|
||||||
|
mode => $target_file_mode,
|
||||||
|
content => template('icinga2/object_checkercomponent.conf.erb'),
|
||||||
|
# notify => Service['icinga2'], # Dont need to reload/restart the service only enable/disable the feature. Should we force enable/disable the feature (icinga2 feature enable checker) or should the user define it?
|
||||||
|
}
|
||||||
|
}
|
46
manifests/object/endpoint.pp
Normal file
46
manifests/object/endpoint.pp
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
# == Defined type: icinga2::object::endpoint
|
||||||
|
#
|
||||||
|
# This is a defined type for Icinga 2 apply objects that create EndPoint
|
||||||
|
# See the following Icinga 2 doc page for more info:
|
||||||
|
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-endpoint
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# See the inline comments.
|
||||||
|
#
|
||||||
|
|
||||||
|
define icinga2::object::endpoint (
|
||||||
|
$ensure = 'file',
|
||||||
|
$object_name = $name,
|
||||||
|
$host = undef,
|
||||||
|
$port = undef,
|
||||||
|
$log_duration = undef,
|
||||||
|
$target_dir = '/etc/icinga2/objects/endpoints',
|
||||||
|
$target_file_name = "${name}.conf",
|
||||||
|
$target_file_owner = 'root',
|
||||||
|
$target_file_group = 'root',
|
||||||
|
$target_file_mode = '0644'
|
||||||
|
) {
|
||||||
|
|
||||||
|
validate_string($host)
|
||||||
|
if $port {
|
||||||
|
validate_re($port, '^\d{1,5}$')
|
||||||
|
}
|
||||||
|
if $log_duration {
|
||||||
|
validate_string($log_duration)
|
||||||
|
}
|
||||||
|
validate_string($target_dir)
|
||||||
|
validate_string($target_file_name)
|
||||||
|
validate_string($target_file_owner)
|
||||||
|
validate_string($target_file_group)
|
||||||
|
validate_re($target_file_mode, '^\d{4}$')
|
||||||
|
|
||||||
|
file {"${target_dir}/${target_file_name}":
|
||||||
|
ensure => $ensure,
|
||||||
|
owner => $target_file_owner,
|
||||||
|
group => $target_file_group,
|
||||||
|
mode => $target_file_mode,
|
||||||
|
content => template('icinga2/object_endpoint.conf.erb'),
|
||||||
|
notify => Service['icinga2'],
|
||||||
|
}
|
||||||
|
}
|
|
@ -12,7 +12,7 @@
|
||||||
define icinga2::object::eventcommand (
|
define icinga2::object::eventcommand (
|
||||||
$object_eventcommandname = $name,
|
$object_eventcommandname = $name,
|
||||||
$template_to_import = 'plugin-event-command',
|
$template_to_import = 'plugin-event-command',
|
||||||
/* $methods = undef, */ /* Need to get more details about this attribute */
|
#$methods = undef Need to get more details about this attribute
|
||||||
$command = undef,
|
$command = undef,
|
||||||
$cmd_path = 'PluginDir',
|
$cmd_path = 'PluginDir',
|
||||||
$arguments = {},
|
$arguments = {},
|
||||||
|
|
45
manifests/object/filelogger.pp
Normal file
45
manifests/object/filelogger.pp
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# == Defined type: icinga2::object::filelogger
|
||||||
|
#
|
||||||
|
# This is a defined type for Icinga 2 apply objects that create File Logger
|
||||||
|
# See the following Icinga 2 doc page for more info:
|
||||||
|
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-filelogger
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# See the inline comments.
|
||||||
|
#
|
||||||
|
|
||||||
|
define icinga2::object::filelogger (
|
||||||
|
$ensure = 'file',
|
||||||
|
$object_name = $name,
|
||||||
|
$path = undef,
|
||||||
|
$severity = undef,
|
||||||
|
$target_dir = '/etc/icinga2/conf.d',
|
||||||
|
$target_file_name = "${name}.conf",
|
||||||
|
$target_file_owner = 'root',
|
||||||
|
$target_file_group = 'root',
|
||||||
|
$target_file_mode = '0644'
|
||||||
|
) {
|
||||||
|
|
||||||
|
if $object_name {
|
||||||
|
validate_string($object_name)
|
||||||
|
}
|
||||||
|
validate_string($path)
|
||||||
|
if $severity {
|
||||||
|
validate_string($severity)
|
||||||
|
}
|
||||||
|
validate_string($target_dir)
|
||||||
|
validate_string($target_file_name)
|
||||||
|
validate_string($target_file_owner)
|
||||||
|
validate_string($target_file_group)
|
||||||
|
validate_re($target_file_mode, '^\d{4}$')
|
||||||
|
|
||||||
|
file {"${target_dir}/${target_file_name}":
|
||||||
|
ensure => $ensure,
|
||||||
|
owner => $target_file_owner,
|
||||||
|
group => $target_file_group,
|
||||||
|
mode => $target_file_mode,
|
||||||
|
content => template('icinga2/object_filelogger.conf.erb'),
|
||||||
|
notify => Service['icinga2']
|
||||||
|
}
|
||||||
|
}
|
|
@ -12,7 +12,7 @@
|
||||||
define icinga2::object::host (
|
define icinga2::object::host (
|
||||||
$object_hostname = $name,
|
$object_hostname = $name,
|
||||||
$display_name = $fqdn,
|
$display_name = $fqdn,
|
||||||
$ipv4_address = $ipaddress_eth0,
|
$ipv4_address = $ipaddress,
|
||||||
$ipv6_address = undef,
|
$ipv6_address = undef,
|
||||||
$template_to_import = 'generic-host',
|
$template_to_import = 'generic-host',
|
||||||
$groups = [],
|
$groups = [],
|
||||||
|
|
44
manifests/object/icingastatuswriter.pp
Normal file
44
manifests/object/icingastatuswriter.pp
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
# == Defined type: icinga2::object::icingastatuswriter
|
||||||
|
#
|
||||||
|
# This is a defined type for Icinga 2 apply objects that create IcingaStatusWriter
|
||||||
|
# See the following Icinga 2 doc page for more info:
|
||||||
|
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-checkercomponent
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# See the inline comments.
|
||||||
|
#
|
||||||
|
|
||||||
|
define icinga2::object::icingastatuswriter (
|
||||||
|
$ensure = 'file',
|
||||||
|
$object_name = $name,
|
||||||
|
$status_path = undef,
|
||||||
|
$update_interval = undef,
|
||||||
|
$target_dir = '/etc/icinga2/objects/icingastatuswriters',
|
||||||
|
$target_file_name = "${name}.conf",
|
||||||
|
$target_file_owner = 'root',
|
||||||
|
$target_file_group = 'root',
|
||||||
|
$target_file_mode = '0644'
|
||||||
|
) {
|
||||||
|
|
||||||
|
if $status_path {
|
||||||
|
validate_string($status_path)
|
||||||
|
}
|
||||||
|
if $update_interval {
|
||||||
|
validate_string($update_interval)
|
||||||
|
}
|
||||||
|
validate_string($target_dir)
|
||||||
|
validate_string($target_file_name)
|
||||||
|
validate_string($target_file_owner)
|
||||||
|
validate_string($target_file_group)
|
||||||
|
validate_re($target_file_mode, '^\d{4}$')
|
||||||
|
|
||||||
|
file {"${target_dir}/${target_file_name}":
|
||||||
|
ensure => $ensure,
|
||||||
|
owner => $target_file_owner,
|
||||||
|
group => $target_file_group,
|
||||||
|
mode => $target_file_mode,
|
||||||
|
content => template('icinga2/object_icingastatuswriter.conf.erb'),
|
||||||
|
notify => Service['icinga2'],
|
||||||
|
}
|
||||||
|
}
|
|
@ -51,17 +51,15 @@ define icinga2::object::notification (
|
||||||
validate_string($period)
|
validate_string($period)
|
||||||
}
|
}
|
||||||
validate_array($types)
|
validate_array($types)
|
||||||
/** Array concatenation not available,
|
#Array concatenation not available,
|
||||||
if $types - ['DowntimeStart','DowntimeEnd','DowntimeRemoved','Custom','Acknowledgement','Problem','Recovery','FlappingStart','FlappingEnd'] != [] {
|
#if $types - ['DowntimeStart','DowntimeEnd','DowntimeRemoved','Custom','Acknowledgement','Problem','Recovery','FlappingStart','FlappingEnd'] != [] {
|
||||||
fail ('You are using unavailable notification type filter.')
|
# fail ('You are using unavailable notification type filter.')
|
||||||
}
|
#}
|
||||||
*/
|
|
||||||
validate_array($states)
|
validate_array($states)
|
||||||
/** Array concatenation not available,
|
#Array concatenation not available,
|
||||||
if $states - ['OK','Warning','Critical','Unknown','Up','Down'] != [] {
|
#if $states - ['OK','Warning','Critical','Unknown','Up','Down'] != [] {
|
||||||
fail ('You are using unavailable state type filter.')
|
# fail ('You are using unavailable state type filter.')
|
||||||
}
|
#}
|
||||||
*/
|
|
||||||
validate_string($target_dir)
|
validate_string($target_dir)
|
||||||
validate_string($target_file_name)
|
validate_string($target_file_name)
|
||||||
validate_string($target_file_owner)
|
validate_string($target_file_owner)
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
define icinga2::object::notificationcommand (
|
define icinga2::object::notificationcommand (
|
||||||
$object_notificationcommandname = $name,
|
$object_notificationcommandname = $name,
|
||||||
$template_to_import = 'plugin-notification-command',
|
$template_to_import = 'plugin-notification-command',
|
||||||
/* $methods = undef, */ /* Need to get more details about this attribute */
|
#$methods = undef, Need to get more details about this attribute
|
||||||
$command = undef,
|
$command = undef,
|
||||||
$cmd_path = 'PluginDir',
|
$cmd_path = 'PluginDir',
|
||||||
$arguments = {},
|
$arguments = {},
|
||||||
|
|
40
manifests/object/notificationcomponent.pp
Normal file
40
manifests/object/notificationcomponent.pp
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# == Defined type: icinga2::object::notificationcomponent
|
||||||
|
#
|
||||||
|
# This is a defined type for Icinga 2 apply objects that create Notification Component
|
||||||
|
# See the following Icinga 2 doc page for more info:
|
||||||
|
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#objecttype-notificationcomponent
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# See the inline comments.
|
||||||
|
#
|
||||||
|
|
||||||
|
define icinga2::object::notificationcomponent (
|
||||||
|
$ensure = 'file',
|
||||||
|
$object_name = $name,
|
||||||
|
$enable_ha = undef,
|
||||||
|
$target_dir = '/etc/icinga2/features-available',
|
||||||
|
$target_file_name = "${name}.conf",
|
||||||
|
$target_file_owner = 'root',
|
||||||
|
$target_file_group = 'root',
|
||||||
|
$target_file_mode = '0644'
|
||||||
|
) {
|
||||||
|
|
||||||
|
if $enable_ha {
|
||||||
|
validate_bool($enable_ha)
|
||||||
|
}
|
||||||
|
validate_string($target_dir)
|
||||||
|
validate_string($target_file_name)
|
||||||
|
validate_string($target_file_owner)
|
||||||
|
validate_string($target_file_group)
|
||||||
|
validate_re($target_file_mode, '^\d{4}$')
|
||||||
|
|
||||||
|
file {"${target_dir}/${target_file_name}":
|
||||||
|
ensure => $ensure,
|
||||||
|
owner => $target_file_owner,
|
||||||
|
group => $target_file_group,
|
||||||
|
mode => $target_file_mode,
|
||||||
|
content => template('icinga2/object_notificationcomponent.conf.erb'),
|
||||||
|
# notify => Service['icinga2'], # Dont need to reload/restart the service only enable/disable the feature. Should we force enable/disable the feature (icinga2 feature enable notification) or should the user define it?
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,7 +16,7 @@ define icinga2::object::servicegroup (
|
||||||
$groups = [],
|
$groups = [],
|
||||||
$target_dir = '/etc/icinga2/objects',
|
$target_dir = '/etc/icinga2/objects',
|
||||||
$target_file_name = "${name}.conf",
|
$target_file_name = "${name}.conf",
|
||||||
$target_file_ensure = file,
|
$target_file_ensure = file,
|
||||||
$target_file_owner = 'root',
|
$target_file_owner = 'root',
|
||||||
$target_file_group = 'root',
|
$target_file_group = 'root',
|
||||||
$target_file_mode = '0644',
|
$target_file_mode = '0644',
|
||||||
|
|
|
@ -22,7 +22,7 @@ define icinga2::object::user (
|
||||||
$states = [],
|
$states = [],
|
||||||
$target_dir = '/etc/icinga2/objects',
|
$target_dir = '/etc/icinga2/objects',
|
||||||
$target_file_name = "${name}.conf",
|
$target_file_name = "${name}.conf",
|
||||||
$target_file_ensure = file,
|
$target_file_ensure = file,
|
||||||
$target_file_owner = 'root',
|
$target_file_owner = 'root',
|
||||||
$target_file_group = 'root',
|
$target_file_group = 'root',
|
||||||
$target_file_mode = '0644',
|
$target_file_mode = '0644',
|
||||||
|
|
|
@ -18,14 +18,20 @@ class icinga2::params {
|
||||||
##################
|
##################
|
||||||
# Icinga 2 common package parameters
|
# Icinga 2 common package parameters
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS or RedHat systems:
|
||||||
'CentOS': {
|
'CentOS', 'RedHat': {
|
||||||
|
#Pick the right package provider:
|
||||||
|
$package_provider = 'yum'
|
||||||
|
}
|
||||||
|
|
||||||
|
#RedHat systems:
|
||||||
|
'RedHat': {
|
||||||
#Pick the right package provider:
|
#Pick the right package provider:
|
||||||
$package_provider = 'yum'
|
$package_provider = 'yum'
|
||||||
}
|
}
|
||||||
|
|
||||||
#Ubuntu systems:
|
#Ubuntu systems:
|
||||||
'Ubuntu': {
|
'Ubuntu': {
|
||||||
#Pick the right package provider:
|
#Pick the right package provider:
|
||||||
$package_provider = 'apt'
|
$package_provider = 'apt'
|
||||||
}
|
}
|
||||||
|
@ -70,7 +76,7 @@ class icinga2::params {
|
||||||
#Pick the right package parameters based on the OS:
|
#Pick the right package parameters based on the OS:
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS systems:
|
||||||
'CentOS': {
|
'CentOS', 'RedHat': {
|
||||||
case $::operatingsystemmajrelease {
|
case $::operatingsystemmajrelease {
|
||||||
'5': {
|
'5': {
|
||||||
#Icinga 2 server package
|
#Icinga 2 server package
|
||||||
|
@ -95,9 +101,9 @@ class icinga2::params {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Ubuntu systems:
|
#Ubuntu systems:
|
||||||
'Ubuntu': {
|
'Ubuntu': {
|
||||||
case $::operatingsystemrelease {
|
case $::operatingsystemrelease {
|
||||||
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
|
#Ubuntu 12.04 doesn't have nagios-plugins-common or nagios-plugins-contrib packages available...
|
||||||
'12.04': {
|
'12.04': {
|
||||||
$icinga2_server_package = 'icinga2'
|
$icinga2_server_package = 'icinga2'
|
||||||
|
@ -143,8 +149,8 @@ class icinga2::params {
|
||||||
# Icinga 2 server config parameters
|
# Icinga 2 server config parameters
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS or RedHat systems:
|
||||||
'CentOS': {
|
'CentOS', 'RedHat': {
|
||||||
#Settings for /etc/icinga2/:
|
#Settings for /etc/icinga2/:
|
||||||
$etc_icinga2_owner = 'icinga'
|
$etc_icinga2_owner = 'icinga'
|
||||||
$etc_icinga2_group = 'icinga'
|
$etc_icinga2_group = 'icinga'
|
||||||
|
@ -244,7 +250,7 @@ class icinga2::params {
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#Icinga 2 server daemon names for Red Had/CentOS systems:
|
#Icinga 2 server daemon names for Red Had/CentOS systems:
|
||||||
'CentOS': {
|
'CentOS', 'RedHat': {
|
||||||
case $::operatingsystemmajrelease {
|
case $::operatingsystemmajrelease {
|
||||||
'5': {
|
'5': {
|
||||||
$icinga2_server_service_name = 'icinga2'
|
$icinga2_server_service_name = 'icinga2'
|
||||||
|
@ -314,7 +320,7 @@ class icinga2::params {
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#File and template variable names for Red Had/CentOS systems:
|
#File and template variable names for Red Had/CentOS systems:
|
||||||
'CentOS': {
|
'CentOS', 'RedHat': {
|
||||||
$nrpe_config_basedir = '/etc/nagios'
|
$nrpe_config_basedir = '/etc/nagios'
|
||||||
$nrpe_plugin_libdir = '/usr/lib64/nagios/plugins'
|
$nrpe_plugin_libdir = '/usr/lib64/nagios/plugins'
|
||||||
$checkplugin_libdir = '/usr/lib64/nagios/plugins'
|
$checkplugin_libdir = '/usr/lib64/nagios/plugins'
|
||||||
|
@ -322,6 +328,7 @@ class icinga2::params {
|
||||||
$nrpe_user = 'nrpe'
|
$nrpe_user = 'nrpe'
|
||||||
$nrpe_group = 'nrpe'
|
$nrpe_group = 'nrpe'
|
||||||
}
|
}
|
||||||
|
|
||||||
#File and template variable names for Ubuntu systems:
|
#File and template variable names for Ubuntu systems:
|
||||||
'Ubuntu': {
|
'Ubuntu': {
|
||||||
$nrpe_config_basedir = '/etc/nagios'
|
$nrpe_config_basedir = '/etc/nagios'
|
||||||
|
@ -331,6 +338,7 @@ class icinga2::params {
|
||||||
$nrpe_user = 'nagios'
|
$nrpe_user = 'nagios'
|
||||||
$nrpe_group = 'nagios'
|
$nrpe_group = 'nagios'
|
||||||
}
|
}
|
||||||
|
|
||||||
#File and template variable names for Ubuntu systems:
|
#File and template variable names for Ubuntu systems:
|
||||||
'Debian': {
|
'Debian': {
|
||||||
$nrpe_config_basedir = '/etc/nagios'
|
$nrpe_config_basedir = '/etc/nagios'
|
||||||
|
@ -340,15 +348,16 @@ class icinga2::params {
|
||||||
$nrpe_user = 'nagios'
|
$nrpe_user = 'nagios'
|
||||||
$nrpe_group = 'nagios'
|
$nrpe_group = 'nagios'
|
||||||
}
|
}
|
||||||
#Fail if we're on any other OS:
|
|
||||||
|
#Fail if we're on any other OS:
|
||||||
default: { fail("${::operatingsystem} is not supported!") }
|
default: { fail("${::operatingsystem} is not supported!") }
|
||||||
}
|
}
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Icinga 2 client package parameters
|
# Icinga 2 client package parameters
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS or RedHat systems:
|
||||||
'CentOS': {
|
'CentOS', 'RedHat': {
|
||||||
case $::operatingsystemmajrelease {
|
case $::operatingsystemmajrelease {
|
||||||
'5': {
|
'5': {
|
||||||
#Pick the right list of client packages:
|
#Pick the right list of client packages:
|
||||||
|
@ -409,7 +418,7 @@ class icinga2::params {
|
||||||
# Icinga 2 client service parameters
|
# Icinga 2 client service parameters
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#Daemon names for Red Had/CentOS systems:
|
#Daemon names for Red Had/CentOS systems:
|
||||||
'CentOS': {
|
'CentOS', 'RedHat': {
|
||||||
$nrpe_daemon_name = 'nrpe'
|
$nrpe_daemon_name = 'nrpe'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ class icinga2::server (
|
||||||
|
|
||||||
#Pick set the right path where we can find the DB schema based on the OS...
|
#Pick set the right path where we can find the DB schema based on the OS...
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
'CentOS': {
|
'CentOS','RedHat': {
|
||||||
#...and database that the user picks
|
#...and database that the user picks
|
||||||
case $server_db_type {
|
case $server_db_type {
|
||||||
'mysql': { $server_db_schema_path = '/usr/share/icinga2-ido-mysql/schema/mysql.sql' }
|
'mysql': { $server_db_schema_path = '/usr/share/icinga2-ido-mysql/schema/mysql.sql' }
|
||||||
|
|
|
@ -29,18 +29,18 @@ class icinga2::server::config inherits icinga2::server {
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/:
|
#Directory resource for /etc/icinga2/:
|
||||||
file { '/etc/icinga2/':
|
file { '/etc/icinga2/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/',
|
path => '/etc/icinga2/',
|
||||||
owner => $etc_icinga2_owner,
|
owner => $etc_icinga2_owner,
|
||||||
group => $etc_icinga2_group,
|
group => $etc_icinga2_group,
|
||||||
mode => $etc_icinga2_mode,
|
mode => $etc_icinga2_mode,
|
||||||
#require => Package[$icinga2::params::icinga2_server_packages],
|
#require => Package[$icinga2::params::icinga2_server_packages],
|
||||||
}
|
}
|
||||||
|
|
||||||
#File resource for /etc/icinga2/icinga2.conf:
|
#File resource for /etc/icinga2/icinga2.conf:
|
||||||
file { '/etc/icinga2/icinga2.conf':
|
file { '/etc/icinga2/icinga2.conf':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
path => '/etc/icinga2/icinga2.conf',
|
path => '/etc/icinga2/icinga2.conf',
|
||||||
owner => $etc_icinga2_icinga2_conf_owner,
|
owner => $etc_icinga2_icinga2_conf_owner,
|
||||||
group => $etc_icinga2_icinga2_conf_group,
|
group => $etc_icinga2_icinga2_conf_group,
|
||||||
mode => $etc_icinga2_icinga2_conf_mode,
|
mode => $etc_icinga2_icinga2_conf_mode,
|
||||||
|
@ -49,56 +49,56 @@ class icinga2::server::config inherits icinga2::server {
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/conf.d/:
|
#Directory resource for /etc/icinga2/conf.d/:
|
||||||
file { '/etc/icinga2/conf.d/':
|
file { '/etc/icinga2/conf.d/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/conf.d/',
|
path => '/etc/icinga2/conf.d/',
|
||||||
owner => $etc_icinga2_confd_owner,
|
owner => $etc_icinga2_confd_owner,
|
||||||
group => $etc_icinga2_confd_group,
|
group => $etc_icinga2_confd_group,
|
||||||
mode => $etc_icinga2_confd_mode,
|
mode => $etc_icinga2_confd_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/features-available/:
|
#Directory resource for /etc/icinga2/features-available/:
|
||||||
file { '/etc/icinga2/features-available/':
|
file { '/etc/icinga2/features-available/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/features-available/',
|
path => '/etc/icinga2/features-available/',
|
||||||
owner => $etc_icinga2_features_available_owner,
|
owner => $etc_icinga2_features_available_owner,
|
||||||
group => $etc_icinga2_features_available_group,
|
group => $etc_icinga2_features_available_group,
|
||||||
mode => $etc_icinga2_features_available_mode,
|
mode => $etc_icinga2_features_available_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/features-enabled/:
|
#Directory resource for /etc/icinga2/features-enabled/:
|
||||||
file { '/etc/icinga2/features-enabled/':
|
file { '/etc/icinga2/features-enabled/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/features-enabled/',
|
path => '/etc/icinga2/features-enabled/',
|
||||||
owner => $etc_icinga2_features_enabled_owner,
|
owner => $etc_icinga2_features_enabled_owner,
|
||||||
group => $etc_icinga2_features_enabled_group,
|
group => $etc_icinga2_features_enabled_group,
|
||||||
mode => $etc_icinga2_features_enabled_mode,
|
mode => $etc_icinga2_features_enabled_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/pki/:
|
#Directory resource for /etc/icinga2/pki/:
|
||||||
file { '/etc/icinga2/pki/':
|
file { '/etc/icinga2/pki/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/pki/',
|
path => '/etc/icinga2/pki/',
|
||||||
owner => $etc_icinga2_pki_owner,
|
owner => $etc_icinga2_pki_owner,
|
||||||
group => $etc_icinga2_pki_group,
|
group => $etc_icinga2_pki_group,
|
||||||
mode => $etc_icinga2_pki_mode,
|
mode => $etc_icinga2_pki_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/scripts/:
|
#Directory resource for /etc/icinga2/scripts/:
|
||||||
file { '/etc/icinga2/scripts/':
|
file { '/etc/icinga2/scripts/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/scripts/',
|
path => '/etc/icinga2/scripts/',
|
||||||
owner => $etc_icinga2_scripts_owner,
|
owner => $etc_icinga2_scripts_owner,
|
||||||
group => $etc_icinga2_scripts_group,
|
group => $etc_icinga2_scripts_group,
|
||||||
mode => $etc_icinga2_scripts_mode,
|
mode => $etc_icinga2_scripts_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/zones.d/:
|
#Directory resource for /etc/icinga2/zones.d/:
|
||||||
file { '/etc/icinga2/zones.d/':
|
file { '/etc/icinga2/zones.d/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/zones.d/',
|
path => '/etc/icinga2/zones.d/',
|
||||||
owner => $etc_icinga2_zonesd_owner,
|
owner => $etc_icinga2_zonesd_owner,
|
||||||
group => $etc_icinga2_zonesd_group,
|
group => $etc_icinga2_zonesd_group,
|
||||||
mode => $etc_icinga2_zonesd_mode,
|
mode => $etc_icinga2_zonesd_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#File and directory resources for the object directories that can be used to hold different
|
#File and directory resources for the object directories that can be used to hold different
|
||||||
|
@ -118,272 +118,272 @@ class icinga2::server::config inherits icinga2::server {
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/hosts/:
|
#Directory resource for /etc/icinga2/objects/hosts/:
|
||||||
file { '/etc/icinga2/objects/hosts/':
|
file { '/etc/icinga2/objects/hosts/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/hosts/',
|
path => '/etc/icinga2/objects/hosts/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/hostgroups/:
|
#Directory resource for /etc/icinga2/objects/hostgroups/:
|
||||||
file { '/etc/icinga2/objects/hostgroups/':
|
file { '/etc/icinga2/objects/hostgroups/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/hostgroups/',
|
path => '/etc/icinga2/objects/hostgroups/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/services/:
|
#Directory resource for /etc/icinga2/objects/services/:
|
||||||
file { '/etc/icinga2/objects/services/':
|
file { '/etc/icinga2/objects/services/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/services/',
|
path => '/etc/icinga2/objects/services/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/servicegroups/:
|
#Directory resource for /etc/icinga2/objects/servicegroups/:
|
||||||
file { '/etc/icinga2/objects/servicegroups/':
|
file { '/etc/icinga2/objects/servicegroups/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/servicegroups/',
|
path => '/etc/icinga2/objects/servicegroups/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/users/:
|
#Directory resource for /etc/icinga2/objects/users/:
|
||||||
file { '/etc/icinga2/objects/users/':
|
file { '/etc/icinga2/objects/users/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/users/',
|
path => '/etc/icinga2/objects/users/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/usergroups/:
|
#Directory resource for /etc/icinga2/objects/usergroups/:
|
||||||
file { '/etc/icinga2/objects/usergroups/':
|
file { '/etc/icinga2/objects/usergroups/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/usergroups/',
|
path => '/etc/icinga2/objects/usergroups/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/checkcommands/:
|
#Directory resource for /etc/icinga2/objects/checkcommands/:
|
||||||
file { '/etc/icinga2/objects/checkcommands/':
|
file { '/etc/icinga2/objects/checkcommands/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/checkcommands/',
|
path => '/etc/icinga2/objects/checkcommands/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/notificationcommands/:
|
#Directory resource for /etc/icinga2/objects/notificationcommands/:
|
||||||
file { '/etc/icinga2/objects/notificationcommands/':
|
file { '/etc/icinga2/objects/notificationcommands/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/notificationcommands/',
|
path => '/etc/icinga2/objects/notificationcommands/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/eventcommands/:
|
#Directory resource for /etc/icinga2/objects/eventcommands/:
|
||||||
file { '/etc/icinga2/objects/eventcommands/':
|
file { '/etc/icinga2/objects/eventcommands/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/eventcommands/',
|
path => '/etc/icinga2/objects/eventcommands/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/notifications/:
|
#Directory resource for /etc/icinga2/objects/notifications/:
|
||||||
file { '/etc/icinga2/objects/notifications/':
|
file { '/etc/icinga2/objects/notifications/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/notifications/',
|
path => '/etc/icinga2/objects/notifications/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/timeperiods/:
|
#Directory resource for /etc/icinga2/objects/timeperiods/:
|
||||||
file { '/etc/icinga2/objects/timeperiods/':
|
file { '/etc/icinga2/objects/timeperiods/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/timeperiods/',
|
path => '/etc/icinga2/objects/timeperiods/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/scheduleddowntimes/:
|
#Directory resource for /etc/icinga2/objects/scheduleddowntimes/:
|
||||||
file { '/etc/icinga2/objects/scheduleddowntimes/':
|
file { '/etc/icinga2/objects/scheduleddowntimes/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/scheduleddowntimes/',
|
path => '/etc/icinga2/objects/scheduleddowntimes/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/dependencies/:
|
#Directory resource for /etc/icinga2/objects/dependencies/:
|
||||||
file { '/etc/icinga2/objects/dependencies/':
|
file { '/etc/icinga2/objects/dependencies/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/dependencies/',
|
path => '/etc/icinga2/objects/dependencies/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/perfdatawriters/:
|
#Directory resource for /etc/icinga2/objects/perfdatawriters/:
|
||||||
file { '/etc/icinga2/objects/perfdatawriters/':
|
file { '/etc/icinga2/objects/perfdatawriters/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/perfdatawriters/',
|
path => '/etc/icinga2/objects/perfdatawriters/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/graphitewriters/:
|
#Directory resource for /etc/icinga2/objects/graphitewriters/:
|
||||||
file { '/etc/icinga2/objects/graphitewriters/':
|
file { '/etc/icinga2/objects/graphitewriters/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/graphitewriters/',
|
path => '/etc/icinga2/objects/graphitewriters/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/idomysqlconnections/:
|
#Directory resource for /etc/icinga2/objects/idomysqlconnections/:
|
||||||
file { '/etc/icinga2/objects/idomysqlconnections/':
|
file { '/etc/icinga2/objects/idomysqlconnections/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/idomysqlconnections/',
|
path => '/etc/icinga2/objects/idomysqlconnections/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/idopgsqlconnections/:
|
#Directory resource for /etc/icinga2/objects/idopgsqlconnections/:
|
||||||
file { '/etc/icinga2/objects/idopgsqlconnections/':
|
file { '/etc/icinga2/objects/idopgsqlconnections/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/idopgsqlconnections/',
|
path => '/etc/icinga2/objects/idopgsqlconnections/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/livestatuslisteners/:
|
#Directory resource for /etc/icinga2/objects/livestatuslisteners/:
|
||||||
file { '/etc/icinga2/objects/livestatuslisteners/':
|
file { '/etc/icinga2/objects/livestatuslisteners/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/livestatuslisteners/',
|
path => '/etc/icinga2/objects/livestatuslisteners/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/statusdatawriters/:
|
#Directory resource for /etc/icinga2/objects/statusdatawriters/:
|
||||||
file { '/etc/icinga2/objects/statusdatawriters/':
|
file { '/etc/icinga2/objects/statusdatawriters/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/statusdatawriters/',
|
path => '/etc/icinga2/objects/statusdatawriters/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/externalcommandlisteners/:
|
#Directory resource for /etc/icinga2/objects/externalcommandlisteners/:
|
||||||
file { '/etc/icinga2/objects/externalcommandlisteners/':
|
file { '/etc/icinga2/objects/externalcommandlisteners/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/externalcommandlisteners/',
|
path => '/etc/icinga2/objects/externalcommandlisteners/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/compatloggers/:
|
#Directory resource for /etc/icinga2/objects/compatloggers/:
|
||||||
file { '/etc/icinga2/objects/compatloggers/':
|
file { '/etc/icinga2/objects/compatloggers/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/compatloggers/',
|
path => '/etc/icinga2/objects/compatloggers/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/checkresultreaders/:
|
#Directory resource for /etc/icinga2/objects/checkresultreaders/:
|
||||||
file { '/etc/icinga2/objects/checkresultreaders/':
|
file { '/etc/icinga2/objects/checkresultreaders/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/checkresultreaders/',
|
path => '/etc/icinga2/objects/checkresultreaders/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/checkercomponents/:
|
#Directory resource for /etc/icinga2/objects/checkercomponents/:
|
||||||
file { '/etc/icinga2/objects/checkercomponents/':
|
file { '/etc/icinga2/objects/checkercomponents/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/checkercomponents/',
|
path => '/etc/icinga2/objects/checkercomponents/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/notificationcomponents/:
|
#Directory resource for /etc/icinga2/objects/notificationcomponents/:
|
||||||
file { '/etc/icinga2/objects/notificationcomponents/':
|
file { '/etc/icinga2/objects/notificationcomponents/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/notificationcomponents/',
|
path => '/etc/icinga2/objects/notificationcomponents/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/fileloggers/:
|
#Directory resource for /etc/icinga2/objects/fileloggers/:
|
||||||
file { '/etc/icinga2/objects/fileloggers/':
|
file { '/etc/icinga2/objects/fileloggers/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/fileloggers/',
|
path => '/etc/icinga2/objects/fileloggers/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/syslogloggers/:
|
#Directory resource for /etc/icinga2/objects/syslogloggers/:
|
||||||
file { '/etc/icinga2/objects/syslogloggers/':
|
file { '/etc/icinga2/objects/syslogloggers/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/syslogloggers/',
|
path => '/etc/icinga2/objects/syslogloggers/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/icingastatuswriters/:
|
#Directory resource for /etc/icinga2/objects/icingastatuswriters/:
|
||||||
file { '/etc/icinga2/objects/icingastatuswriters/':
|
file { '/etc/icinga2/objects/icingastatuswriters/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/icingastatuswriters/',
|
path => '/etc/icinga2/objects/icingastatuswriters/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/apilisteners/:
|
#Directory resource for /etc/icinga2/objects/apilisteners/:
|
||||||
file { '/etc/icinga2/objects/apilisteners/':
|
file { '/etc/icinga2/objects/apilisteners/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/apilisteners/',
|
path => '/etc/icinga2/objects/apilisteners/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/endpoints/:
|
#Directory resource for /etc/icinga2/objects/endpoints/:
|
||||||
file { '/etc/icinga2/objects/endpoints/':
|
file { '/etc/icinga2/objects/endpoints/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/endpoints/',
|
path => '/etc/icinga2/objects/endpoints/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/zones/:
|
#Directory resource for /etc/icinga2/objects/zones/:
|
||||||
file { '/etc/icinga2/objects/zones/':
|
file { '/etc/icinga2/objects/zones/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/zones/',
|
path => '/etc/icinga2/objects/zones/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/applys/
|
#Directory resource for /etc/icinga2/objects/applys/
|
||||||
|
@ -392,30 +392,30 @@ class icinga2::server::config inherits icinga2::server {
|
||||||
#See the following link for more info:
|
#See the following link for more info:
|
||||||
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#apply
|
# http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#apply
|
||||||
file { '/etc/icinga2/objects/applys/':
|
file { '/etc/icinga2/objects/applys/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/applys/',
|
path => '/etc/icinga2/objects/applys/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/templates/:
|
#Directory resource for /etc/icinga2/objects/templates/:
|
||||||
file { '/etc/icinga2/objects/templates/':
|
file { '/etc/icinga2/objects/templates/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/templates/',
|
path => '/etc/icinga2/objects/templates/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#Directory resource for /etc/icinga2/objects/constants/:
|
#Directory resource for /etc/icinga2/objects/constants/:
|
||||||
file { '/etc/icinga2/objects/constants/':
|
file { '/etc/icinga2/objects/constants/':
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
path => '/etc/icinga2/objects/constants/',
|
path => '/etc/icinga2/objects/constants/',
|
||||||
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
owner => $etc_icinga2_obejcts_sub_dir_owner,
|
||||||
group => $etc_icinga2_obejcts_sub_dir_group,
|
group => $etc_icinga2_obejcts_sub_dir_group,
|
||||||
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
mode => $etc_icinga2_obejcts_sub_dir_mode,
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,9 +32,8 @@ class icinga2::server::install::repos inherits icinga2::server {
|
||||||
|
|
||||||
if $manage_repos == true {
|
if $manage_repos == true {
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
#CentOS systems:
|
#CentOS or RedHat systems:
|
||||||
'CentOS': {
|
'CentOS', 'RedHat': {
|
||||||
|
|
||||||
#Add the official Icinga Yum repository: http://packages.icinga.org/epel/
|
#Add the official Icinga Yum repository: http://packages.icinga.org/epel/
|
||||||
yumrepo { 'icinga2_yum_repo':
|
yumrepo { 'icinga2_yum_repo':
|
||||||
baseurl => "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/release/",
|
baseurl => "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/release/",
|
||||||
|
@ -45,8 +44,8 @@ class icinga2::server::install::repos inherits icinga2::server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Ubuntu systems:
|
#Ubuntu systems:
|
||||||
'Ubuntu': {
|
'Ubuntu': {
|
||||||
#Include the apt module's base class so we can...
|
#Include the apt module's base class so we can...
|
||||||
include apt
|
include apt
|
||||||
#...use the apt module to add the Icinga 2 PPA from launchpad.net:
|
#...use the apt module to add the Icinga 2 PPA from launchpad.net:
|
||||||
|
@ -96,8 +95,8 @@ class icinga2::server::install::packages inherits icinga2::server {
|
||||||
if $server_install_nagios_plugins == true {
|
if $server_install_nagios_plugins == true {
|
||||||
#Install the Nagios plugins packages:
|
#Install the Nagios plugins packages:
|
||||||
package {$icinga2_server_plugin_packages:
|
package {$icinga2_server_plugin_packages:
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
provider => $package_provider,
|
provider => $package_provider,
|
||||||
install_options => $server_plugin_package_install_options,
|
install_options => $server_plugin_package_install_options,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,8 +104,8 @@ class icinga2::server::install::packages inherits icinga2::server {
|
||||||
if $install_mail_utils_package == true {
|
if $install_mail_utils_package == true {
|
||||||
#Install the package that has the 'mail' binary in it so we can send notifications:
|
#Install the package that has the 'mail' binary in it so we can send notifications:
|
||||||
package {$icinga2_server_mail_package:
|
package {$icinga2_server_mail_package:
|
||||||
ensure => installed,
|
ensure => installed,
|
||||||
provider => $package_provider,
|
provider => $package_provider,
|
||||||
install_options => $server_plugin_package_install_options,
|
install_options => $server_plugin_package_install_options,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "puppet-icinga2",
|
"name": "puppet-icinga2",
|
||||||
"version": "0.5.0",
|
"version": "0.6.1",
|
||||||
"author": "Icinga Development Team",
|
"author": "Icinga Development Team",
|
||||||
"summary": "Icinga 2 Puppet module",
|
"summary": "Icinga 2 Puppet module",
|
||||||
"license": "GPLv2",
|
"license": "GPLv2",
|
||||||
"source": "git://github.com/icinga/puppet-icinga2",
|
"source": "git://github.com/icinga/puppet-icinga2",
|
||||||
"project_page": "https://github.com/icinga/puppet-icinga2",
|
"project_page": "https://github.com/icinga/puppet-icinga2",
|
||||||
"issues_url": "https://dev.icinga.org/projects/icinga-tools",
|
"issues_url": "https://dev.icinga.org/projects/puppet-icinga2",
|
||||||
"operatingsystem_support": [
|
"operatingsystem_support": [
|
||||||
{
|
{
|
||||||
"operatingsystem": "CentOS",
|
"operatingsystem": "CentOS",
|
||||||
|
@ -16,12 +16,28 @@
|
||||||
"7"
|
"7"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"operatingsystem": "RedHat",
|
||||||
|
"operatingsystemmajrelease": [
|
||||||
|
"5",
|
||||||
|
"6",
|
||||||
|
"7"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"operatingsystem": "Debian",
|
"operatingsystem": "Debian",
|
||||||
"operatingsystemmajrelease": [
|
"operatingsystemmajrelease": [
|
||||||
"7"
|
"7"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"operatingsystem": "RedHat",
|
||||||
|
"operatingsystemmajrelease": [
|
||||||
|
"5",
|
||||||
|
"6",
|
||||||
|
"7"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"operatingsystem": "Ubuntu",
|
"operatingsystem": "Ubuntu",
|
||||||
"operatingsystemmajrelease": [
|
"operatingsystemmajrelease": [
|
||||||
|
|
38
templates/object_apilistener.conf.erb
Normal file
38
templates/object_apilistener.conf.erb
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* WARNING: This ApiListener object definition is automatically generated by Puppet.
|
||||||
|
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An ApiListener definition. You can create your own configuration files
|
||||||
|
* in the conf.d directory (e.g. one per commnand). By default all *.conf
|
||||||
|
* files in this directory are included.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
object ApiListener "<%= @object_name %>" {
|
||||||
|
<%- if @cert_path -%>
|
||||||
|
cert_path = <%= @cert_path %>
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @key_path -%>
|
||||||
|
key_path = <%= @key_path %>
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @ca_path -%>
|
||||||
|
ca_path = <%= @ca_path %>
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @crl_path -%>
|
||||||
|
crl_path = <%= @crl_path %>
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @bind_host -%>
|
||||||
|
bind_host = "<%= @bind_host %>"
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @bind_port -%>
|
||||||
|
bind_port = <%= @bind_port %>
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @accept_config -%>
|
||||||
|
accept_config = <%= @accept_config %>
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @accept_commands -%>
|
||||||
|
accept_commands = <%= @accept_commands %>
|
||||||
|
<%- end -%>
|
||||||
|
}
|
|
@ -26,10 +26,10 @@ apply Notification "<%= @object_notificationname %>" to Host {
|
||||||
command = "<%= @command %>"
|
command = "<%= @command %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @vars.empty? != true -%>
|
<%- if @vars.empty? != true -%>
|
||||||
<%- @vars.each_pair do |key,value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -44,13 +44,13 @@ apply Notification "<%= @object_notificationname %>" to Host {
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @times.empty? != true -%>
|
<%- if @times.empty? != true -%>
|
||||||
times = {
|
times = {
|
||||||
<%- @times.each_pair do |key,value| -%>
|
<%- @times.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = "<%= value %>"
|
<%= key %> = "<%= value %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @interval -%>
|
<%- if @interval -%>
|
||||||
interval = "<%= @inteval -%>"
|
interval = "<%= @interval -%>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @period -%>
|
<%- if @period -%>
|
||||||
period = "<%= @period -%>"
|
period = "<%= @period -%>"
|
||||||
|
|
|
@ -29,10 +29,10 @@ apply Notification "<%= @object_notificationname %>" to Service {
|
||||||
command = "<%= @command %>"
|
command = "<%= @command %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @vars.empty? != true -%>
|
<%- if @vars.empty? != true -%>
|
||||||
<%- @vars.each_pair do |key,value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -47,13 +47,13 @@ apply Notification "<%= @object_notificationname %>" to Service {
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @times.empty? != true -%>
|
<%- if @times.empty? != true -%>
|
||||||
times = {
|
times = {
|
||||||
<%- @times.each_pair do |key,value| -%>
|
<%- @times.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = "<%= value %>"
|
<%= key %> = "<%= value %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @interval -%>
|
<%- if @interval -%>
|
||||||
interval = "<%= @inteval -%>"
|
interval = "<%= @interval -%>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @period -%>
|
<%- if @period -%>
|
||||||
period = "<%= @period -%>"
|
period = "<%= @period -%>"
|
||||||
|
|
|
@ -35,7 +35,7 @@ apply Service "<%= @object_servicename %>" to Host {
|
||||||
check_command = "<%= @check_command -%>"
|
check_command = "<%= @check_command -%>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @vars.empty? != true -%>
|
<%- if @vars.empty? != true -%>
|
||||||
<%- @vars.each_pair do |key, value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
vars.<%= key %> = "<%= value %>"
|
vars.<%= key %> = "<%= value %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
@ -43,7 +43,7 @@ apply Service "<%= @object_servicename %>" to Host {
|
||||||
max_check_attempts = <%= @max_check_attempts %>
|
max_check_attempts = <%= @max_check_attempts %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @check_period -%>
|
<%- if @check_period -%>
|
||||||
check_period = <%= @check_period %>
|
check_period = "<%= @check_period %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @check_interval -%>
|
<%- if @check_interval -%>
|
||||||
check_interval = <%= @check_interval %>
|
check_interval = <%= @check_interval %>
|
||||||
|
|
|
@ -27,7 +27,7 @@ object CheckCommand "<%= @object_checkcommandname %>" {
|
||||||
<%- @arguments.each_with_index do |(key,value), i| -%>
|
<%- @arguments.each_with_index do |(key,value), i| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -37,10 +37,10 @@ object CheckCommand "<%= @object_checkcommandname %>" {
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
||||||
<%- if @vars -%>
|
<%- if @vars -%>
|
||||||
<%- @vars.each_pair do |key,value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ object CheckCommand "<%= @object_checkcommandname %>" {
|
||||||
|
|
||||||
<%- if @env -%>
|
<%- if @env -%>
|
||||||
env = {
|
env = {
|
||||||
<%- @vars.each_pair do |key,value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <%= value %>
|
<%= key %> = <%= value %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
|
15
templates/object_checkercomponent.conf.erb
Normal file
15
templates/object_checkercomponent.conf.erb
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/**
|
||||||
|
* WARNING: This CheckerComponent is automatically generated by Puppet.
|
||||||
|
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A CheckerComponent definition. You can create your own configuration files
|
||||||
|
* in the conf.d directory (e.g. one per commnand). By default all *.conf
|
||||||
|
* files in this directory are included.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
library "checker"
|
||||||
|
|
||||||
|
object CheckerComponent "<%= @object_name %>" { }
|
21
templates/object_endpoint.conf.erb
Normal file
21
templates/object_endpoint.conf.erb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
/**
|
||||||
|
* WARNING: This EndPoint is automatically generated by Puppet.
|
||||||
|
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A EndPoint definition. You can create your own configuration files
|
||||||
|
* in the conf.d directory (e.g. one per commnand). By default all *.conf
|
||||||
|
* files in this directory are included.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
object Endpoint "<%= @object_name %>" {
|
||||||
|
host = "<%= @host -%>"
|
||||||
|
<%- if @port -%>
|
||||||
|
port = <%= @port -%>
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @log_duration -%>
|
||||||
|
log_duration = <%= @log_duration -%>
|
||||||
|
<%- end -%>
|
||||||
|
}
|
|
@ -27,7 +27,7 @@ object EventCommand "<%= @object_eventcommandname %>" {
|
||||||
<%- @arguments.each_with_index do |(key,value), i| -%>
|
<%- @arguments.each_with_index do |(key,value), i| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -37,10 +37,10 @@ object EventCommand "<%= @object_eventcommandname %>" {
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @vars.empty? -%>
|
<%- if @vars.empty? -%>
|
||||||
|
|
||||||
<%- @vars.each_pair do |key,value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ object EventCommand "<%= @object_eventcommandname %>" {
|
||||||
<%- if @env.empty? != true -%>
|
<%- if @env.empty? != true -%>
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
<%- @env.each_pair do |key,value| -%>
|
<%- @env.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <%= value %>
|
<%= key %> = <%= value %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
|
18
templates/object_filelogger.conf.erb
Normal file
18
templates/object_filelogger.conf.erb
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/**
|
||||||
|
* WARNING: This FileLogger is automatically generated by Puppet.
|
||||||
|
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A FileLogger definition. You can create your own configuration files
|
||||||
|
* in the conf.d directory (e.g. one per commnand). By default all *.conf
|
||||||
|
* files in this directory are included.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
object FileLogger "<%= @object_name %>" {
|
||||||
|
<%- if @severity -%>
|
||||||
|
severity = "<%= @severity -%>"
|
||||||
|
<%- end -%>
|
||||||
|
path = "<%= @path -%>"
|
||||||
|
}
|
|
@ -29,10 +29,18 @@ object Host "<%= @object_hostname %>" {
|
||||||
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @vars.empty? != true -%>
|
<%- if @vars.empty? != true -%>
|
||||||
<%- @vars.each_pair do |key, value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
|
<%- if value.is_a?(Hash) -%>
|
||||||
|
vars.<%= key %> = {
|
||||||
|
<%- value.sort_by {|subkey,subvalue| subkey}.each do |subkey,subvalue| -%>
|
||||||
|
<%= subkey %> = <%= subvalue %>
|
||||||
|
<%- end -%>
|
||||||
|
}
|
||||||
|
<%- else -%>
|
||||||
vars.<%= key %> = "<%= value %>"
|
vars.<%= key %> = "<%= value %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
<%- end -%>
|
||||||
<%- if @check_command -%>
|
<%- if @check_command -%>
|
||||||
check_command = "<%= @check_command -%>"
|
check_command = "<%= @check_command -%>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
20
templates/object_icingastatuswriter.conf.erb
Normal file
20
templates/object_icingastatuswriter.conf.erb
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
/**
|
||||||
|
* WARNING: This IcingaStatusWriter is automatically generated by Puppet.
|
||||||
|
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A IcingaStatusWriter definition. You can create your own configuration files
|
||||||
|
* in the conf.d directory (e.g. one per commnand). By default all *.conf
|
||||||
|
* files in this directory are included.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
object IcingaStatusWriter "<%= @object_name %>" {
|
||||||
|
<%- if @status_path -%>
|
||||||
|
status_path = LocalStateDir + "<%= @status_path -%>"
|
||||||
|
<%- end -%>
|
||||||
|
<%- if @update_interval -%>
|
||||||
|
update_interval = <%= @update_interval -%>
|
||||||
|
<%- end -%>
|
||||||
|
}
|
|
@ -45,7 +45,7 @@ object IdoMysqlConnection "mysql-ido" {
|
||||||
|
|
||||||
<%- if @cleanup.empty? != true -%>
|
<%- if @cleanup.empty? != true -%>
|
||||||
cleanup = {
|
cleanup = {
|
||||||
<%- @cleanup.each_pair do |key, value| -%>
|
<%- @cleanup.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <%= value %>
|
<%= key %> = <%= value %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -54,4 +54,4 @@ object IdoMysqlConnection "mysql-ido" {
|
||||||
<%- if @categories.length != 0 -%>
|
<%- if @categories.length != 0 -%>
|
||||||
categories = <%= @categories.map {|category| "#{category}"}.join(' | ') %>
|
categories = <%= @categories.map {|category| "#{category}"}.join(' | ') %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ object IdoPgsqlConnection "pgsql-ido" {
|
||||||
|
|
||||||
<%- if @cleanup.empty? != true -%>
|
<%- if @cleanup.empty? != true -%>
|
||||||
cleanup = {
|
cleanup = {
|
||||||
<%- @cleanup.each_pair do |key, value| -%>
|
<%- @cleanup.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <%= value %>
|
<%= key %> = <%= value %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -54,4 +54,4 @@ object IdoPgsqlConnection "pgsql-ido" {
|
||||||
<%- if @categories.length != 0 -%>
|
<%- if @categories.length != 0 -%>
|
||||||
categories = <%= @categories.map {|category| "#{category}"}.join(' | ') %>
|
categories = <%= @categories.map {|category| "#{category}"}.join(' | ') %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,10 +26,10 @@ object Notification "<%= @object_notificationname %>" {
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @vars.empty? != true -%>
|
<%- if @vars.empty? != true -%>
|
||||||
|
|
||||||
<%- @vars.each_pair do |key,value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -47,14 +47,14 @@ object Notification "<%= @object_notificationname %>" {
|
||||||
<%- if @times.empty? != true -%>
|
<%- if @times.empty? != true -%>
|
||||||
|
|
||||||
times = {
|
times = {
|
||||||
<%- @times.each_pair do |key,value| -%>
|
<%- @times.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <%= value %>
|
<%= key %> = <%= value %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @interval -%>
|
<%- if @interval -%>
|
||||||
|
|
||||||
interval = <%= @inteval %>
|
interval = <%= @interval %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @period -%>
|
<%- if @period -%>
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ object NotificationCommand "<%= @object_notificationcommandname %>" {
|
||||||
<%- @arguments.each_with_index do |(key,value), i| -%>
|
<%- @arguments.each_with_index do |(key,value), i| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -37,10 +37,10 @@ object NotificationCommand "<%= @object_notificationcommandname %>" {
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @vars.empty? != true -%>
|
<%- if @vars.empty? != true -%>
|
||||||
|
|
||||||
<%- @vars.each_pair do |key,value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <% if value.class == String %><%= value %>
|
<%= key %> = <% if value.class == String %><%= value %>
|
||||||
<%- else -%>{
|
<%- else -%>{
|
||||||
<%- value.each_pair do |k,v| -%>
|
<%- value.sort_by {|k, v| k}.each do |k, v| -%>
|
||||||
<%= k %> = <%= v %>
|
<%= k %> = <%= v %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ object NotificationCommand "<%= @object_notificationcommandname %>" {
|
||||||
<%- if @env.empty? != true -%>
|
<%- if @env.empty? != true -%>
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
<%- @env.each_pair do |key,value| -%>
|
<%- @env.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
<%= key %> = <%= value %>
|
<%= key %> = <%= value %>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
|
19
templates/object_notificationcomponent.conf.erb
Normal file
19
templates/object_notificationcomponent.conf.erb
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/**
|
||||||
|
* WARNING: This NotificationComponent is automatically generated by Puppet.
|
||||||
|
* ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A NotificationComponent definition. You can create your own configuration files
|
||||||
|
* in the conf.d directory (e.g. one per commnand). By default all *.conf
|
||||||
|
* files in this directory are included.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
library "notification"
|
||||||
|
|
||||||
|
object NotificationComponent "<%= @object_name %>" {
|
||||||
|
<%- if @enable_ha != true -%>
|
||||||
|
enable_ha = false
|
||||||
|
<%- end -%>
|
||||||
|
}
|
|
@ -30,7 +30,7 @@ object ScheduledDowntime "<%= @object_scheduleddowntimename %>" {
|
||||||
<%- if @ranges.empty? != true -%>
|
<%- if @ranges.empty? != true -%>
|
||||||
|
|
||||||
ranges = {
|
ranges = {
|
||||||
<%- @ranges.each_pair do |key, value| -%>
|
<%- @ranges.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
"<%= key %>" = "<%= value %>"
|
"<%= key %>" = "<%= value %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ object Service "<%= @object_servicename %>" {
|
||||||
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @vars.empty? != true -%>
|
<%- if @vars.empty? != true -%>
|
||||||
<%- @vars.each_pair do |key, value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
vars.<%= key %> = "<%= value %>"
|
vars.<%= key %> = "<%= value %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
|
|
@ -23,7 +23,7 @@ object TimePeriod "<%= @object_name %>" {
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- if @ranges.empty? != true -%>
|
<%- if @ranges.empty? != true -%>
|
||||||
ranges = {
|
ranges = {
|
||||||
<%- @ranges.each_pair do |key,value| -%>
|
<%- @ranges.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
"<%= key %>" = "<%= value %>"
|
"<%= key %>" = "<%= value %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ object User "<%= @object_username %>" {
|
||||||
enable_notifications = <%= @enable_notifications %>
|
enable_notifications = <%= @enable_notifications %>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
<%- if @vars.empty? != true -%>
|
<%- if @vars.empty? != true -%>
|
||||||
<%- @vars.each_pair do |key, value| -%>
|
<%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
|
||||||
vars.<%= key %> = "<%= value %>"
|
vars.<%= key %> = "<%= value %>"
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
|
@ -45,4 +45,4 @@ object User "<%= @object_username %>" {
|
||||||
<%- if @states.length != 0 -%>
|
<%- if @states.length != 0 -%>
|
||||||
states = [ <%- @states.each do |state| -%> <%= state %>, <%- end -%>]
|
states = [ <%- @states.each do |state| -%> <%= state %>, <%- end -%>]
|
||||||
<%- end -%>
|
<%- end -%>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue