Skip to content

Commit

Permalink
ref #32 added more documentation for features and objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mkayontour committed Aug 20, 2021
1 parent 58ee8e1 commit e342fd5
Show file tree
Hide file tree
Showing 7 changed files with 401 additions and 13 deletions.
37 changes: 35 additions & 2 deletions doc/features/feature-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,45 @@ icinga2_features:
- name: api
cert_name: host.example.org
ssl_ca: /home/ansible/certs/ca.crt
ssl_cert:/home/ansible/certs/host.crt
ssl_key:/home/ansible/certs/host.key
ssl_cert: /home/ansible/certs/host.crt
ssl_key: /home/ansible/certs/host.key
endpoints:
- name: NodeName
zones:
- name: ZoneName
endpoints:
- NodeName
```

### Feature variables

* `icinga2_ca_host: string`
* Use to point the Icinga 2 installation to where to get the certificates. When set to **None**, Ansible will create a local Certificate Authority on the Host. Use **hostname** or **ipaddress** as value.

* `force_newcert: boolean`
* Force new certificates on the destination hosts.

* `cert_name: string`
* Common name of Icinga client/server instance. Default is **ansible_fqdn**.

* `ssl_ca: string`
* Path to the ca file when using manual certificates

* `ssl_cert: string`
* Path to the certificate file when using manual certificates.

* `ssl_key: string`
* Path to the certificate key file when using manual certificates.

* `endpoints: list of dicts`
* Defines endpoints in **zones.conf**, each endpoint is required to have a name and optional a host or port.
* `name: string`
* `host: string`
* `port: number`

* `zones: list of dicts`
* Defines zones in **zones.conf**, each zones is required to have a name and endpoints. The parameter global is optional.
* `name: string`
* `endpoints: list`
* `global: boolean`

18 changes: 18 additions & 0 deletions doc/features/feature-graphite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Graphite

To enable the feature Graphite use the following block in the variable `icinga2_features`.

```
icinga2_features:
- name: graphite
host: localhost
port: 2003
```

### Feature variables

* `host: string`
* Name or address of the graphite instance.

* `port: int`
*
71 changes: 70 additions & 1 deletion doc/features/feature-ido.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,73 @@ icinga2_features:
cleanup:
downtimehistory: 48h
contactnotifications_age: 31d
```
```

### Feature variables

* `host: string`
* MySQL/PgSQL database host address. Default **localhost**.

* `port: int`
* Database port. Defaults to **3306** for MySQL and **5432** for PgSQL.

* `database: string`
* Database name. Defaults to **icinga2**.

* `user: sring`
* Database user with read/write permission to the icinga database. Defaults to **icinga2**.

* `password: string`
* Database user’s password.

* `state: string`
* Decides whether the feature is enabled or disabled. Possible values present, absent.

* `enable_ssl: boolean`
* Use SSL. Change to true in case you want to use any of the SSL options.

* `ssl_mode: string`
* **Only PgSQL**: nable SSL connection mode. Value must be set according to the sslmode setting: prefer, require, verify-ca, verify-full, allow, disable.

* `ssl_key: string`
* SSL client key file path.

* `ssl_cert: string`
* SSL certificate file path.

* `ssl_ca: string`
* SSL certificate authority certificate file path.

* `ssl_capath: string`
* SSL trusted SSL CA certificates in PEM format directory path.

* `ssl_cipher: string`
* **Only MySQL**: SSL list of allowed ciphers.

* `socket_path: string`
* **Only MySQL**: MySQL socket path.

* `table_prefix: string`
* Database table prefix.

* `instance_name: string`
* Unique identifier for the local Icinga 2 instance, used for multiple Icinga 2 clusters writing to the same database. Defaults to default.

* `instance_description: string`
* Description for the Icinga 2 instance.

* `enable_ha: boolean`
* Enable the high availability functionality. Only valid in a cluster setup.

* `failover_timeout: string`
* Set the failover timeout in a HA cluster. Must not be lower than 30s. Defaults to 30s

* `cleanup: dict`
* Dictionary with items for historical table cleanup.

* `categories: list`
* Array of information types that should be written to the database.

* `import_schema: boolean`
* Import schema in the database set for the feature.

19 changes: 19 additions & 0 deletions doc/features/feature-mainlog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Mainlog

To enable the feature mainlog add the following block to the variable `icinga2_features`.

```
icinga2_features:
- name: mainlog
```

### Feature variables

* `severity: string`
* The minimum severity for this log. Possible values “debug”, “notice”, “information”, “warning” or “critical”.

* `path: string`
* The Log Path, default: `LogDir + /icinga2.log`

* `state: string`
* Decides whether the feature is enabled or disabled. Possible values present, absent.
32 changes: 32 additions & 0 deletions doc/features/feature-notification.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Notification

To activate the feature notification add this block to the variable `icinga2_features`.

```
icinga2_features:
- name: notification
```

### Notification Scripts

The role won't manage notifications scripts with the role. Many scripts require dependencies or libraries to be installed. To manage those dependencies create a Ansible role and use it after the Icinga 2 role.

If there are no dependencies on the script you can easily use the `post_tasks` section in your playbook. Example:

```
post_tasks:
- name: copy notifications script
src: rocket_chat_notification.py
dest: /etc/icinga2/scripts/rocket_chat_notification.py
group: "{{ icinga2_group }}
user: "{{ icinga2_user}}"
```

### Feature Attributes

* `enable_ha: boolean`
* Enable the high availability functionality. Only valid in a cluster setup. Disabling this currently only affects reminder notifications.

* `state: string`
* Decides whether the feature is enabled or disabled. Possible values present, absent.

Loading

0 comments on commit e342fd5

Please sign in to comment.