mirror of https://github.com/Icinga/icinga2.git
Docs: Promote and update Icinga DB related install instructions
This commit is contained in:
parent
f369f86355
commit
bd618c4288
|
@ -450,7 +450,7 @@ yum install nagios-plugins-all
|
||||||
```
|
```
|
||||||
<!-- {% endif %} -->
|
<!-- {% endif %} -->
|
||||||
|
|
||||||
## Set up Icinga 2 API <a id="setting-up-api"></a>
|
## Set up Icinga 2 API <a id="set-up-icinga2-api"></a>
|
||||||
|
|
||||||
Almost every Icinga 2 setup requires the Icinga 2 API as Icinga Web connects to it, Icinga DB requires it,
|
Almost every Icinga 2 setup requires the Icinga 2 API as Icinga Web connects to it, Icinga DB requires it,
|
||||||
and it enables cluster communication functionality for highly available and distributed setups.
|
and it enables cluster communication functionality for highly available and distributed setups.
|
||||||
|
@ -481,6 +481,168 @@ Restart Icinga 2 for these changes to take effect.
|
||||||
systemctl restart icinga2
|
systemctl restart icinga2
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<!-- {% if amazon_linux or centos or debian or rhel or sles or ubuntu %} -->
|
||||||
|
## Set up Icinga DB <a id="set-up-icinga-db"></a>
|
||||||
|
|
||||||
|
Icinga DB is a set of components for publishing, synchronizing and
|
||||||
|
visualizing monitoring data in the Icinga ecosystem, consisting of:
|
||||||
|
|
||||||
|
* Icinga 2 with its `icingadb` feature enabled,
|
||||||
|
responsible for publishing monitoring data to a Redis server, i.e. configuration and its runtime updates,
|
||||||
|
check results, state changes, downtimes, acknowledgements, notifications, and other events such as flapping
|
||||||
|
* The [Icinga DB daemon](https://icinga.com/docs/icinga-db),
|
||||||
|
which synchronizes the data between the Redis server and a database
|
||||||
|
* And Icinga Web with the
|
||||||
|
[Icinga DB Web](https://icinga.com/docs/icinga-db-web) module enabled,
|
||||||
|
which connects to both Redis and the database to display and work with the most up-to-date data
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
!!! info
|
||||||
|
|
||||||
|
Setting up Icinga 2's Icinga DB feature is only required for Icinga 2 master nodes or single-node setups.
|
||||||
|
|
||||||
|
### Set up Redis Server <a id="set-up-redis-server"></a>
|
||||||
|
|
||||||
|
A Redis server from version 6.2 is required.
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
|
||||||
|
This guide sets up the `icingadb-redis` package provided by Icinga,
|
||||||
|
which ships a current Redis Server version and is preconfigured for the Icinga DB components.
|
||||||
|
Using own Redis server setups is supported as long as the version requirements are met.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
!!! tip
|
||||||
|
|
||||||
|
Although the Redis server can run anywhere in an Icinga environment,
|
||||||
|
we recommend to install it where the corresponding Icinga 2 node is running to
|
||||||
|
keep latency between the components low.
|
||||||
|
|
||||||
|
#### Install Icinga DB Redis Package <a id="install-icinga-db-redis-package"></a>
|
||||||
|
|
||||||
|
Use your distribution's package manager to install the `icingadb-redis` package as follows:
|
||||||
|
|
||||||
|
<!-- {% if amazon_linux %} -->
|
||||||
|
<!-- {% if not icingaDocs %} -->
|
||||||
|
##### Amazon Linux 2
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
```bash
|
||||||
|
yum install icingadb-redis
|
||||||
|
```
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
|
||||||
|
<!-- {% if centos %} -->
|
||||||
|
<!-- {% if not icingaDocs %} -->
|
||||||
|
##### CentOS
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
|
||||||
|
Note that installing Icinga DB Redis is only supported on CentOS 7 as CentOS 8 is EOL.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yum install icingadb-redis
|
||||||
|
```
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
|
||||||
|
<!-- {% if debian or ubuntu %} -->
|
||||||
|
<!-- {% if not icingaDocs %} -->
|
||||||
|
##### Debian / Ubuntu
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
```bash
|
||||||
|
apt-get install icingadb-redis
|
||||||
|
```
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
|
||||||
|
<!-- {% if rhel %} -->
|
||||||
|
##### RHEL 8 or Later
|
||||||
|
|
||||||
|
```bash
|
||||||
|
dnf install icingadb-redis
|
||||||
|
```
|
||||||
|
|
||||||
|
##### RHEL 7
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yum install icingadb-redis
|
||||||
|
```
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
|
||||||
|
<!-- {% if sles %} -->
|
||||||
|
<!-- {% if not icingaDocs %} -->
|
||||||
|
##### SLES
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
```bash
|
||||||
|
zypper install icingadb-redis
|
||||||
|
```
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
|
||||||
|
#### Run Icinga DB Redis <a id="run-icinga-db-redis"></a>
|
||||||
|
|
||||||
|
The `icingadb-redis` package automatically installs the necessary systemd unit files to run Icinga DB Redis.
|
||||||
|
Please run the following command to enable and start its service:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl enable --now icingadb-redis
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Enable Remote Redis Connections <a id="enable-remote-redis-connections"></a>
|
||||||
|
|
||||||
|
By default, `icingadb-redis` only listens on `127.0.0.1`. If Icinga Web or Icinga 2 is running on another node,
|
||||||
|
remote access to the Redis server must be allowed. This requires the following directives to be set in
|
||||||
|
the `/etc/icingadb-redis/icingadb-redis.conf` configuration file:
|
||||||
|
|
||||||
|
* Set `protected-mode` to `no`, i.e. `protected-mode no`
|
||||||
|
* Set `bind` to the desired binding interface or bind all interfaces, e.g. `bind 0.0.0.0`
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
|
||||||
|
By default, Redis has no authentication preventing others from accessing it.
|
||||||
|
When opening Redis to an external interface, make sure to set a password, set up appropriate firewall rules,
|
||||||
|
or configure TLS with certificate authentication on Redis and its consumers,
|
||||||
|
i.e. Icinga 2, Icinga DB and Icinga Web.
|
||||||
|
|
||||||
|
Restart Icinga DB Redis for these changes to take effect:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl restart icingadb-redis
|
||||||
|
```
|
||||||
|
|
||||||
|
### Enable Icinga DB Feature <a id="enable-icinga-db-feature"></a>
|
||||||
|
|
||||||
|
With the [Icinga DB feature](14-features.md#icinga-db) enabled,
|
||||||
|
Icinga 2 publishes all of its monitoring data to the Redis server. This includes configuration and
|
||||||
|
its runtime updates via the Icinga 2 API, check results, state changes, downtimes, acknowledgments, notifications and
|
||||||
|
other events such as flapping.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Icinga 2 installs the feature configuration file to `/etc/icinga2/features-available/icingadb.conf`,
|
||||||
|
pre-configured for a local setup.
|
||||||
|
Update this file in case Redis is running on a different host or to set credentials.
|
||||||
|
All available settings are explained in the [Icinga DB object](09-object-types.md#icingadb) chapter.
|
||||||
|
|
||||||
|
!!! important
|
||||||
|
|
||||||
|
For single-node and high-availability setups, please read the note about the
|
||||||
|
[environment ID](https://icinga.com/docs/icinga-db/latest/doc/05-Distributed-Setups/#environment-id),
|
||||||
|
which is common to all Icinga DB components and generated by the Icinga DB feature.
|
||||||
|
|
||||||
|
To enable the `icingadb` feature use the following command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
icinga2 feature enable icingadb
|
||||||
|
```
|
||||||
|
|
||||||
|
Restart Icinga 2 for these changes to take effect:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl restart icinga2
|
||||||
|
```
|
||||||
|
<!-- {% endif %} -->
|
||||||
|
|
||||||
## Set up Database <a id="set-up-database"></a>
|
## Set up Database <a id="set-up-database"></a>
|
||||||
|
|
||||||
The IDO (Icinga Data Output) feature for Icinga 2 stores all configuration and status information into a database.
|
The IDO (Icinga Data Output) feature for Icinga 2 stores all configuration and status information into a database.
|
||||||
|
@ -912,45 +1074,6 @@ Restart Icinga 2.
|
||||||
systemctl restart icinga2
|
systemctl restart icinga2
|
||||||
```
|
```
|
||||||
|
|
||||||
### Icinga DB <a id="icingadb"></a>
|
|
||||||
|
|
||||||
Icinga DB is a new data backend currently in development.
|
|
||||||
It's purpose is to synchronise data between Icinga 2 (Redis) and Icinga Web 2 (MySQL), some day replacing the IDO.
|
|
||||||
Don't worry, we won't drop support on the IDO any time soon.
|
|
||||||
|
|
||||||
!!! note
|
|
||||||
|
|
||||||
Icinga DB is not ready to be used in production and should only be used for testing purposes.
|
|
||||||
|
|
||||||
#### Configue Icinga DB <a id="configuring-icinga-db"></a>
|
|
||||||
|
|
||||||
First, make sure to setup Icinga DB itself and its database backends (Redis and MySQL) by following the [installation instructions](https://icinga.com/docs/icingadb/latest/doc/02-Installation/).
|
|
||||||
|
|
||||||
#### Enable Icinga DB feature <a id="enabling-icinga-db"></a>
|
|
||||||
|
|
||||||
Icinga 2 provides a configuration file that is installed in
|
|
||||||
`/etc/icinga2/features-available/icingadb.conf`. You can update
|
|
||||||
the Redis credentials in this file.
|
|
||||||
|
|
||||||
All available attributes are explained in the
|
|
||||||
[IcingaDB object](09-object-types.md#objecttype-icingadb)
|
|
||||||
chapter.
|
|
||||||
|
|
||||||
You can enable the `icingadb` feature configuration file using
|
|
||||||
`icinga2 feature enable`:
|
|
||||||
|
|
||||||
```
|
|
||||||
# icinga2 feature enable icingadb
|
|
||||||
Module 'icingadb' was enabled.
|
|
||||||
Make sure to restart Icinga 2 for these changes to take effect.
|
|
||||||
```
|
|
||||||
|
|
||||||
Restart Icinga 2.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
systemctl restart icinga2
|
|
||||||
```
|
|
||||||
|
|
||||||
## Install Icinga Web 2
|
## Install Icinga Web 2
|
||||||
|
|
||||||
You are now ready to start the installation of Icinga Web 2. Please follow the
|
You are now ready to start the installation of Icinga Web 2. Please follow the
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 550 KiB |
Binary file not shown.
After Width: | Height: | Size: 517 KiB |
Binary file not shown.
After Width: | Height: | Size: 514 KiB |
Loading…
Reference in New Issue