Page MenuHomeSoftware Heritage

README.md
No OneTemporary

README.md

# Icinga2 Puppet Module
![Icina Logo](https://www.icinga.org/wp-content/uploads/2014/06/icinga_logo.png)
#### Table of Contents
1. [Overview][Overview]
2. [Module Description - What the module does and why it is useful][Module description]
3. [Setup - The basics of getting started with icinga2][Setup]
* [What Icinga2 affects][]
4. [Usage - Configuration options and additional functionality][Usage]
5. [Reference - An under-the-hood peek at what the module is doing and how][Reference]
* [Public Classes][]
* [Private Classes][]
* [Public defined types][]
* [Private defined types][]
6. [Limitations - OS compatibility, etc.][Limitations]
7. [Development - Guide for contributing to the module][Development]
## Overview
Icinga2 is a widely used open source monitoring software. This Puppet module helps installing and managing configuration
of Icinga2 on multiple operating sytems.
>> This Module is a rewrite of [puppet-icinga2] and will replace it in the future.
## Module Description
This module installs and configures Icinga2 on your Linux or Windows hosts. By default it will use packages provided by
your distributions repository, respectively chocolatey on Windows. The module can be enabled to use [packages.icinga.org]
as primary repository, which will give you the ability to install the latest Icinga2 release. All features and objects
available in Icinga2 can be enabled and configured with this module.
## Setup
### What the Icinga2 Puppet module affects
* Packages Installation
* Service
* Objects Configuration
* Feature Configuration
* Apply Rules
* MySQL/PostgreSQL Database Schema Import
* Repository Management
* Certification Authority
### Dependencies
This module depends on:
* [puppetlabs/stdlib]
* [puppetlabs/concat]
Depending on your setup following modules may also be required:
* [puppetlabs/apt]
* [puppetlabs/chocolatey]
## Usage
### Installing Icinga2
The default class `icinga2` will install and configure a basic installation of Icinga2 on your system. By default it will
enable the features `checker`, `mainlog` and `notification`. As default installation source the distributions repository will
used. On Windows systems we use chocolatey. To get the latest version of Icinga2 you need to enable the `manage_repo`
parameter, which will allow the module to add the official [packages.icinga.org] repository to your host.
``` puppet
class { 'icinga2':
manage_repo => true
}
```
### Enable Features
Each Icinga2 feature can be enabled or disabled by using the according classes. In addition to that, there is a set of
default features that are enabled by default: `[ 'checker', 'mainlog', 'notification' ]`
The default set of features can be changed by setting the `features` parameter:
``` puppet
class { 'icinga2':
manage_repo => true,
features => ['checker', 'mainlog', 'command']
}
```
To add enable features and change their default settings, use the feature classes:
``` puppet
class { 'icinga2::feature::graphite':
host => '10.10.0.15',
port => 2003,
enable_send_thresholds => true,
enable_send_metadata => true
}
```
### Enable IDO
The IDO feature can be enabled either in combination with MySQL or PostgreSQL. Depending on your database you need to
enable the feature `icinga2::feature::idomysql` or `icinga2::feature::idopgsql`. Both features are capable of importing
the base schema into the database, however this is disabled by default. Updating the database schema to another version
is currently not supported.
``` puppet
class{ 'icinga2::feature::idomysql':
user => "icinga2",
password => "icinga2",
database => "icinga2",
import_schema => true
}
```
### Custom configuration files
Sometimes it's necessary to cover very special configurations that you cannot handle with this module. In this case you
can use the `icinga2::config::file` tag on your file ressource. This module collects all file ressource types with this
tag and triggers a reload of Icinga2 on a file change.
``` puppet
include icinga2
file { '/etc/icinga2/conf.d/for-loop.conf':
ensure => file,
tag => 'icinga2::config::file',
}
```
## Reference
- [**Public classes**](#public-classes)
- [Class: icinga2](#class-icinga2)
- [Class: icinga2::feature::checker](#class-icinga2featurechecker)
- [Class: icinga2::feature::mainlog](#class-icinga2featuremainlog)
- [Class: icinga2::feature::notification](#class-icinga2featurenotification)
- [Class: icinga2::feature::command](#class-icinga2featurecommand)
- [Class: icinga2::feature::compatlog](#class-icinga2featurecompat)
- [Class: icinga2::feature::graphite](#class-icinga2featuregraphite)
- [Class: icinga2::feature::livestatus](#class-icinga2featurelivestatus)
- [Class: icinga2::feature::opentsdb](#class-icinga2featureopentsdb)
- [Class: icinga2::feature::perfdata](#class-icinga2featureperfdata)
- [Class: icinga2::feature::statusdata](#class-icinga2featurestatusdata)
- [Class: icinga2::feature::syslog](#class-icinga2featuresyslog)
- [Class::icinga2::feature::debuglog](#class-icinga2featuredebuglog)
- [Class::icinga2::feature::gelf](#class-icinga2featuregelf)
- [Class::icinga2::feature::influxdb](#class-icinga2featureinfluxdb)
- [Class::icinga2::feature::api](#class-icinga2featureapi)
- [Class::icinga2::feature::idopgsql](#class-icinga2featureidopgsql)
- [Class::icinga2::feature::idomysql](#class-icinga2featureidomysql)
- [**Private classes**](#private-classes)
- [Class: icinga2::repo](#class-icinga2repo)
- [Class: icinga2::install](#class-icinga2install)
- [Class: icinga2::config](#class-icinga2config)
- [Class: icinga2::service](#class-icinga2service)
- [**Public defined types**](#public-defined-types)
- [Defined type: icinga2::object::endpoint](#defined-type-icinga2objectendpoint)
- [Defined type: icinga2::object::zone](#defined-type-icinga2objectzone)
- [Defined type: icinga2::object::apiuser](#defined-type-icinga2objectapiuser)
- [**Private defined types**](#private-defined-types)
- [Defined type: icinga2::feature](#defined-type-icinga2feature)
- [Defined type: icinga2::object](#defined-type-icinga2object)
### Public Classes
#### Class: `icinga2`
The default class of this modoule. It handles the basic installation and configuration of Icinga2. When you declare this
class, puppet will do the following:
* Install Icinga2
* Place a default configuration for the Icinga2 daemon
* Keep the default configuration of the Icinga2 package
* Start Icinga2 and enable the service
This class can be declared without adjusting any parameter:
``` puppet
class { 'icinga2': }
```
**Parameters within `icinga2`:**
##### `ensure`
Defines if the service should be `running` or `stopped`. Defaults to `running`
##### `enable`
If set to `true` the Icinga2 service will start on boot. Defaults to `true`.
##### `manage_repo`
When set to `true` this module will install the [packages.icinga.org] repository. With this official repo
you can get the latest version of Icinga. When set to `false` the operating systems default will be used. As the Icinga
Project does not offer a Chocolatey repository, you will get a warning if you enable this parameter on Windows. Default
is `false`
##### `manage_service`
Lets you decide if the Icinga2 daemon should be reloaded when configuration files have changed. Defaults to `true`
##### `features`
A list of features to enable by default. Defaults to `[checker, mainlog, notification]`
##### `purge_features`
Define if configuration files for features not managed by Puppet should be purged. Defaults to true.
##### `constants`
Hash of constants. Defaults are set in the params class. Your settings will be merged with the defaults.
##### `plugins`
A list of the ITL plugins to load. Defaults to `[ 'plugins', 'plugins-contrib', 'windows-plugins', 'nscp' ]`.
##### `confd`
This is the directory where Icinga2 stores it's object configuration by default. To disable this, set the parameter
to `false`. It's also possible to assign your own directory. This directory is relative to etc/icinga2 and must be
managed outside of this module as file resource with tag icinga2::config::file. By default this parameter is `true`.
#### Class: `icinga2::feature::checker`
Enables or disables the `checker` feature.
**Parameters of `icinga2::feature::checker`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `checker` should be enabled. Defaults to `present`.
#### Class: `icinga2::feature::mainlog`
Enables or disables the `mainlog` feature.
**Parameters of `icinga2::feature::mainlog`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `mainlog` should be enabled. Defaults to `present`.
##### `severity`
Sets the severity of the `mainlog` feature. Can be set to:
* `information`
* `notice`
* `warning`
* `debug`
Defaults to `information`
##### `path`
Absolute path to the logging file. Default depends on platform:
* Linux: `/var/log/icinga2/icinga2.log`
* Windows: `C:/ProgramData/icinga2/var/log/icinga2/icinga2.log`
#### Class: `icinga2::feature::notification`
Enables or disables the `notification` feature.
**Parameters of `icinga2::feature::notification`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `notification` should be enabled. Defaults to `present`.
#### Class: `icinga2::feature::command`
Enables or disables the `command` feature.
**Parameters of `icinga2::feature::command`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `command` should be enabled. Defaults to `present`.
##### `commandpath`
Absolute path to the command pipe. Default depends on platform:
* Linux: `/var/run/icinga2/cmd/icinga2.cmd`
* Windows: `C:/ProgramData/icinga2/var/run/icinga2/cmd/icinga2.cmd`
#### Class: `icinga2::feature::compatlog`
Enables or disables the `compatlog` feature.
**Parameters of `icinga2::feature::compatlog`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `compatlog` should be enabled. Defaults to `present`.
##### `commandpath`
Absolute path to the command pipe. Default depends on platform:
* Linux: `/var/run/icinga2/cmd/icinga2.cmd`
* Windows: `C:/ProgramData/icinga2/var/run/icinga2/cmd/icinga2.cmd`
##### `log_dir`
Absolute path to the log directory. Default depends on platform:
* Linux: `/var/log/icinga2/compat`
* Windows: `C:/ProgramData/icinga2/var/log/icinga2/compat`
##### `rotation_method`
Sets how often should the log file be rotated. Valid options are:
* `HOURLY`
* `DAILY`
* `WEEKLY`
* `MONTHLY`
Defaults to `DAILY`
#### Class: `icinga2::feature::graphite`
Enables or disables the `graphite` feature.
**Parameters of `icinga2::feature::graphite`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `graphite` should be enabled. Defaults to `present`.
##### `host`
Graphite Carbon host address. Defaults to `127.0.0.1`.
##### `port`
Graphite Carbon port. Defaults to `2003`.
##### `host_name_template`
Template for metric path of hosts. Defaults to `icinga2.$host.name$.host.$host.check_command$`.
##### `service_name_template`
Template for metric path of services. Defaults to `icinga2.$host.name$.services.$service.name$.$service.check_command$`.
##### `enable_send_thresholds`
Send threholds as metrics. Defaults to false.
##### `enable_send_metadata`
Send metadata as metrics. Defaults to false.
#### Class: `icinga2::feature::livestatus`
Enables or disables the `livestatus` feature.
**Parameters of `icinga2::feature::livestatus`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `livestatus` should be enabled. Defaults to `present`.
##### `socket_type`
Specifies the socket type. Can be either 'tcp' or 'unix'. Defaults to 'unix'
##### `bind_host`
IP address to listen for connections. Only valid when socket_type is `tcp`. Defaults to `127.0.0.1`
##### `bind_port`
Port to listen for connections. Only valid when socket_type is `tcp`. Defaults to `6558`
##### `socket_path`
Specifies the path to the UNIX socket file. Only valid when socket_type is `unix`. Default depends on platform:
* Linux: `/var/run/icinga2/cmd/livestatus`
* Windows: `C:/ProgramData/icinga2/var/run/icinga2/cmd/livestatus`
##### `compat_log_path`
Required for historical table queries. Requires `CompatLogger` feature to be enabled. Default depends platform:
Linux: `var/icinga2/log/icinga2/compat`
Windows: `C:/ProgramData/icinga2/var/log/icinga2/compat`
#### Class: `icinga2::feature::opentsdb`
Enables or disables the `opentsdb` feature.
**Parameters of `icinga2::feature::opentsdb`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `opentsdb` should be enabled. Defaults to `present`.
##### `host`
OpenTSDB host address. Defaults to `127.0.0.1`
##### `port`
OpenTSDB port. Defaults to `4242`
#### Class: `icinga2::feature::perfdata`
Enables or disables the `perfdata` feature.
**Parameters of `icinga2::feature::perfdata`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `perfdata` should be enabled. Defaults to `present`.
##### `host_perfdata_path`
Absolute path to the perfdata file for hosts. Default depends on platform:
* Linux: `/var/spool/icinga2/host-perfdata`
* Windows: `C:/ProgramData/icinga2/var/spool/icinga2/host-perfdata`
##### `service_perfdata_path`
Absolute path to the perfdata file for services. Default depends on platform:
* Linux: `/var/spool/icinga2/service-perfdata`
* Windows: `C:/ProgramData/icinga2/var/spool/icinga2/service-perfdata`
###### `host_temp_path`
Path to the temporary host file. Defaults depends on platform:
* Linux: `/var/spool/icinga2/tmp/host-perfdata`
* Windows: `C:/ProgramData/icinga2/var/spool/icinga2/tmp/host-perfdata`
##### `service_temp_path`
Path to the temporary service file. Defaults depends on platform:
* Linux: `/var/spool/icinga2/tmp/host-perfdata`
* Windows: `C:/ProgramData/icinga2/var/spool/icinga2/tmp/host-perfdata`
##### `host_format_template`
Host Format template for the performance data file. Defaults to a template that's suitable for use with PNP4Nagios.
##### `service_format_template`
Service Format template for the performance data file. Defaults to a template that's suitable for use with PNP4Nagios.
##### `rotation_interval`
Rotation interval for the files specified in `{host,service}_perfdata_path`. Can be written in minutes or seconds,
i.e. `1m` or `15s`. Defaults to `30s`
#### Class: `icinga2::feature::statusdata`
Enables or disables the `statusdata` feature.
**Parameters of `icinga2::feature::statusdata`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `statusdata` should be enabled. Defaults to `present`.
##### `status_path`
Absolute path to the status.dat file. Default depends on platform:
* Linux: `/var/cache/icinga2/status.dat`
* Windows: `C:/ProgramData/icinga2/var/cache/icinga2/status.dat`
##### `object_path`
Absolute path to the object.cache file. Default depends on platform:
* Linux: `/var/cache/icinga2/object.cache`
* Windows: `C:/ProgramData/icinga2/var/cache/icinga2/object.cache`
##### `update_interval`
Interval in seconds to update both status files. You can also specify it in minutes with the letter m or in seconds
with s. Defaults to `30s`
#### Class: `icinga2::feature::syslog`
Enables or disables the `syslog` feature.
**Parameters of `icinga2::feature::syslog`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `syslog` should be enabled. Defaults to `present`.
##### `severity`
Set severity level for logging to syslog. Available options are:
* `information`
* `notice`
* `warning`
* `debug`
Defaults to `warning`
#### Class: `icinga2::feature::debuglog`
Enables or disables the `debuglog` feature.
**Parameters of `icinga2::feature::debuglog`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `debuglog` should be enabled. Defaults to `present`.
##### `path`
Absolute path to the log file. Default depends on platform:
* Linux: `/var/log/icinga2/debug.log`
* Windows: `C:/ProgramData/icinga2/var/log/icinga2/debug.log`
#### Class: `icinga2::feature::gelf`
Enables or disables the `gelf` feature.
**Parameters of `icinga2::feature::gelf`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `gelf` should be enabled. Defaults to `present`.
##### `host`
GELF receiver host address. Defaults to `127.0.0.1`
##### `port`
GELF receiver port. Defaults to `12201`
##### `source`
Source name for this instance. Defaults to `icinga2`
##### `enable_send_perfdata`
Enable performance data for *CHECK RESULT* events. Defaults to `false`.
#### Class: `icinga2::feature::influxdb`
Enables or disables the `influxdb` feature.
**Parameters of `icinga2::feature::influxdb`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `influxdb` should be enabled. Defaults to `present`.
##### `host`
InfluxDB host address. Defaults to `127.0.0.1`
##### `port`
InfluxDB HTTP port. Defaults to `8086`
##### `database`
InfluxDB database name. Defaults to `icinga2`
##### `username`
InfluxDB user name. Defaults to `undef`
##### `password`
InfluxDB user password. Defaults to `undef`
##### `ssl`
SSL settings will be set depending on this parameter.
* `puppet` Use puppet certificates. This will copy the ca.pem, certificate and key generated by Puppet.
* `custom` Set custom paths for certificate, key and CA
* `false` Disable SSL (default)
##### `ssl_ca_cert`
CA certificate to validate the remote host. Only valid if ssl is set to `custom`. Defaults to `undef`
##### `ssl_cert`
Host certificate to present to the remote host for mutual verification. Only valid if ssl is set to 'custom'.
Defaults to `undef`
##### `ssl_key`
Host key to accompany the ssl_cert. Only valid if ssl is set to `custom`. Defaults to `undef`
##### `host_measurement`
The value of this is used for the measurement setting in host_template. Defaults to `$host.check_command$`
##### `host_tags`
Tags defined in this hash will be set in the host_template.
``` puppet
class { 'icinga2::feature::influxdb':
host_measurement => '$host.check_command$'
host_tags => { hostname => '$host.name$' }
}
```
##### `service_measurement`
The value of this is used for the measurement setting in host_template. Defaults to `$service.check_command$`
##### `service_tags`
Tags defined in this hash will be set in the service_template.
``` puppet
class { 'icinga2::feature::influxdb':
service_measurement => '$service.check_command$',
service_tags => { hostname => '$host.name$', service => '$service.name$' }
}
```
##### `enable_send_thresholds`
Whether to send warn, crit, min & max tagged data. Defaults to `false`
##### `enable_send_metadata`
Whether to send check metadata e.g. states, execution time, latency etc. Defaults to `false`
##### `flush_interval`
How long to buffer data points before transfering to InfluxDB. Defaults to `10s`
##### `flush_threshold`
How many data points to buffer before forcing a transfer to InfluxDB. Defaults to `1024`
#### Class: `icinga2::feature::api`
Enables or disables the `api` feature.
**Parameters of `icinga2::feature::api`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `api` should be enabled. Defaults to `present`.
##### `pki`
Provides multiple sources for the certificate and key.
* `puppet` Copies the key, cert and CAcert from the Puppet ssl directory to the Icinga pki directory.
* Linux: `/etc/icinga2/pki`
* Windows: `C:/ProgramData/icinga2/etc/icinga2/pki`
* `none` Does nothing and you either have to manage the files yourself as file resources or use the `ssl_key`, `ssl_cert`,
`ssl_ca` parameters.
Defaults to `puppet`
##### `ssl_key_path`
Location of the private key. Default depends on platform:
* Linux `/etc/icinga2/pki/NodeName.key`
* Windows `C:/ProgramData/icinga2/etc/icinga2/pki/NodeName.key`
The Value of `NodeName` comes from the corresponding constant.
##### `ssl_cert_path`
Location of the certificate. Default depends on platform:
* Linux `/etc/icinga2/pki/NodeName.crt`
* Windows `C:/ProgramData/icinga2/etc/icinga2/pki/NodeName.crt`
The Value of `NodeName` comes from the corresponding constant.
##### `ssl_ca_path`
Location of the CA certificate. Default depends on platform:
* Linux `/etc/icinga2/pki/ca.crt`
* Windows `C:/ProgramData/icinga2/etc/icinga2/pki/ca.crt`
##### `accept_config`
Accept zone configuration. Defaults to `false`
##### `accept_commands`
Accept remote commands. Defaults to `false`
#### Class: `icinga2::feature::idopgsql`
Enables or disables the `ido-pgsql` feature.
**Parameters of `icinga2::feature::idopgsql`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `ido-pgsql` should be enabled. Defaults to `present`.
##### `host`
PostgreSQL database host address. Defaults to `127.0.0.1`
##### `port`
PostgreSQL database port. Defaults to `3306`
##### `user`
PostgreSQL database user with read/write permission to the icinga database. Defaults to `icinga`
##### `password`
PostgreSQL database user's password. Defaults to `icinga`
##### `database`
PostgreSQL database name. Defaults to `icinga`
##### `table_prefix`
PostgreSQL database table prefix. Defaults to `icinga_`
##### `import_schema`
Whether to import the PostgreSQL schema or not. Defaults to `false`
#### Class: `icinga2::feature::idomysql`
Enables or disables the `gelf` feature.
**Parameters of `icinga2::feature::idomysql`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature `ido-mysql` should be enabled. Defaults to `present`.
##### `host`
MySQL database host address. Defaults to `127.0.0.1`
##### `port`
MySQL database port. Defaults to `3306`
##### `socket_path`
MySQL socket path.
##### `user`
MySQL database user with read/write permission to the icinga database. Defaults to `icinga`
##### `password`
MySQL database user's password. Defaults to `icinga`
##### `database`
MySQL database name. Defaults to `icinga`
##### `ssl`
SSL settings will be set depending on this parameter:
* `puppet` Use puppet certificates
* `custom` Set custom paths for certificate, key and CA
* `false` Disable SSL (default)
##### `ssl_key`
MySQL SSL client key file path. Only valid if ssl is set to `custom`.
##### `ssl_cert`
MySQL SSL certificate file path. Only valid if ssl is set to `custom`.
##### `ssl_ca`
MySQL SSL certificate authority certificate file path. Only valid if ssl is set to `custom`.
##### `ssl_capath`
MySQL SSL trusted SSL CA certificates in PEM format directory path. Only valid if ssl is enabled.
##### `ssl_cipher`
MySQL SSL list of allowed ciphers. Only valid if ssl is enabled.
##### `table_prefix`
MySQL database table prefix. Defaults to `icinga_`
##### `instance_name`
Unique identifier for the local Icinga 2 instance. Defaults to `default`
##### `instance_description`
Description for the Icinga 2 instance.
##### `enable_ha`
Enable the high availability functionality. Only valid in a cluster setup. Defaults to `true`
##### `failover_timeout`
Set the failover timeout in a HA cluster. Must not be lower than 60s. Defaults to `60s`
##### `cleanup`
Hash with items for historical table cleanup.
##### `categories`
Array of information types that should be written to the database.
##### `import_schema`
Whether to import the MySQL schema or not. Defaults to `false`
### Private Classes
#### Class: `icinga2::repo`
Installs the [packages.icinga.org] repository. Depending on your operating system [puppetlabs/apt] or
[puppetlabs/chocolatey] are required.
#### Class: `icinga2::install`
Handles the installation of the Icinga2 package.
#### Class: `icinga2::config`
Installs basic configuration files required to run Icinga2.
#### Class: `icinga2::service`
Starts/stops and enables/disables the service.
### Public defined types
#### Defined type: `icinga2::object::endpoint`
##### `ensure`
Set to present enables the endpoint object, absent disabled it. Defaults to present.
##### `endpoint`
Set the Icinga2 name of the endpoint object. Defaults to title of the define resource.
##### `host`
Optional. The IP address of the remote Icinga 2 instance.
##### `port`
The service name/port of the remote Icinga 2 instance. Defaults to 5665.
##### `log_duration`
Duration for keeping replay logs on connection loss. Defaults to `1d` (86400 seconds). Attribute is specified in seconds.
If `log_duration` is set to `0`, replaying logs is disabled. You could also specify the value in human readable format
like `10m` for 10 minutes or `1h` for one hour.
##### `target`
Destination config file to store in this object. File will be declared at the first time.
##### `order`
String to set the position in the target file, sorted alpha numeric. Defaults to `10`.
#### Defined type: `icinga2::object::zone`
##### `ensure`
Set to present enables the endpoint object, absent disabled it. Defaults to `present`
##### `zone`
Set the name of the zone object. Defaults to the title of the define resource.
##### `endpoints`
List of endpoints that belong to this zone.
##### `parent`
Parent zone to this zone.
##### `global`
If set to `true`, a global zone is defined and the parameter endpoints and parent are ignored. Defaults to `false`.
##### `target`
Destination config file to store in this object. File will be declared at the first time.
##### `order`
String to control the position in the target file, sorted alpha numeric.
#### Defined type: `icinga2::object::apiuser`
##### `password`
Password string.
##### `client_cn`
Optional. Client Common Name (CN).
##### `permissions`
Array of permissions. Either as string or dictionary with the keys permission and filter. The latter must be specified
as function.
##### `target`
Destination config file to store in this object. File will be declared at the first time.
##### `order`
String to control the position in the target file, sorted alpha numeric. Defaults to `10`
###### Examples
```
permissions = [ "*" ]
```
```
permissions = [ "objects/query/Host", "objects/query/Service" ]
```
```
permissions = [
{
permission = "objects/query/Host"
filter = {{ regex("^Linux", host.vars.os) }}
},
{
permission = "objects/query/Service"
filter = {{ regex("^Linux", service.vars.os) }}
}
]
```
### Private defined types
#### Defined type: `icinga2::feature`
This defined type is used by all feature defined types as basis. It can generally enable or disable features.
**Parameters of `icinga2::feature`:**
##### `ensure`
Either `present` or `absent`. Defines if the feature should be enabled. Defaults to `present`.
##### `feature`
Name of the feature. This name is used for the corresponding configuration file.
#### Defined type: `icinga2::object`
This defined type is used by all object defined types as bases. In can generally create Icinga2 objects.
##### `ensure`
Set to present enables the object, absent disabled it. Defaults to present.
##### `object_name`
Set the icinga2 name of the object. Defaults to title of the define resource.
##### `template`
Set to true will define a template otherwise an object. Defaults to false.
##### `import`
A sorted list of templates to import in this object. Defaults to an empty array.
##### `attrs`
Hash for the attributes of this object. Keys are the attributes and values are there values. Defaults to an empty Hash.
##### `object_type`
Icinga2 object type for this object.
##### `target`
Destination config file to store in this object. File will be declared the first time.
##### `order`
String to set the position in the target file, sorted alpha numeric.
## Limitations
This module has been tested on:
* Debian 7, 8
* Ubuntu 14.04, 16.04
* CentOS/RHEL 6, 7
* Windows Server 2012
Other operating systems or versions may work but have not been tested.
## Development
A roadmap of this project is located at https://dev.icinga.org/projects/puppet-icinga2-rewrite/roadmap. Please consider
this roadmap when you start contributing to the project.
### Contributing
When contributing several steps such as pull requests and proper testing implementations are required.
Find a detailed step by step guide in [CONTRIBUTING.md].
### Testing
Testing is essential in our workflow to ensure a good quality. We use RSpec as well as Serverspec to test all components
of this module. For a detailed description see [TESTING.md].
## Release Notes
When releasing new versions we refer to [SemVer 1.0.0] for version numbers. All steps required when creating a new
release are described in [RELEASE.md]
See also [CHANGELOG.md]
## Authors
[AUTHORS] is generated on each release.
[Overview]: #overview
[Module description]: #module-description
[Setup]: #setup
[What Icinga2 affects]: #what-icinga2-affects
[Usage]: #usage
[Reference]: #reference
[Public Classes]: #public-classes
[Private Classes]: #private-classes
[Public Defined Types]: #public-defined-types
[Private Defined Types]: #private-defined-types
[Limitations]: #limitations
[Development]: #development
[puppetlabs/stdlib]: https://github.com/puppetlabs/puppetlabs-stdlib
[puppetlabs/concat]: https://github.com/puppetlabs/puppetlabs-concat
[puppetlabs/apt]: https://github.com/puppetlabs/puppetlabs-apt
[puppetlabs/chocolatey]: https://github.com/puppetlabs/puppetlabs-chocolatey
[puppet-icinga2]: https://github.com/icinga/puppet-icinga2
[packages.icinga.org]: https://packages.icinga.org
[SemVer 1.0.0]: http://semver.org/spec/v1.0.0.html
[CONTRIBUTING.md]: CONTRIBUTING.md
[TESTING.md]: TESTING.md
[RELEASE.md]: RELEASE.md
[CHANGELOG.md]: CHANGELOG.md
[AUTHORS]: AUTHORS

File Metadata

Mime Type
text/plain
Expires
Jun 4 2025, 7:28 PM (9 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3281012

Event Timeline