Skip to content

Commit

Permalink
[filtermod] CEF time stamp (#612)
Browse files Browse the repository at this point in the history
False error caused when itterating through multiple time stamps
add support for fractional seconds
  • Loading branch information
Ryan Faircloth authored and GitHub committed Aug 7, 2020
1 parent c6f2408 commit 5531372
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 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,12 +16,12 @@ parser p_cef_header {
};

parser p_cef_ts_rt {
date-parser-nofilter(format('%s')
date-parser-nofilter(format('%s.%f','%s')
template("${.cef.rt}")
);
};
parser p_cef_ts_end {
date-parser-nofilter(format('%s')
date-parser-nofilter(format('%s.%f','%s')
template("${.cef.end}")
);
};
Expand Down Expand Up @@ -66,8 +66,14 @@ log {
# If we have an rt or end field that is best we use the If trick here so if this parser fails
# We don't get sent to fallback.
if {
filter{
match('^.', value('.cef.rt'))
};
parser (p_cef_ts_rt);
} elif {
filter{
match('^.', value('.cef.end'))
};
parser (p_cef_ts_end);
} else {
}; #Do nothing this is allows for both rt and end to be missing and still pass with the message ts
Expand Down

0 comments on commit 5531372

Please sign in to comment.