Skip to content

Commit b61b644

Browse files
committed
Disable host.* fields by default for Cisco module (elastic#18753)
For the Cisco module when data is forwarded to Filebeat from another host/device (this is most of the time) you don't want Filebeat to add `host`. So by default this modules add a `forwarded` tag to events. If you configure the module to not include the `forwarded` tag (e.g. `var.tags: [my_tag]`) then Filebeat will add the `host.*` fields. Relates: elastic#13920 (cherry picked from commit 047a35b)
1 parent 4d30c52 commit b61b644

27 files changed

+1003
-486
lines changed

CHANGELOG.next.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
3838
- Improve ECS field mappings in panw module. event.outcome now only contains success/failure per ECS specification. {issue}16025[16025] {pull}17910[17910]
3939
- Improve ECS categorization field mappings for nginx module. http.request.referrer only populated when nginx sets a value {issue}16174[16174] {pull}17844[17844]
4040
- Improve ECS field mappings in santa module. move hash.sha256 to process.hash.sha256 & move certificate fields to santa.certificate . {issue}16180[16180] {pull}17982[17982]
41+
- With the default configuration the following modules will no longer send the `host`
42+
field. You can revert this change by configuring tags for the module and omitting
43+
`forwarded` from the list. {issue}13920[13920]
44+
* Cisco {pull}18753[18753]
4145
- Preserve case of http.request.method. ECS prior to 1.6 specified normalizing to lowercase, which lost information. Affects filesets: apache/access, elasticsearch/audit, iis/access, iis/error, nginx/access, nginx/ingress_controller, aws/elb, suricata/eve, zeek/http. {issue}18154[18154] {pull}18359[18359]
4246

4347
*Heartbeat*

filebeat/docs/modules/cisco.asciidoc

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ Set to 0.0.0.0 to bind to all available interfaces.
104104

105105
The UDP port to listen for syslog traffic. Defaults to 9001.
106106

107+
*`var.tags`*::
108+
109+
A list of tags to include in events. Including `forwarded` indicates that the
110+
events did not originate on this host and causes `host.name` to not be added to
111+
events. Defaults to `[cisco-asa, forwarded]`.
112+
107113
:has-dashboards!:
108114

109115
:fileset_ex!:
@@ -246,6 +252,12 @@ Set to 0.0.0.0 to bind to all available interfaces.
246252

247253
The UDP port to listen for syslog traffic. Defaults to 9003.
248254

255+
*`var.tags`*::
256+
257+
A list of tags to include in events. Including `forwarded` indicates that the
258+
events did not originate on this host and causes `host.name` to not be added to
259+
events. Defaults to `[cisco-ftd, forwarded]`.
260+
249261
:has-dashboards!:
250262

251263
:fileset_ex!:
@@ -277,6 +289,12 @@ Set to 0.0.0.0 to bind to all available interfaces.
277289

278290
The UDP port to listen for syslog traffic. Defaults to 9002.
279291

292+
*`var.tags`*::
293+
294+
A list of tags to include in events. Including `forwarded` indicates that the
295+
events did not originate on this host and causes `host.name` to not be added to
296+
events. Defaults to `[cisco-ios, forwarded]`.
297+
280298
include::../include/timezone-support.asciidoc[]
281299

282300
:has-dashboards!:
@@ -287,10 +305,10 @@ include::../include/timezone-support.asciidoc[]
287305
[[dynamic-script-compilations]]
288306
=== Dynamic Script Compilations
289307

290-
The `asa` and `ftd` filesets are based on Elasticsearch ingest pipelines and
291-
make extensive use of script processors and painless conditions. This can cause
308+
The `asa` and `ftd` filesets are based on Elasticsearch ingest pipelines and
309+
make extensive use of script processors and painless conditions. This can cause
292310
the pipelines to fail loading the first time the module is used, due to exceeding
293-
the maximum script compilation limits. It is recommended to tune the following
311+
the maximum script compilation limits. It is recommended to tune the following
294312
parameters on your Elasticsearch cluster:
295313

296314
- {ref}/circuit-breaker.html#script-compilation-circuit-breaker[script.max_compilations_rate]:

x-pack/filebeat/module/cisco/_meta/docs.asciidoc

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ Set to 0.0.0.0 to bind to all available interfaces.
9999

100100
The UDP port to listen for syslog traffic. Defaults to 9001.
101101

102+
*`var.tags`*::
103+
104+
A list of tags to include in events. Including `forwarded` indicates that the
105+
events did not originate on this host and causes `host.name` to not be added to
106+
events. Defaults to `[cisco-asa, forwarded]`.
107+
102108
:has-dashboards!:
103109

104110
:fileset_ex!:
@@ -241,6 +247,12 @@ Set to 0.0.0.0 to bind to all available interfaces.
241247

242248
The UDP port to listen for syslog traffic. Defaults to 9003.
243249

250+
*`var.tags`*::
251+
252+
A list of tags to include in events. Including `forwarded` indicates that the
253+
events did not originate on this host and causes `host.name` to not be added to
254+
events. Defaults to `[cisco-ftd, forwarded]`.
255+
244256
:has-dashboards!:
245257

246258
:fileset_ex!:
@@ -272,6 +284,12 @@ Set to 0.0.0.0 to bind to all available interfaces.
272284

273285
The UDP port to listen for syslog traffic. Defaults to 9002.
274286

287+
*`var.tags`*::
288+
289+
A list of tags to include in events. Including `forwarded` indicates that the
290+
events did not originate on this host and causes `host.name` to not be added to
291+
events. Defaults to `[cisco-ios, forwarded]`.
292+
275293
include::../include/timezone-support.asciidoc[]
276294

277295
:has-dashboards!:
@@ -282,10 +300,10 @@ include::../include/timezone-support.asciidoc[]
282300
[[dynamic-script-compilations]]
283301
=== Dynamic Script Compilations
284302

285-
The `asa` and `ftd` filesets are based on Elasticsearch ingest pipelines and
286-
make extensive use of script processors and painless conditions. This can cause
303+
The `asa` and `ftd` filesets are based on Elasticsearch ingest pipelines and
304+
make extensive use of script processors and painless conditions. This can cause
287305
the pipelines to fail loading the first time the module is used, due to exceeding
288-
the maximum script compilation limits. It is recommended to tune the following
306+
the maximum script compilation limits. It is recommended to tune the following
289307
parameters on your Elasticsearch cluster:
290308

291309
- {ref}/circuit-breaker.html#script-compilation-circuit-breaker[script.max_compilations_rate]:

x-pack/filebeat/module/cisco/asa/config/input.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ exclude_files: [".gz$"]
1515

1616
{{ end }}
1717

18-
tags: {{.tags}}
18+
tags: {{.tags | tojson}}
19+
publisher_pipeline.disable_host: {{ inList .tags "forwarded" }}
1920

2021
processors:
2122
- add_locale: ~

x-pack/filebeat/module/cisco/asa/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var:
55
default:
66
- /var/log/cisco-asa.log
77
- name: tags
8-
default: [cisco-asa]
8+
default: [cisco-asa, forwarded]
99
- name: syslog_host
1010
default: localhost
1111
- name: syslog_port

0 commit comments

Comments
 (0)