Splunk Search

Index time Search Not Working

NAVEEN_CTS
Path Finder

Hi ,

I have dns file where i need to filter the junk data before indexing and extract hostname and IP fields at index time.

Filtering logic works well
Regex works well. It is tested in splunk search.
I get only 1 field extracted (IP alone) and HostName is not extracted.

Below are my configurations.Please review and let me know if something missing

Props.conf
[dig]
TRANSFORMS-drop = delLines
TRANSFORMS-dnsExtract = hostExtraction
TRANSFORMS-dnsExtract = IPExtraction

Transforms.conf

[delLines]
REGEX = ^;.*$
DEST_KEY = queue
FORMAT = nullQueue

[hostExtraction]
REGEX = ^(?P[^\t]+)

FORMAT = HostName::"$1"

WRITE_META = true

[IPExtraction]
REGEX = (?\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})

FORMAT = IP::"$1"

WRITE_META = true

Tags (1)
0 Karma
1 Solution

koshyk
Super Champion

The reason i guess is you made a small mistake of using same name within props.conf . Please try like below

[dig]
TRANSFORMS-drop = delLines
TRANSFORMS-dnsExtract1 = hostExtraction
TRANSFORMS-dnsExtract2 = IPExtraction

View solution in original post

woodcock
Esteemed Legend

I agree with @koshyk but I would probably fix it like this:

Props.conf

[dig]
TRANSFORMS-drop = delLines
TRANSFORMS-dnsExtract = hostExtraction, IPExtraction

NAVEEN_CTS
Path Finder

@woodcock Thank you it worked 🙂

0 Karma

koshyk
Super Champion

The reason i guess is you made a small mistake of using same name within props.conf . Please try like below

[dig]
TRANSFORMS-drop = delLines
TRANSFORMS-dnsExtract1 = hostExtraction
TRANSFORMS-dnsExtract2 = IPExtraction

NAVEEN_CTS
Path Finder

@koshyk Thank you .....it worked 🙂

0 Karma

NAVEEN_CTS
Path Finder

I missed adding fields.conf

Fields.conf
[HostName]
INDEXED = true

[IP]
INDEXED = true

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...