Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bodsch/ansible-icingaweb2-modules

Install Modules for icingaweb2.
https://github.com/bodsch/ansible-icingaweb2-modules

ansible ansible-role automation icingaweb2 icingaweb2-module

Last synced: 11 days ago
JSON representation

Install Modules for icingaweb2.

Awesome Lists containing this project

README

        

# Ansible Role: `icingaweb2-modules`

Install Modules for icingaweb2.

---

> I am in the process of transferring this role to a [collection](https://github.com/bodsch/ansible-collection-icinga) and will therefore no longer process any issues or merge requests here.
> However, I will include them in the collection!
> **Please be patient until I have completed the work!**

---

[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bodsch/ansible-icingaweb2-modules/main.yml?branch=main)][ci]
[![GitHub issues](https://img.shields.io/github/issues/bodsch/ansible-icingaweb2-modules)][issues]
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/bodsch/ansible-icingaweb2-modules)][releases]
[![Ansible Quality Score](https://img.shields.io/ansible/quality/50067?label=role%20quality)][quality]

[ci]: https://github.com/bodsch/ansible-icingaweb2-modules/actions
[issues]: https://github.com/bodsch/ansible-icingaweb2-modules/issues?q=is%3Aopen+is%3Aissue
[releases]: https://github.com/bodsch/ansible-icingaweb2-modules/releases
[quality]: https://galaxy.ansible.com/bodsch/icingaweb2_modules

## Requirements & Dependencies

Ansible Collections

- [bodsch.core](https://github.com/bodsch/ansible-collection-core)

```bash
ansible-galaxy collection install bodsch.core
```
or
```bash
ansible-galaxy collection install --requirements-file collections.yml
```

## usage

```yaml
icingaweb_modules_install_dir: /usr/share/icingaweb2

icingaweb_modules: {}
```

Each module can be installed, activated and configured individually.

Currently the following external modules are supported:

- [audit](https://github.com/Icinga/icingaweb2-module-audit.git)
- [graphite](https://github.com/Icinga/icingaweb2-module-graphite.git)
- [grafana](https://github.com/Mikesch-mp/icingaweb2-module-grafana.git)

Do you have any wishes for further ... read the [Contribution](../CONTRIBUTING.md), create a PR or ask carefully.

The following parameters can be used to influence the installation and activation:

```yaml
icingaweb_modules:
audit:
enabled: false
src: https://github.com/Icinga/icingaweb2-module-audit.git
version: v1.0.1
```

- `enabled` enabled or disable the module
- `src` the repositoty for sourcecode
- `version` the version. you can also set the branchname like `main` or `master`

Additionally there is the possibility to configure the corresponding modules.
The respective parameters are individual and will be explained separately.

Each configuration takes place in a `configuration` block.

### audit

There are two different blocks [`Standard Log`](https://github.com/Icinga/icingaweb2-module-audit#standard-log) and
[`JSON Log`](https://github.com/Icinga/icingaweb2-module-audit#standard-log).

The standard log (`log`) is a normal log with human readable messages.
It's possible to log to a file and to syslog.

* `type`

One of these three possibilities are available:
* `file` - log to a file
* `syslog` - log in to syslog
* `none` - log nothing
* `ident`

Syslog Ident

> *ident* is an arbitrary identification string which future syslog invocations will prefix to each message.
[see here](http://www.gnu.org/software/libc/manual/html_node/openlog.html)

(Only has an effect if 'type: syslog' has been defined)
* `facility`

Syslog facility

> ... default *facility* code for this connection
[see here](http://www.gnu.org/software/libc/manual/html_node/openlog.html)

(Only has an effect if 'type: syslog' has been defined)
* `path`

The log file in which the audit information is stored.

The JSON log (`stream`) is supposed to be consumed by other applications.
It writes one JSON object per line to a file.

* `format`

The format in which the data is stored. It is only available for `json`.

For more information, please consult the corresponding module documentation!
* `path`

The log file in which the audit information is stored.

```yaml
configuration:
log:
# file / syslog / none
type: file
# ident = "web-ident"
# facility = "authpriv"
path: /var/log/icingaweb2/audit.log
stream:
# none / json
format: json
path: /var/log/icingaweb2/json.log
```

**Complete example:**

```yaml
icingaweb_modules:

audit:
enabled: false
src: https://github.com/Icinga/icingaweb2-module-audit.git
version: v1.0.1
configuration:
log:
type: file
path: /var/log/icingaweb2/audit.log
stream:
format: json
path: /var/log/icingaweb2/json.log
```

### Graphite

This module integrates an existing [Graphite](https://graphite.readthedocs.io/en/latest/) installation
in the IcingaWeb frontend.

* `host`

The hostname for the corresponding graphite service
* `port`

The port for the graphite Web URL

These following credentials are only needed, when your Graphite Web is protected by a HTTP basic
authentication mechanism.

* `user`

username for the basic authentication
* `password`

corresponding password for the basic authentication
* [`advanced`](https://github.com/Icinga/icingaweb2-module-graphite/blob/master/doc/03-Configuration.md#advanced)
- `graphite_writer_host_name_template`
- `graphite_writer_service_name_template`
- `customvar_obscured_check_command`
* [`ui`](https://github.com/Icinga/icingaweb2-module-graphite/blob/master/doc/03-Configuration.md#ui)

The settings `default_time_range` and `default_time_range_unit` set the default time range for displayed
graphs both in the graphs lists and in monitored objects' detail views.

If you'd like to suppress the No graphs found messages, activate `disable_no_graphs_found`

```yaml
configuration:
host: localhost
port: 2003
user: ''
password: ''
ui:
default_time_range: 12
default_time_range_unit: hours
disable_no_graphs_found: false
advanced:
graphite_writer_host_name_template: host.tpl
graphite_writer_service_name_template: ''
customvar_obscured_check_command: ''
```

**Complete example:**

```yaml
icingaweb_modules:

graphite:
enabled: false
src: https://github.com/Icinga/icingaweb2-module-graphite.git
version: v1.1.0
# url: https://github.com/Icinga/icingaweb2-module-graphite/archive/v1.1.0.zip
configuration:
host: localhost
ui:
default_time_range: 12
default_time_range_unit: hours
```

### Grafana

Add Grafana graphs into Icinga Web 2 to display performance metrics.

```yaml
configuration:
support_grafana_5: false
host: tsdb.icinga.local
port: 3000
protocol: http
timerange: 6h
timerangeAll: 2d
defaultdashboard:
name: icinga2-default
uid: Z-TfDRpGz
panelid: 1
defaultdashboard:
name: icinga2-default
uid: "Zm47ngtMk"
panelid: "1"
defaultorgid: "1"
shadows: false
theme: "light"
datasource: "influxdb"
accessmode: "direct"
authentication:
apitoken:
username:
password:
indirectproxyrefresh:
proxytimeout:
directrefresh: "no"
height: "280"
width: "640"
enableLink: true
publichost:
publicprotocol:
debug: false
```

After configuring the Grafana connection, further graphs can be set up.

```yaml
graphs:
ping4:
dashboard: hostalive
dashboarduid: Z-TfDRpGz
panelId: 9
orgId: 1
repeatable: false
hostalive:
dashboard: hostalive
dashboarduid: Z-TfDRpGz
panelId: 9
orgId: 1
repeatable: false
```

**Complete example:**

```yaml
icingaweb_modules:

grafana:
enabled: false
src: https://github.com/Mikesch-mp/icingaweb2-module-grafana.git
version: v1.3.6
configuration:
# support_grafana_5: false
host: tsdb.icinga.local
# port: 3000
# protocol: http
# timerange: 6h
# timerangeAll: 2d
defaultdashboard:
# name: icinga2-default
uid: Z-TfDRpGz
# panelid: 1
# defaultdashboard:
# name: icinga2-default
# uid: "Zm47ngtMk"
# panelid: "1"
# defaultorgid: "1"
# shadows: false
# theme: "light"
# datasource: "influxdb"
# accessmode: "direct"
# authentication
# apitoken
# username
# password
# indirectproxyrefresh
# proxytimeout
# directrefresh: "no"
# height: "280"
# width: "640"
enableLink: true
# publichost
# publicprotocol
# debug: true

graphs:
ping4:
dashboard: hostalive
dashboarduid: Z-TfDRpGz
panelId: 9
orgId: 1
repeatable: false
```

----

## Author and License

- Bodo Schulz

## License

[Apache](LICENSE)

**FREE SOFTWARE, HELL YEAH!**