Skip to content

Commit

Permalink
Add guess-timezone() to sources with epoch timestamps
Browse files Browse the repository at this point in the history
* Add the guess-timezone() flag to log paths that parse epoch timestamps.  Though epoch is timezone-free, it can be set incorrectly by the sending device and/or test tools.
  • Loading branch information
Mark Bonsack committed Feb 11, 2020
1 parent 930298d commit 4bd769c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion package/etc/conf.d/filters/cisco/meraki.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ parser p_cisco_meraki {
};
parser {
date-parser(format('%s')
template("${EPOCH}"));
template("${EPOCH}")
flags(guess-timezone)
);
};
};

Expand Down
8 changes: 6 additions & 2 deletions package/etc/conf.d/log_paths/lp-common_event_format.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ parser p_cef_header {
};

parser p_cef_ts_rt {
date-parser(format("%s") template("${.cef.rt}")
date-parser(format('%s')
template("${.cef.rt}")
flags(guess-timezone)
);
};
parser p_cef_ts_end {
date-parser(format("%s") template("${.cef.end}")
date-parser(format('%s')
template("${.cef.end}")
flags(guess-timezone)
);
};

Expand Down

0 comments on commit 4bd769c

Please sign in to comment.