mirror of https://github.com/Icinga/icinga2.git
Merge pull request #6979 from Icinga/bugfix/systemd-upper-case
Doc: write systemd lower-case
This commit is contained in:
commit
6d0431b0b2
|
@ -216,8 +216,8 @@ By default Icinga 2 uses the following files and directories:
|
||||||
Path | Description
|
Path | Description
|
||||||
----------------------------------------------|------------------------------------
|
----------------------------------------------|------------------------------------
|
||||||
/etc/icinga2 | Contains Icinga 2 configuration files.
|
/etc/icinga2 | Contains Icinga 2 configuration files.
|
||||||
/usr/lib/systemd/system/icinga2.service | The Icinga 2 Systemd service file on systems using Systemd.
|
/usr/lib/systemd/system/icinga2.service | The Icinga 2 systemd service file on systems using systemd.
|
||||||
/etc/systemd/system/icinga2.service.d/limits.conf | On distributions with Systemd >227, additional service limits are required.
|
/etc/systemd/system/icinga2.service.d/limits.conf | On distributions with systemd >227, additional service limits are required.
|
||||||
/etc/init.d/icinga2 | The Icinga 2 init script on systems using SysVinit or OpenRC.
|
/etc/init.d/icinga2 | The Icinga 2 init script on systems using SysVinit or OpenRC.
|
||||||
/usr/sbin/icinga2 | Shell wrapper for the Icinga 2 binary.
|
/usr/sbin/icinga2 | Shell wrapper for the Icinga 2 binary.
|
||||||
/usr/lib\*/icinga2 | Libraries and the Icinga 2 binary (use `find /usr -type f -name icinga2` to locate the binary path).
|
/usr/lib\*/icinga2 | Libraries and the Icinga 2 binary (use `find /usr -type f -name icinga2` to locate the binary path).
|
||||||
|
@ -336,10 +336,10 @@ to determine where to find the plugin binaries.
|
||||||
|
|
||||||
### Systemd Service <a id="systemd-service"></a>
|
### Systemd Service <a id="systemd-service"></a>
|
||||||
|
|
||||||
Some distributions (e.g. Fedora, openSUSE and RHEL/CentOS 7) use Systemd. The
|
Some distributions (e.g. Fedora, openSUSE and RHEL/CentOS 7) use systemd. The
|
||||||
Icinga 2 packages automatically install the necessary Systemd unit files.
|
Icinga 2 packages automatically install the necessary systemd unit files.
|
||||||
|
|
||||||
The Icinga 2 Systemd service can be (re-)started, reloaded, stopped and also
|
The Icinga 2 systemd service can be (re-)started, reloaded, stopped and also
|
||||||
queried for its current status.
|
queried for its current status.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -388,7 +388,7 @@ If you're stuck with configuration errors, you can manually invoke the
|
||||||
|
|
||||||
> **Tip**
|
> **Tip**
|
||||||
>
|
>
|
||||||
> If you are running into fork errors with Systemd enabled distributions,
|
> If you are running into fork errors with systemd enabled distributions,
|
||||||
> please check the [troubleshooting chapter](15-troubleshooting.md#check-fork-errors).
|
> please check the [troubleshooting chapter](15-troubleshooting.md#check-fork-errors).
|
||||||
|
|
||||||
### Init Script <a id="init-script"></a>
|
### Init Script <a id="init-script"></a>
|
||||||
|
|
|
@ -498,7 +498,7 @@ Solution:
|
||||||
|
|
||||||
### Check Fork Errors <a id="check-fork-errors"></a>
|
### Check Fork Errors <a id="check-fork-errors"></a>
|
||||||
|
|
||||||
Newer versions of Systemd on Linux limit spawned processes for
|
Newer versions of systemd on Linux limit spawned processes for
|
||||||
services.
|
services.
|
||||||
|
|
||||||
* v227 introduces the `TasksMax` setting to units which allows to specify the spawned process limit.
|
* v227 introduces the `TasksMax` setting to units which allows to specify the spawned process limit.
|
||||||
|
@ -506,7 +506,7 @@ services.
|
||||||
* v231 changes the default value to 15%
|
* v231 changes the default value to 15%
|
||||||
|
|
||||||
This can cause problems with Icinga 2 in large environments with many
|
This can cause problems with Icinga 2 in large environments with many
|
||||||
commands executed in parallel starting with Systemd v228. Some distributions
|
commands executed in parallel starting with systemd v228. Some distributions
|
||||||
also may have changed the defaults.
|
also may have changed the defaults.
|
||||||
|
|
||||||
The error message could look like this:
|
The error message could look like this:
|
||||||
|
@ -534,16 +534,16 @@ An example is available inside the GitHub repository in [etc/initsystem](https:/
|
||||||
External Resources:
|
External Resources:
|
||||||
|
|
||||||
* [Fork limit for cgroups](https://lwn.net/Articles/663873/)
|
* [Fork limit for cgroups](https://lwn.net/Articles/663873/)
|
||||||
* [Systemd changelog](https://github.com/systemd/systemd/blob/master/NEWS)
|
* [systemd changelog](https://github.com/systemd/systemd/blob/master/NEWS)
|
||||||
* [Icinga 2 upstream issue](https://github.com/Icinga/icinga2/issues/5611)
|
* [Icinga 2 upstream issue](https://github.com/Icinga/icinga2/issues/5611)
|
||||||
* [Systemd upstream discussion](https://github.com/systemd/systemd/issues/3211)
|
* [systemd upstream discussion](https://github.com/systemd/systemd/issues/3211)
|
||||||
|
|
||||||
### Systemd Watchdog <a id="check-systemd-watchdog"></a>
|
### Systemd Watchdog <a id="check-systemd-watchdog"></a>
|
||||||
|
|
||||||
Usually Icinga 2 is a mission critical part of infrastructure and should be
|
Usually Icinga 2 is a mission critical part of infrastructure and should be
|
||||||
online at all times. In case of a recoverable crash (e.g. OOM) you may want to
|
online at all times. In case of a recoverable crash (e.g. OOM) you may want to
|
||||||
restart Icinga 2 automatically. With Systemd it is as easy as overriding some
|
restart Icinga 2 automatically. With systemd it is as easy as overriding some
|
||||||
settings of the Icinga 2 Systemd service by creating
|
settings of the Icinga 2 systemd service by creating
|
||||||
`/etc/systemd/system/icinga2.service.d/override.conf` with the following
|
`/etc/systemd/system/icinga2.service.d/override.conf` with the following
|
||||||
content:
|
content:
|
||||||
|
|
||||||
|
@ -557,12 +557,12 @@ Using the watchdog can also help with monitoring Icinga 2, to activate and use i
|
||||||
|
|
||||||
WatchdogSec=30s
|
WatchdogSec=30s
|
||||||
|
|
||||||
This way Systemd will kill Icinga 2 if does not notify for over 30 seconds, a timout of less than 10 seconds is not
|
This way systemd will kill Icinga 2 if does not notify for over 30 seconds, a timout of less than 10 seconds is not
|
||||||
recommended. When the watchdog is activated, `Restart=` can be set to `watchdog` to restart Icinga 2 in the case of a
|
recommended. When the watchdog is activated, `Restart=` can be set to `watchdog` to restart Icinga 2 in the case of a
|
||||||
watchdog timeout.
|
watchdog timeout.
|
||||||
|
|
||||||
Run `systemctl daemon-reload && systemctl restart icinga2` to apply the changes.
|
Run `systemctl daemon-reload && systemctl restart icinga2` to apply the changes.
|
||||||
Now Systemd will always try to restart Icinga 2 (except if you run
|
Now systemd will always try to restart Icinga 2 (except if you run
|
||||||
`systemctl stop icinga2`). After three failures in ten seconds it will stop
|
`systemctl stop icinga2`). After three failures in ten seconds it will stop
|
||||||
trying because you probably have a problem that requires manual intervention.
|
trying because you probably have a problem that requires manual intervention.
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ sane compile-time defaults.
|
||||||
> your changes.
|
> your changes.
|
||||||
|
|
||||||
There is a bug with existing sysconfig files where path variables are not expanded
|
There is a bug with existing sysconfig files where path variables are not expanded
|
||||||
because Systemd [does not support](https://github.com/systemd/systemd/issues/2123)
|
because systemd [does not support](https://github.com/systemd/systemd/issues/2123)
|
||||||
shell variable expansion. This worked with SysVInit though.
|
shell variable expansion. This worked with SysVInit though.
|
||||||
|
|
||||||
Edit the sysconfig file and either remove everything, or edit this line
|
Edit the sysconfig file and either remove everything, or edit this line
|
||||||
|
@ -187,7 +187,7 @@ vim /etc/sysconfig/icinga2
|
||||||
ICINGA2_RLIMIT_FILES=50000
|
ICINGA2_RLIMIT_FILES=50000
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart Icinga 2 afterwards, the Systemd service file automatically puts the
|
Restart Icinga 2 afterwards, the systemd service file automatically puts the
|
||||||
value into the application's environment where this is read on startup.
|
value into the application's environment where this is read on startup.
|
||||||
|
|
||||||
### Setup Wizard Changes <a id="upgrading-to-2-9-setup-wizard-changes"></a>
|
### Setup Wizard Changes <a id="upgrading-to-2-9-setup-wizard-changes"></a>
|
||||||
|
|
|
@ -1099,8 +1099,8 @@ Icinga application using a dist tarball (including notes for distributions):
|
||||||
- Alpine: boost-dev
|
- Alpine: boost-dev
|
||||||
* GNU bison (bison)
|
* GNU bison (bison)
|
||||||
* GNU flex (flex) >= 2.5.35
|
* GNU flex (flex) >= 2.5.35
|
||||||
* Systemd headers
|
* systemd headers
|
||||||
- Only required when using Systemd
|
- Only required when using systemd
|
||||||
- Debian/Ubuntu: libsystemd-dev
|
- Debian/Ubuntu: libsystemd-dev
|
||||||
- RHEL/Fedora: systemd-devel
|
- RHEL/Fedora: systemd-devel
|
||||||
|
|
||||||
|
@ -1441,13 +1441,13 @@ Usage: /etc/init.d/icinga2 {start|stop|restart|reload|checkconfig|status}
|
||||||
|
|
||||||
#### Systemd <a id="development-package-builds-systemd"></a>
|
#### Systemd <a id="development-package-builds-systemd"></a>
|
||||||
|
|
||||||
If your distribution uses Systemd:
|
If your distribution uses systemd:
|
||||||
|
|
||||||
```
|
```
|
||||||
systemctl {start|stop|reload|status|enable|disable} icinga2
|
systemctl {start|stop|reload|status|enable|disable} icinga2
|
||||||
```
|
```
|
||||||
|
|
||||||
In case the distribution is running Systemd >227, you'll also
|
In case the distribution is running systemd >227, you'll also
|
||||||
need to package and install the `etc/initsystem/icinga2.service.limits.conf`
|
need to package and install the `etc/initsystem/icinga2.service.limits.conf`
|
||||||
file into `/etc/systemd/system/icinga2.service.d`.
|
file into `/etc/systemd/system/icinga2.service.d`.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue