Skip to content

Commit

Permalink
[docs] Use beatname_pkg variable to resolve package name (elastic#18423)
Browse files Browse the repository at this point in the history
  • Loading branch information
dedemorton authored May 11, 2020
1 parent 2d7c9d5 commit f550590
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions libbeat/docs/shared-systemd.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ systemd. On these systems, you can manage {beatname_uc} by using the usual
systemd commands.

ifdef::apm-server[]
We recommend that the {beatname_lc} process is run as a non-root user.
We recommend that the {beatname_pkg} process is run as a non-root user.
Therefore, that is the default setup for {beatname_uc}'s DEB package and RPM installation.
endif::apm-server[]

Expand All @@ -16,25 +16,25 @@ Use `systemctl` to start or stop {beatname_uc}:

["source", "sh", subs="attributes"]
------------------------------------------------
sudo systemctl start {beatname_lc}
sudo systemctl start {beatname_pkg}
------------------------------------------------

["source", "sh", subs="attributes"]
------------------------------------------------
sudo systemctl stop {beatname_lc}
sudo systemctl stop {beatname_pkg}
------------------------------------------------

By default, the {beatname_uc} service starts automatically when the system
boots. To enable or disable auto start use:

["source", "sh", subs="attributes"]
------------------------------------------------
sudo systemctl enable {beatname_lc}
sudo systemctl enable {beatname_pkg}
------------------------------------------------

["source", "sh", subs="attributes"]
------------------------------------------------
sudo systemctl disable {beatname_lc}
sudo systemctl disable {beatname_pkg}
------------------------------------------------


Expand All @@ -44,14 +44,14 @@ To get the service status, use `systemctl`:

["source", "sh", subs="attributes"]
------------------------------------------------
systemctl status {beatname_lc}
systemctl status {beatname_pkg}
------------------------------------------------

Logs are stored by default in journald. To view the Logs, use `journalctl`:

["source", "sh", subs="attributes"]
------------------------------------------------
journalctl -u {beatname_lc}.service
journalctl -u {beatname_pkg}.service
------------------------------------------------

[float]
Expand All @@ -69,10 +69,10 @@ override to change the default options.
|=======================================

To override these variables, create a drop-in unit file in the
+/etc/systemd/system/{beatname_lc}.service.d+ directory.
+/etc/systemd/system/{beatname_pkg}.service.d+ directory.

For example a file with the following content placed in
+/etc/systemd/system/{beatname_lc}.service.d/debug.conf+
+/etc/systemd/system/{beatname_pkg}.service.d/debug.conf+
would override `BEAT_LOG_OPTS` to enable debug for Elasticsearch output.

["source", "systemd", subs="attributes"]
Expand All @@ -87,12 +87,12 @@ the service:
["source", "sh", subs="attributes"]
------------------------------------------------
systemctl daemon-reload
systemctl restart {beatname_lc}
systemctl restart {beatname_pkg}
------------------------------------------------

NOTE: It is recommended that you use a configuration management tool to
include drop-in unit files. If you need to add a drop-in manually, use
+systemctl edit {beatname_lc}.service+.
+systemctl edit {beatname_pkg}.service+.

ifdef::apm-server[]
include::{docdir}/config-ownership.asciidoc[]
Expand Down

0 comments on commit f550590

Please sign in to comment.