Skip to content

Graylog pipeline to take an incoming UNIX timestamp and convert it, then overwrite the message timestamp with it

Notifications You must be signed in to change notification settings

globalspec-it/graylog-UNIX-to-timestamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

graylog-UNIX-to-timestamp

Description

A pipeline rule for graylog that takes incoming field "requestStartDateTime" which is in UNIX format and converts it to a graylog compatible format, then overwrites the original messages "timestamp" field with this time instead.

Usage

This works great for fetching logfiles from a CDN provider for example because they typically come delayed and this restores the original timestamp based on the web hit vs. when the log was fetched from the message queue.

Caveats

This example is setup for a UNIX timestamp that only contains only seconds precision. If the source UNIX time is for milliseconds and you want to keep that level of precision you will need to make changes to restore that starting with eliminating the "substring(ts, 0, -3);"

About

Graylog pipeline to take an incoming UNIX timestamp and convert it, then overwrite the message timestamp with it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published