Skip to content

Commit

Permalink
Add warning for logging configuration on systemd (#12577) (#12662)
Browse files Browse the repository at this point in the history
Since 7.0 we add the `-e` flag to all beats from the systemd unit file.
This make them to log to stderr on systems with systemd, what is the
recommended behaviour on these systems, so local logs are managed by
journald. This creates some confusion as the added flags make beats
ignore other output settings added to the configuration files.
Add a new warning in the logging configuration page about this.

(cherry picked from commit a6cd5e8)
  • Loading branch information
jsoriano committed Jun 25, 2019
1 parent aad4daf commit 8620da8
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 2 deletions.
3 changes: 3 additions & 0 deletions auditbeat/auditbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1093,6 +1093,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions heartbeat/heartbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1237,6 +1237,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions journalbeat/journalbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions libbeat/_meta/config.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
13 changes: 13 additions & 0 deletions libbeat/docs/loggingconfig.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ endif::win_only[]
TIP: In addition to setting logging options in the config file, you can modify
the logging output configuration from the command line. See
<<command-line-options>>.

ifndef::win_only[]
WARNING: When {beatname_uc} is running on a Linux system with systemd, it uses
by default the `-e` command line option, that makes it write all the logging output
to stderr so it can be captured by journald. Other outputs are disabled. See
<<running-with-systemd>> to know more and learn how to change this.
endif::win_only[]
endif::serverless[]

ifdef::serverless[]
Expand Down Expand Up @@ -77,6 +84,12 @@ You can specify the following options in the `logging` section of the
+{beatname_lc}.yml+ config file:

ifndef::serverless[]
[float]
==== `logging.to_stderr`

When true, writes all logging output to standard error output. This is
equivalent to using the `-e` command line option.

[float]
==== `logging.to_syslog`

Expand Down
4 changes: 2 additions & 2 deletions libbeat/docs/shared-systemd.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ would override `BEAT_LOG_OPTS` to enable debug for Elasticsearch output.
Environment="BEAT_LOG_OPTS=-e -d elasticsearch"
------------------------------------------------

To use settings from the {beatname_uc} file, empty the environment
variable. For example:
To change the logging output from the {beatname_uc} configuration file, empty
the environment variable. For example:

["source", "systemd", subs="attributes"]
------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1691,6 +1691,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions packetbeat/packetbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions winlogbeat/winlogbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1010,6 +1010,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions x-pack/auditbeat/auditbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions x-pack/filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions x-pack/functionbeat/functionbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down
3 changes: 3 additions & 0 deletions x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1710,6 +1710,9 @@ setup.kibana:
# Multiple selectors can be chained.
#logging.selectors: [ ]

# Send all logging output to stderr. The default is false.
#logging.to_stderr: false

# Send all logging output to syslog. The default is false.
#logging.to_syslog: false

Expand Down

0 comments on commit 8620da8

Please sign in to comment.