Getting Data In

FortiGate logs forwarded from FortiAnalyzer not extracting timestamp

ejwade
Contributor

After upgrading FortiAnalyzer (FAZ) to 6.2.3, I'm seeing Splunk timestamping issues from the FortiGate (FGT) logs it forwards to Splunk. To reiterate, FGT logs are sent to FAZ, then FAZ forwards those logs (via syslog) to Splunk. According to the FortiGate TA, this is supported, and it had worked before upgrading FAZ.

What I'm seeing is all logs writing to a specific timestamp (in my case, 7:00 AM). Splunk does not seem to be extracting the timestamp field correctly. The TA's settings for timestamps are pretty basic:

[fgt_traffic]
TIME_PREFIX = ^

Everything else is default.

Here is a sample event, that is getting written to 7:00 AM:

 

<189>logver=506051600 timestamp=1598992014 tz="UTC-7:00" devname="<redacted>" devid="<redacted>" vd="<redacted>" date=2020-09-01 time=13:26:55 logid="0000000013" type="traffic" subtype="forward" level="notice" eventtime=1598992015 srcip=<redacted> srcport=<redacted> srcintf="<redacted>" srcintfrole="wan" dstip=<redacted> dstport=<redacted> dstintf="<redacted>" dstintfrole="lan" poluuid="<redacted>" sessionid=2089596897 proto=6 action="timeout" policyid=1 policytype="policy" service="<redacted>" dstcountry="United States" srccountry="Netherlands" trandisp="noop" duration=10 sentbyte=40 rcvdbyte=0 sentpkt=1 rcvdpkt=0 appcat="unscanned" crscore=5 craction=262144 crlevel="low"

 

I tried changing the TIME_PREFIX to "timestamp=" and the TIME_FORMAT to "%s". No luck. Any ideas?

Labels (2)
0 Karma
1 Solution

ejwade
Contributor

I figured out a solution to this issue. I set the following in props.conf:

[fgt_log]
TIME_FORMAT = %s
TIME_PREFIX = timestamp=

I had to enable/disable the log forwarding flow in FortiAnalyzer to figure out which change was the right one. I was able to determine that adding a TIME_FORMAT and TIME_PREFIX to the initial source type, "fgt_log," was the change that stuck.

View solution in original post

0 Karma

ejwade
Contributor

I figured out a solution to this issue. I set the following in props.conf:

[fgt_log]
TIME_FORMAT = %s
TIME_PREFIX = timestamp=

I had to enable/disable the log forwarding flow in FortiAnalyzer to figure out which change was the right one. I was able to determine that adding a TIME_FORMAT and TIME_PREFIX to the initial source type, "fgt_log," was the change that stuck.

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!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Build resilience for the agentic era: Join us at Splunk Go San Jose

AI is changing how organizations build, operate, and secure digital services. As teams adopt AI agents and ...

Manage Edge Processor pipelines end to end with APIs

This guide uses the Data Management APIs to create an Edge Processor, onboard one instance, deploy a pipeline ...