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!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Rounding off the Splunk Dashboard Contest

What does a contest-winning Splunk dashboard look like? In this case, it isn't in a browser tab at all. It ...

A Four Part Event Series: AI + Observability: AI Agents, LLMs, Apps, & Infrastructure

AI + Observability: AI Agents, LLMs, Apps, & Infrastructure The rapid evolution of artificial intelligence ...