Splunk Search

How to find a word using last part of the word from a file

john
Communicator

exception is java.Exception
exception is java.sql.Exception
exception is java.sql.SQLException
exception is java.sql.UmatchedException
exception is java.sql.UpdateException
and so on

This is a content of the file iam working with.I am looking for some unique search query to find out the only Exceptions those having name like(UmatchedException)not just the word Exception.please help me...

Tags (1)
0 Karma

Damien_Dallimor
Ultra Champion

Try something like this in your splunk search:

... | rex field=_raw "exception is (?:\w+\.)+(?<exception_name>\w+Exception)"  | stats count by exception_name

Damien_Dallimor
Ultra Champion

Nice. Don't forget to "accept" the answer !

0 Karma

john
Communicator

Thanks Damien its working....................

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...