Getting Data In

multiple timezone in syslog events

EricPartington
Communicator

I am trying to extract the correct timezone and time from the syslog event below.

 Jun 28 17:32:44 10.xxx.xx.240 Jun 28 21:32:44 SRXXXXXC2 auditd: date="Jun 28 21:32:44 2011 UTC",fac=f_http

The timestamp that I want to extract is the one that starts with date="
The first date is EST from the splunk server, the next two are from the firewall (both in UTC)
Some firewalls have the second timestamp in EST, but the third date is always UTC

I have this in my props.conf file

[maaaa_firewall]
TIME_PREFIX = date="
MAX_TIMESTAMP_LOOKAHEAD = 50
TIME_FORMAT=%b %d %H:%M:%S %Y %Z

How can I be certain that I am indexing the correct field for the event?

Is there any indication in the indexed event that the timestamp is UTC?

I want to make sure that I am indexing the UTC event and not the first two timestamps (as there could be delay in sending the message to splunk from the device and i would want the time the event occured and not the time the message was recieved)

1 Solution

jbsplunk
Splunk Employee
Splunk Employee

If you use TIME_PREFIX with MAX_TIMESTAMP_LOOKAHEAD, Splunk wouldn't even look at the first timestamp. However, I count only 25 characters in your timestamp, so I would set MAX_TIMESTAMP_LOOKAHEAD to 25 instead of 50. Your time format looks correct, so once you fix up the lookahead you'll be all set. By the way, you can be sure that Splunk is using UTC because your log explicitly states UTC in the timestamp you've specified for Splunk to look at. Even if you specified another timezone somehwere else for this sourcetype, splunk trusts the logs over your instructions.

View solution in original post

0 Karma

jbsplunk
Splunk Employee
Splunk Employee

If you use TIME_PREFIX with MAX_TIMESTAMP_LOOKAHEAD, Splunk wouldn't even look at the first timestamp. However, I count only 25 characters in your timestamp, so I would set MAX_TIMESTAMP_LOOKAHEAD to 25 instead of 50. Your time format looks correct, so once you fix up the lookahead you'll be all set. By the way, you can be sure that Splunk is using UTC because your log explicitly states UTC in the timestamp you've specified for Splunk to look at. Even if you specified another timezone somehwere else for this sourcetype, splunk trusts the logs over your instructions.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2026-2027 SplunkTrust is officially open. If ...