Getting Data In

Help with Parsing props.conf and transforms.conf

dsofoulis
Path Finder

Hi Everyone,

I cannot figure what I am doing wrong.
I am using pfsense and I am receiving the logs into splunk but the logs are not being formatted.

This is the event which I am receiving in splunk

Nov 10 20:12:12 FWPFS001.localdomain Nov 11 15:12:12 filterlog: 84,16777216,,1000003811,igb0,match,pass,out,4,0x0,,127,2445,0,none,17,udp,1378,192.168.0.100,216.58.199.46,28180,443,1358

As you can see it is not being tagged with what is configured in the props.conf and transforms.conf

Here are my config files.

[syslog]
SHOULD_LINEMERGE = true
TRUNCATE = 0
MUST_NOT_BREAK_AFTER = pf: .* rule ([-\d]+\/\d+)(.?):
MUST_BREAK_AFTER = pf: .
(<|>) +(\d+.\d+.\d+.\d+).?(\d*):
REPORT-pf2 = pf2

Transforms.conf
[pf2]

REGEX= .* (?pass|block) .* (?TCP|UDP|IGMP|ICMP) .* (?(\d+.\d+.\d+.\d+)).?(?(\d*)) <|>.?(?(\d*)): (.*)

Any help is greatly appreciated.

0 Karma

Gilberto_Castil
Splunk Employee
Splunk Employee

It is unclear if the regular expression works, or if the markup formatting ate parts of what is visible. Regardless, your transforms.conf stanza may not be complete.

Let us assume that you want to create a report for three basic fields: action, protocol and source ip. In this case we are making an assumption that the desired matches are as follows:

Nov 10 20:12:12 FWPFS001.localdomain Nov 11 15:12:12 filterlog: 84, 16777216, , 1000003811, igb0, match, pass,out,4,0x0,,127,2445,0,none,17, udp,1378, 192.168.0.100, 216.58.199.46,28180,443,1358

In this case, the corresponding props.conf entry will be:

[syslog]
...
REPORT-pf2 = pf2

And, the transforms.conf entry is as follows:

[pf2]
REGEX = .+?(pass|block).+?(tcp|udp|igmp|icmp).+?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
FORMAT = action::$1 protocol::$2 src::$3

That should do it. At this point, the data should be represented cleanly in user interface.

I hope this helps you,

-gc

0 Karma

jawadak
New Member

If I want to create a report with action, protocol, source ip and destination ip. What should I add in the transforms.conf?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...