Skip to content

Commit fa08f52

Browse files
dedemortonSteffen Siering
authored andcommitted
Backport doc changes into 5.0 (#2847)
* Clarify instructions for running configtest * Add to FAQ the solution for having nested JSON objects under Discovery (#2726) * docs: Fix broken Kibana doc link in faq (#2837) The Kibana docs overhaul for 5.0+ changed the link to the index pattern field refresh instructions. * Use variable for filepath plus some light edits (#2838)
1 parent 41d228e commit fa08f52

14 files changed

+79
-11
lines changed

filebeat/docs/getting-started.asciidoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,18 @@ output.elasticsearch:
139139
+
140140
If you are sending output to Logstash, see <<config-filebeat-logstash>> instead.
141141

142-
TIP: To test your configuration file, run Filebeat in the foreground with the following options specified:
143-
+./filebeat -configtest -e+.
142+
TIP: To test your configuration file, change to the directory where the Filebeat
143+
binary is installed, and run Filebeat in the foreground with the following
144+
options specified: +./filebeat -configtest -e+. Make sure your config files are
145+
in the path expected by Filebeat (see <<directory-layout>>). If you
146+
installed from DEB or RPM packages, run +./filebeat.sh -configtest -e+.
144147

145148
See <<filebeat-configuration-details>> for more details about each configuration option.
146149

147150
[[config-filebeat-logstash]]
148151
=== Step 3: Configuring Filebeat to Use Logstash
149152

153+
:allplatforms:
150154
include::../../libbeat/docs/shared-logstash-config.asciidoc[]
151155

152156
[[filebeat-template]]

filebeat/docs/index.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ include::../../libbeat/docs/shared-env-vars.asciidoc[]
3838

3939
include::./multiple-prospectors.asciidoc[]
4040

41+
:allplatforms:
4142
include::../../libbeat/docs/yaml.asciidoc[]
4243

4344
include::../../libbeat/docs/regexp.asciidoc[]

libbeat/docs/config-file-format.asciidoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,9 @@ simply uncomment the line and change the values.
355355
[float]
356356
==== Test Your Config File
357357

358-
You can test your configuration file to verify that the structure is valid. Simply run
359-
your in the foreground with the `-configtest` flag specified. For example:
358+
You can test your configuration file to verify that the structure is valid.
359+
Simply change to the directory where the binary is installed, and run
360+
your Beat in the foreground with the `-configtest` flag specified. For example:
360361

361362
["source","yaml",subs="attributes,callouts"]
362363
----------------------------------------------------------------------
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[float]
2+
[[refresh-index-pattern]]
3+
=== Fields show up as nested JSON in Kibana?
4+
5+
When {beatname_uc} exports a field of type dictionary, and the keys are not known in advance, the Discovery page in Kibana will display the field as a nested JSON object:
6+
7+
[source,shell]
8+
----------------------------------------------------------------------
9+
http.response.headers = {
10+
"content-length": 12,
11+
"content-type": "application/json"
12+
}
13+
----------------------------------------------------------------------
14+
To fix this you need to {kibanadoc}/index-patterns.html#reload-fields[reload the index pattern] in Kibana under the Management->Index Patterns, and the index pattern will be
15+
updated with a field for each key available in the dictionary:
16+
17+
[source,shell]
18+
----------------------------------------------------------------------
19+
http.response.headers.content-length = 12
20+
http.response.headers.content-type = "application/json"
21+
----------------------------------------------------------------------
22+
23+

libbeat/docs/shared-logstash-config.asciidoc

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,23 @@ Beats connections.
2929
For this configuration, you must <<load-template-manually,load the index template into Elasticsearch manually>>
3030
because the options for auto loading the template are only available for the Elasticsearch output.
3131

32-
TIP: To test your configuration file, run {beatname_uc} in the foreground with the following options specified:
33-
+./{beatname_lc} -configtest -e+.
32+
ifdef::allplatforms[]
33+
34+
TIP: To test your configuration file, change to the directory where the {beatname_uc}
35+
binary is installed, and run {beatname_uc} in the foreground with the following
36+
options specified: +./{beatname_lc} -configtest -e+. Make sure your config files are
37+
in the path expected by {beatname_uc} (see <<directory-layout>>). If you
38+
installed from DEB or RPM packages, run +./{beatname_lc}.sh -configtest -e+.
39+
40+
endif::allplatforms[]
41+
42+
ifdef::win[]
43+
44+
TIP: To test your configuration file, change to the directory where the {beatname_uc}
45+
binary is installed, and run {beatname_uc} in the foreground with the following
46+
options specified: +.\winlogbeat.exe -c .\winlogbeat.yml -configtest -e+.
47+
48+
endif::win[]
3449

3550
To use this configuration, you must also
3651
{libbeat}/logstash-installation.html#logstash-setup[set up Logstash] to receive events

libbeat/docs/yaml.asciidoc

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,28 @@ simply uncomment the line and change the setting.
3131
[float]
3232
=== Test Your Config File
3333

34-
You can test your configuration file to verify that the structure is valid. Simply run
34+
You can test your configuration file to verify that the structure is valid.
35+
Simply change to the directory where the binary is installed, and run
3536
{beatname_uc} in the foreground with the `-configtest` flag specified. For example:
3637

37-
["source","yaml",subs="attributes,callouts"]
38+
ifdef::allplatforms[]
39+
40+
["source","shell",subs="attributes"]
3841
----------------------------------------------------------------------
3942
{beatname_lc} -c {beatname_lc}.yml -configtest
4043
----------------------------------------------------------------------
4144

45+
endif::allplatforms[]
46+
47+
ifdef::win[]
48+
49+
["source","shell",subs="attributes"]
50+
----------------------------------------------------------------------
51+
.\winlogbeat.exe -c .\winlogbeat.yml -configtest -e
52+
----------------------------------------------------------------------
53+
54+
endif::win[]
55+
4256
You'll see a message if {beatname_uc} finds an error in the file.
4357

4458
[float]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[[config-metricbeat-logstash]]
22
== Configuring Metricbeat to Use Logstash
33

4+
:allplatforms:
45
include::../../libbeat/docs/shared-logstash-config.asciidoc[]

metricbeat/docs/index.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ include::./configuring-logstash.asciidoc[]
3535

3636
include::../../libbeat/docs/shared-env-vars.asciidoc[]
3737

38+
:allplatforms:
3839
include::../../libbeat/docs/yaml.asciidoc[]
3940

4041
include::../../libbeat/docs/regexp.asciidoc[]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[[config-packetbeat-logstash]]
22
== Configuring Packetbeat to Use Logstash
33

4+
:allplatforms:
45
include::../../libbeat/docs/shared-logstash-config.asciidoc[]

packetbeat/docs/faq.asciidoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,5 @@ option. However, keep in mind that very large timeout values can increase memory
7171
response messages are not sent.
7272

7373
include::../../libbeat/docs/faq-limit-bandwidth.asciidoc[]
74-
include::../../libbeat/docs/shared-faq.asciidoc[]
74+
include::../../libbeat/docs/shared-faq.asciidoc[]
75+
include::../../libbeat/docs/faq-refresh-index.asciidoc[]

0 commit comments

Comments
 (0)