Splunk Search

lookup table using like syntax

rdownie
Communicator

If I have a lookup table that contains the following:


mstring,category
%-mdfa,network
%-mdfb,network
%cam,camera
%-avaya,phone

and I want to match it using a like syntax (SQL or where hostname like mstring) where I could have b01k-mdfa return network for category. Is there a way to do this with a lookup?

Tags (2)
0 Karma
1 Solution

Ayn
Legend

Not using % as wildcard, but *. When you define your lookup table in transforms.conf, you can specify a MATCH_TYPE. Set this to WILDCARD and you will be able to lookup values using a table similar to yours. Something like

mstring,category
*-mdfa,network
...

http://docs.splunk.com/Documentation/Splunk/latest/admin/Transformsconf

View solution in original post

Ayn
Legend

Not using % as wildcard, but *. When you define your lookup table in transforms.conf, you can specify a MATCH_TYPE. Set this to WILDCARD and you will be able to lookup values using a table similar to yours. Something like

mstring,category
*-mdfa,network
...

http://docs.splunk.com/Documentation/Splunk/latest/admin/Transformsconf

rdownie
Communicator

Thanks, worked like a charm!!!!

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...