Splunk Search

Search for percent symbol in log entries

castle1126
Communicator

Our web server logs have percent symbols in the entries. I am able to search for certain logs by using REGEX (e.g. REGEX _raw=\/searchresults.html\?ab\=12345\%abc123). But my users are not REGEX savvy. Is there a way to search for characters like %, etc and not use REGEX?

Thanks! Steve

Tags (1)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

Seems to me you can really just search for "%" or "25%", either with or without the quotes. Works for me, at least with the default segmentation settings.

View solution in original post

0 Karma

Jeremiah
Motivator

It wouldn't work if you were trying to search a portion of a string between breakers. In your example, searching for "%" should work ok, but "%abc" would not. So just add a wildcard to the search "%abc*".

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

Seems to me you can really just search for "%" or "25%", either with or without the quotes. Works for me, at least with the default segmentation settings.

0 Karma

castle1126
Communicator

Thanks! This worked great!

0 Karma

ftk
Motivator

You should be able to search just for the percent symbol without escaping it. You can use the backslash to escape special characters such as quotes and backslashes.

index=blah %

Searches index blah for all entries with percent signs.

index=blah \%

works as well.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

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 ...