Getting Data In

forward specified events to reciever

khanlarloo
Explorer

i need only recieve events with action=blocked from farwrders,

my logs are :
Aug 18 12:56:13 192.168.X.X date=2018-08-18 time=12:50:36 devname="XXX" logid="0001000014" type="traffic" subtype="local" level="notice" vd="root" eventtime=1534580436 srcip=192.168.x.x srcname="SPLUNK" srcport=138 srcintf="internal" srcintfrole="lan" dstip=192.168.x.x dstport=138 dstintf=unknown-0 dstintfrole="undefined" sessionid=76899473 proto=17 action="deny" policyid=0 policytype="local-in-policy" service="udp/138" dstcountry="Reserved"

i config my props.conf:

[host::192.168.X.X]
TRANSFORMS-null= setnull,setparsing

and transforms.conf

[setnull]
REGEX = .*
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = (?m)^action=(blocked)
DEST_KEY = queue
FORMAT = indexQueue

but when i do this forwarder doesn't receive any logs from my device,can you tell me where is my mistake?

Tags (1)
0 Karma

jkat54
SplunkTrust
SplunkTrust

Your regex in the setnull is too broad. .* will match everything. Thus sending everything to null queue, and never to indexes.

Your regex in setparsing is interesting.

REGEX = (?m)^action=(blocked)

This would only match events that begin with "action=blocked", but i dont understand why you have a capture group around (blocked).

0 Karma

khanlarloo
Explorer

i have problem when i do this i don't receive any logs from my device in forwarder
where is my mistake? is this configuration right?

0 Karma

jkat54
SplunkTrust
SplunkTrust

What are you trying to do?

0 Karma

khanlarloo
Explorer

i have one HF and i want to send specific field from my HF to receiver.
the field in my HF is action and i want HF just send field action=block to my receiver.

0 Karma

jkat54
SplunkTrust
SplunkTrust

Try changing transforms to this

 [setnull]
 REGEX = .*
 DEST_KEY = queue
 FORMAT = nullQueue

 [setparsing]
 REGEX = action\=blocked
 DEST_KEY = queue
 FORMAT = indexQueue
0 Karma

khanlarloo
Explorer

i do this in my HF but it doesn't work.

0 Karma

jkat54
SplunkTrust
SplunkTrust

In your transforms, try putting nullQueue 2nd

TRANSFORMS-null= setparsing, setnull

Make sure you reload the data to see the effect

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!

Mastering Threat Intelligence in ES 8.5, Splunk AI Assistant v2, and More from Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Break the Build: Inside the KubeDoom Lounge at .conf26

    You step up to the machine. The pixelated corridors of a certain 1993 FPS load in front of you, EMP Pulse ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...