Splunk Search

How to create an automatic lookup where lookup input fields are similar to the CSV fields?

dwalker1
New Member

HI Folks,

I'm trying to get automatic lookups working for a custom CSV file import. I'm trying to key in on two fields that have similar host names, but not exact. Is there a way to use something like contains versus equals?

Examples:

CSV Lookup Field: WAN_device_dns

Splunk Field: Host

CSV Lookup Field value: washington_bah.domain.com

Splunk Fields value: washington_bah-loop7

I'd like to equate these fields as the same in the automatic field association if the beginning matches since my CSV script automatically generates externally. If not, I'll have to rewrite the CSV output.

Thanks all,
G1

0 Karma
1 Solution

MuS
Legend

Hi dwalker1,

you can have a look at the match_type option in transforms.conf http://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf which supports wildcard matches. See this answers https://answers.splunk.com/answers/52580/can-we-use-wildcard-characters-in-a-lookup-table.html for a good example.

If this does not work for you, you could use eval and the match or like http://docs.splunk.com/Documentation/Splunk/6.4.0/SearchReference/CommonEvalFunctions#Comparison_and... functions to normalise or compare the fields.

Hope this helps ...

cheers, MuS

View solution in original post

0 Karma

MuS
Legend

Hi dwalker1,

you can have a look at the match_type option in transforms.conf http://docs.splunk.com/Documentation/Splunk/latest/Admin/Transformsconf which supports wildcard matches. See this answers https://answers.splunk.com/answers/52580/can-we-use-wildcard-characters-in-a-lookup-table.html for a good example.

If this does not work for you, you could use eval and the match or like http://docs.splunk.com/Documentation/Splunk/6.4.0/SearchReference/CommonEvalFunctions#Comparison_and... functions to normalise or compare the fields.

Hope this helps ...

cheers, MuS

0 Karma

dwalker1
New Member

Thanks for the quick response. I'll have to dig further but it looks like what I'm looking for. Thanks again!

G1

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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