Skip to content

Commit

Permalink
Remove test for alternat timestamp
Browse files Browse the repository at this point in the history
* Remove gomplate env var test for alternate timestamp and combine into one date-parser() call
  • Loading branch information
Mark Bonsack committed Mar 8, 2020
1 parent c09da8f commit 760b672
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions package/etc/conf.d/log_paths/lp-paloalto_panos.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@ log {
prefix(".pan.")
delimiters(',')
);

#2012/04/10 04:39:55
#parse the date
date-parser(
{{- if (conv.ToBool (getenv "SC4S_SOURCE_FF_PALOALTO_PANOS_TIME_MS")) }}
format("%Y/%m/%d %H:%M:%S.%f")
{{- else}}
format("%Y/%m/%d %H:%M:%S")
{{- end}}

date-parser(format(
'%Y/%m/%d %H:%M:%S.%f',
'%Y/%m/%d %H:%M:%S'
)
template("${.pan.GeneratedTime}")
time-zone({{- getenv "SC4S_DEFAULT_TIMEZONE" "GMT"}})
flags(guess-timezone)
Expand Down

0 comments on commit 760b672

Please sign in to comment.