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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...