Splunk Search

field value as a search pattern for filtering

Arvids
Loves-to-Learn

I have got table, which contains field SSS with search patterns and another field FFF, to which I want apply search patterns in order to get records with matches.

Something like:
SSS                  FFF
*Tomcat*       /opt/app/tomcat/
*jquery*          libxml2-2.9.1-6.el7.5.x86_64
*                         Package Installed Version Required Version python-perf
*jquery*           jQuery Version Prior to 3.5.0

Can't figure out case insensitive solution, which will return the first, third and fourth record.

Labels (1)
0 Karma

Arvids
Loves-to-Learn

At the end of day I came to dirty workaround 🙂 Will leave comment here, may be it will help to somebody.

I used | eval EEE=if(match(FFF,".*".SSS.".*"), 1,0) to indicate matches, but had to change SSS field wildcards, thankfully it was made by semimanual CSV.  Match function uses regex, so I had to remove * wildcards before and especially after, replace all * by .* and shorten search words to exclude potential capital letters - like omcat or uery ). As you can see, solution is still case insensitive, so feel free to offer improvements.

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...