All Apps and Add-ons

Help with props.conf?

kiran331
Builder

Hi,

I'm trying to extract a fields using props.conf,it's not working as expected.Is there a better way to extract them?

event:
May 4 13:37:50 abcd fdf: Protocol: TCP, SrcIP: 111.111.111.12, OriginalClientIP: ::, DstIP: 110.112.113.114, SrcPort: 56896, DstPort: 80, TCPFlags: 0x0, IngressZone: INSIDE, EgressZone: OUTSIDE, DE: Primary Detection Engine (dsdsdasdsda), Policy: C_POLICY, ConnectType: Start, AccessControlRuleName: inside to outside, AccessControlRuleAction: Allow, Prefilter Policy: r_Prefilter, UserName: No Authentication Required, UserAgent: Mozilla/5.0 (compatible; MSIE 8.0;), Client: Internet Explorer, ClientVersion: 8.0, ApplicationProtocol: HTTP, InitiatorPackets: 3, ResponderPackets: 1, InitiatorBytes: 394, ResponderBytes: 66, NAPPolicy: Balanced Security and Connectivity, DNSResponseType: No Error, Sinkhole: Unknown, ReferencedHost: splunk.com, URLCategory: Business and Economy, URLReputation: Well known, URL: http://splunk.com/

To the add-on props, I added field 'rule' fro extraction, its not working.

[cisco:ftd]
SHOULD_LINEMERGE = 0
TIME_FORMAT = %b %d %H:%M:%S
category = Network & Security
description = Output produced by the Cisco Firepower Thereat Defense (FTD) Firew all
pulldown_type = 1
EXTRACT-AccessControlRuleName = AccessControlRuleName:\s(?(.*?))(,|\z)

EXTRACT-SrcIP = SrcIP:\s(?(.*?))(,|\z)

EXTRACT-DE = DE:\s(?(.*?))(,|\z)

EXTRACT-DNSResponseType = DNSResponseType:\s(?(.*?))(,|\z)

EXTRACT-DstIP = DstIP:\s(?(.*?))(,|\z)

0 Karma

xpac
SplunkTrust
SplunkTrust

Hey, you're regexes are good, but need to contain "named capture groups". The name of such a capture group will determine the field name in Splunk.

I fixed your regex for SrcIP, see this regex101 link, it will help you fix your other regexes accordingly:
https://regex101.com/r/1QfM2q/1

But: shouldn't that app you're using already extract those fields?

0 Karma

kiran331
Builder

Its working for other fields, I added AccessControlRuleName and its not working

0 Karma

amitm05
Builder

Try this.

AccessControlRuleName:\s(?(.*?))(,|\z)

0 Karma

xpac
SplunkTrust
SplunkTrust

If you're comparing your regexes you will see that the regex for that field is missing a single character 😉

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...