Splunk Search

Can find a field value only when using a wildcard prefix

ilyar
Observer

Hello,

I have field name: let's call it - "foo" and a value I desire to add to my search - "bar".
When I execute a normal query, for example: 

 

 

 

 

index="main" sourcetype="blabla" foo="bar"

 

 

 

 

it won't find anything, although I know there are many events that have the field foo=bar
Alternatively, when I execute the following query:

 

 

 

 

index="main" sourcetype="blabla" foo="*bar"

 

 

 

 

 I get the results I want. 

What causes the first search, which should work, to fail? Is that encoding issue?

Thanks!

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Can you share your events?

0 Karma

ilyar
Observer

Hi buddy, unfortunately not, it's sensitive data. I'm sure people had the same problem. I believe it has to do with encoding...

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Can you check what your job inspection said on those rows which contains word lispy?
0 Karma

kennetkline
Path Finder

Sounds like maybe a transforms/props issue.

If you are getting hits with the wildcard, I would believe there is a whitespace issue; (where a leading space or more exists in the  value.



0 Karma

ilyar
Observer

Hi! I tried to search with a numerous amouns of spaces, yet it cannot find the value. Using the wildcard works, however. 
Maybe you have an idea as to how to confirm that?

thanks!

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index="main" sourcetype="blabla"
| rex "foo=\"(?<characters>.*)bar\""
| fields characters
0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...