Change 33624

russell_jackson (Russell C. Jackson (Rusty))
Russell C. Jackson (Rusty) committed this change into //guest/russell_jackson/sdp/Server/Unix/p4/common/bin
Request Review
Download .zip
sdp_structured_log.sh: force colon-separated UTC offset in timestamps

date -Iseconds does not reliably include a colon in the UTC offset -
confirmed live (5332stage.p4one.ea.com): GNU coreutils 8.22 (RHEL7-family,
still in the field) emits +0000, not +00:00. telegraf's json_time_format
for the *.jsonl tail input (perforceone.j2, gce_telegraf) uses the Go
layout "...Z07:00", which requires the colon and silently drops any
line without it - every bash-sourced *.jsonl line (update_limits.sh
siblings, run_if_master.sh, verify_shelves.sh, rotate_journal.sh, etc.)
was being rejected as a malformed log line, so none of this data ever
reached ADX. Python-sourced *.jsonl (update_limits.py, via
datetime.isoformat()) already emitted the colon correctly and was
unaffected. Now forces %:z explicitly instead of relying on -Iseconds.
  • Files 1
  • Comments 0
1 edited 0 added 0 deleted
sdp_structured_log.sh#4
Loading...
Tip: Use n and p to cycle through the changes.