Getting Data In

GeoJSON data has timezone expressed in minutes offset from UTC

splunk_zen
Builder

Trying to consume some seismic data which input has a timestamp expressed in epoch time, but a timezone offset field expressed in

[-1200, +1200]
Description
Timezone offset from UTC in minutes at the event epicenter.

the offset above has no correlation with the known props.conf TIME_FORMAT's timezones

%z  UTC offset in the form +HHMM 

Was thinking about setting up a custom datetime.xml but couldn't find any "extract=" variable there meant to grab offsets,
couldn't find the python module which parses datetime.xml either

How should we approach this?

Tags (3)
0 Karma

acharlieh
Influencer

Is this the format specification of the data you're working with?

If so then you don't need any translation as the time field is already milliseconds since the UTC epoch. The tz field can be used at search time to help group events based on the local time, but per the spec doesn't seem to be needed for parsing events into Splunk correctly.

You could use a props.conf setting to say TIME_FORMAT = %s%3N although this might change slightly (and deployment may change slightly) depending on if you're using INDEXED_EXTRACTIONS, and thus could specify the field that contains the time or not.

splunk_zen
Builder

Yes acharlieh, wanted to help a colleague which came up with this question and got carried away with the redundant offset. epoch is UTC so already provides time trustability
Yep either setting this with a TIME_PREFIX and TIME_FORMAT combo or setting JSON INDEXED_EXTRACTIONS and TIMESTAMP_FIELDS = time

DalJeanis
Legend

You already have local epoch time.

Perhaps just add them together (or delta them, whichever works accurately) to calculate UTC epoch time.

splunk_zen
Builder

Thanks DalJeanis,
Think I jumped the gun when I saw the offset and thus got confused
If we already have epoch (meaning UTC), we already have the real time the event happened

Was concerned about getting _time correct during indexing but UTC already ensures that

0 Karma

DalJeanis
Legend

... that makes more sense.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...