Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timezone parsing in iptables, mssql and panw modules #13926

Merged
merged 6 commits into from
Oct 8, 2019
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Fix conditions and error checking of date processors in ingest pipelines that use `event.timezone` to parse dates. {pull}13883[13883]
- Fix timezone parsing of logstash module ingest pipelines. {pull}13890[13890]
- cisco asa and ftd filesets: Fix parsing of message 106001. {issue}13891[13891] {pull}13903[13903]
- Fix timezone parsing of iptables, mssql and panw module ingest pipelines. {pull}13926[13926]

*Heartbeat*

Expand Down
12 changes: 8 additions & 4 deletions x-pack/filebeat/module/iptables/log/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,23 @@
},
{
"date": {
"if": "ctx.event.timezone == null",
"field": "iptables.raw_date",
"ignore_failure": true,
"formats": [
"MMM d HH:mm:ss",
"MMM dd HH:mm:ss"
]
],
"on_failure": [{"append": {"field": "error.message", "value": "{{ _ingest.on_failure_message }}"}}]
}
},
{
"date": {
"if": "ctx.event.timezone != null",
"field": "@timestamp",
"formats": ["ISO8601"],
"field": "iptables.raw_date",
"formats": [
"MMM d HH:mm:ss",
"MMM dd HH:mm:ss"
],
"timezone": "{{ event.timezone }}",
"on_failure": [{"append": {"field": "error.message", "value": "{{ _ingest.on_failure_message }}"}}]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"@timestamp": "2019-10-10T05:25:12.000-02:00",
"@timestamp": "2019-10-10T07:25:12.000-02:00",
"destination.ip": "10.4.0.5",
"destination.mac": "90:10:20:76:8d:20",
"destination.port": 443,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"@timestamp": "2019-01-08T01:37:09.000-02:00",
"@timestamp": "2019-01-08T03:37:09.000-02:00",
"destination.ip": "192.0.2.83",
"destination.mac": "90:10:28:5f:62:24",
"event.dataset": "iptables.log",
Expand Down
20 changes: 10 additions & 10 deletions x-pack/filebeat/module/iptables/log/test/iptables.log-expected.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"@timestamp": "2019-01-08T01:37:09.000-02:00",
"@timestamp": "2019-01-08T03:37:09.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 445,
Expand Down Expand Up @@ -35,7 +35,7 @@
]
},
{
"@timestamp": "2019-01-08T01:37:57.000-02:00",
"@timestamp": "2019-01-08T03:37:57.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 1433,
Expand Down Expand Up @@ -69,7 +69,7 @@
]
},
{
"@timestamp": "2019-01-08T01:38:45.000-02:00",
"@timestamp": "2019-01-08T03:38:45.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 445,
Expand Down Expand Up @@ -104,7 +104,7 @@
]
},
{
"@timestamp": "2019-01-08T01:39:25.000-02:00",
"@timestamp": "2019-01-08T03:39:25.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 80,
Expand Down Expand Up @@ -139,7 +139,7 @@
]
},
{
"@timestamp": "2019-01-08T01:40:21.000-02:00",
"@timestamp": "2019-01-08T03:40:21.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 445,
Expand Down Expand Up @@ -174,7 +174,7 @@
]
},
{
"@timestamp": "2019-01-08T01:40:25.000-02:00",
"@timestamp": "2019-01-08T03:40:25.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 445,
Expand Down Expand Up @@ -208,7 +208,7 @@
]
},
{
"@timestamp": "2019-01-08T01:41:17.000-02:00",
"@timestamp": "2019-01-08T03:41:17.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 445,
Expand Down Expand Up @@ -243,7 +243,7 @@
]
},
{
"@timestamp": "2019-01-08T01:41:23.000-02:00",
"@timestamp": "2019-01-08T03:41:23.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 445,
Expand Down Expand Up @@ -278,7 +278,7 @@
]
},
{
"@timestamp": "2019-01-08T01:43:18.000-02:00",
"@timestamp": "2019-01-08T03:43:18.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 139,
Expand Down Expand Up @@ -312,7 +312,7 @@
]
},
{
"@timestamp": "2019-01-08T01:43:42.000-02:00",
"@timestamp": "2019-01-08T03:43:42.000-02:00",
"destination.ip": "172.16.54.114",
"destination.mac": "90:10:35:5a:1e:3a",
"destination.port": 8088,
Expand Down
22 changes: 11 additions & 11 deletions x-pack/filebeat/module/iptables/log/test/ipv6.log-expected.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"@timestamp": "2019-01-22T07:05:05.000-02:00",
"@timestamp": "2019-01-22T09:05:05.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -28,7 +28,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:05.000-02:00",
"@timestamp": "2019-01-22T09:05:05.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -56,7 +56,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:06.000-02:00",
"@timestamp": "2019-01-22T09:05:06.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -84,7 +84,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:06.000-02:00",
"@timestamp": "2019-01-22T09:05:06.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -112,7 +112,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:07.000-02:00",
"@timestamp": "2019-01-22T09:05:07.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -140,7 +140,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:07.000-02:00",
"@timestamp": "2019-01-22T09:05:07.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -168,7 +168,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:08.000-02:00",
"@timestamp": "2019-01-22T09:05:08.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -196,7 +196,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:08.000-02:00",
"@timestamp": "2019-01-22T09:05:08.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -224,7 +224,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:09.000-02:00",
"@timestamp": "2019-01-22T09:05:09.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -252,7 +252,7 @@
]
},
{
"@timestamp": "2019-01-22T07:05:09.000-02:00",
"@timestamp": "2019-01-22T09:05:09.000-02:00",
"destination.ip": "2001:0db8:0000:0000:0000:0000:0000:0002",
"event.dataset": "iptables.log",
"event.module": "iptables",
Expand Down Expand Up @@ -280,7 +280,7 @@
]
},
{
"@timestamp": "2019-01-22T08:52:34.000-02:00",
"@timestamp": "2019-01-22T10:52:34.000-02:00",
"destination.ip": "ff02:0000:0000:0000:0000:0000:0000:0016",
"destination.mac": "90:10:12:34:56:78",
"event.dataset": "iptables.log",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"@timestamp": "2019-01-05T18:17:05.000-02:00",
"@timestamp": "2019-01-05T20:17:05.000-02:00",
"destination.ip": "255.55.174.225",
"destination.mac": "90:10:92:6e:ea:a7",
"destination.port": 48689,
Expand Down Expand Up @@ -35,7 +35,7 @@
]
},
{
"@timestamp": "2019-01-05T18:17:01.000-02:00",
"@timestamp": "2019-01-05T20:17:01.000-02:00",
"destination.ip": "192.0.2.25",
"destination.mac": "90:10:20:76:8d:20",
"destination.port": 443,
Expand Down Expand Up @@ -73,7 +73,7 @@
]
},
{
"@timestamp": "2019-01-05T18:17:01.000-02:00",
"@timestamp": "2019-01-05T20:17:01.000-02:00",
"destination.ip": "192.0.2.25",
"destination.mac": "90:10:20:76:8d:20",
"destination.port": 1443,
Expand Down Expand Up @@ -113,7 +113,7 @@
]
},
{
"@timestamp": "2019-01-05T18:17:01.000-02:00",
"@timestamp": "2019-01-05T20:17:01.000-02:00",
"destination.ip": "192.0.2.25",
"destination.mac": "90:10:20:76:8d:20",
"destination.port": 1443,
Expand Down Expand Up @@ -151,7 +151,7 @@
]
},
{
"@timestamp": "2019-01-05T18:17:01.000-02:00",
"@timestamp": "2019-01-05T20:17:01.000-02:00",
"destination.ip": "192.0.2.25",
"destination.mac": "90:10:20:76:8d:20",
"destination.port": 1443,
Expand Down
8 changes: 4 additions & 4 deletions x-pack/filebeat/module/mssql/log/ingest/pipeline.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
},
{
"date": {
"if": "ctx.event.timezone == null",
"field": "date",
"target_field": "@timestamp",
"formats": ["yyyy-MM-dd HH:mm:ss.SS"],
"ignore_failure": true
"on_failure": [{"append": {"field": "error.message", "value": "{{ _ingest.on_failure_message }}"}}]
}
},
{
"date": {
"if": "ctx.event.timezone != null",
"field": "@timestamp",
"formats": ["ISO8601"],
"field": "date",
"formats": ["yyyy-MM-dd HH:mm:ss.SS"],
"timezone": "{{ event.timezone }}",
"on_failure": [{"append": {"field": "error.message", "value": "{{ _ingest.on_failure_message }}"}}]
}
Expand Down
Loading