Splunk Search

can you help me with regex

tulusoy
New Member

Hi,
I have a search with regex

ERROR   * | rex ".*?(?(?:\w+\.)+\w*?Exception).*"    | stats sparkline  count by exception |sort count desc

should I change limits.conf or change regex ?
Can you help me.

Thank you

Tags (1)
0 Karma
1 Solution

chrisyounger
SplunkTrust
SplunkTrust

Try this:

ERROR * | rex "(?<exception>\S+Exception)" | stats sparkline count by exception |sort count desc

View solution in original post

0 Karma

chrisyounger
SplunkTrust
SplunkTrust

Try this:

ERROR * | rex "(?<exception>\S+Exception)" | stats sparkline count by exception |sort count desc

0 Karma

tulusoy
New Member

thank you vey much. It runs

0 Karma

somesoni2
Revered Legend

What's the problem here?

0 Karma

damann
Communicator

Could you provide a sample positive event ? Btw. your regex is broken...

0 Karma

niketn
Legend

@tulusoy while posting code use the code button ( 101010 ) on Splunk Answers so that special characters do not escape.

You can also use shortcut Ctrl+K after selecting the code.

Or else add four spaces before each line of code and ensure to hit enter twice before writing first line of code so that there is a line gap between text and code. (Usually preview mode on Splunk Answer shows you how your final post will appear after submit.)

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

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