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!

.conf23 Registration is Now Open!

Time to toss the .conf-etti &#x1f389; —  .conf23 registration is open!   Join us in Las Vegas July 17-20 for ...

Don't wait! Accept the Mission Possible: Splunk Adoption Challenge Now and Win ...

Attention everyone! We have exciting news to share! We are recruiting new members for the Mission Possible: ...

Unify Your SecOps with Splunk Mission Control

In today’s post, I'm excited to share some recent Splunk Mission Control innovations. With Splunk Mission ...