Skip to content

Commit

Permalink
Ignore timestamp in redis, haproxy and system filebeat module (elasti…
Browse files Browse the repository at this point in the history
…c#9855)

* Ignore timestamp in redis, haproxy and system filebeat module

* Fixing formatting
  • Loading branch information
kaiyan-sheng authored Jan 2, 2019
1 parent 2cd7c42 commit b9a20f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion filebeat/tests/system/test_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def _test_expected_events(self, test_file, objects):

for ev in expected:
found = False
clean_keys(ev)
for obj in objects:

# Flatten objects for easier comparing
Expand All @@ -204,7 +205,9 @@ def clean_keys(obj):
delete_key(obj, key)

# Remove timestamp for comparison where timestamp is not part of the log line
if obj["event.module"] == "icinga" and obj["event.dataset"] == "startup":
if (obj["event.module"] == "icinga" and obj["event.dataset"] == "startup") or \
(obj["event.module"] in ["redis", "haproxy"] and obj["event.dataset"] == "log") or \
(obj["event.module"] == "system" and obj["event.dataset"] in ["auth", "syslog"]):
delete_key(obj, "@timestamp")


Expand Down

0 comments on commit b9a20f7

Please sign in to comment.