Splunk Search

inputlookup format to insert wildcard * is it possible?

r999
Path Finder

inputlookup like:

user       mailbox
smithj     john smith
bloggsj    joe bloggs

search string:

| inputlookup usermailbox.csv | fields search user mailbox | format "(" "(" "AND" ")" "OR" ")"]

returns

( ( user="smithj" AND mailbox="john smith" ) OR ( user="bloggsj" AND mailbox="joe bloggs") OR...

what i want is to return

( ( user="*smithj*" AND mailbox="*john smith*" ) OR ( user="*bloggsj*" AND mailbox="*joe bloggs*") OR...

Current workaround is to put the wildcards * in the csv values like so but this is a pain

user       mailbox
*smithj*   *john smith*
*bloggsj*  *joe bloggs*

Drainy
Champion

You could use eval to add them in manually at search time;

| eval user="*".user."*"

0 Karma

the_wolverine
Champion

No, unfortunately that doesn't work.

0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...