Splunk Search

how to search a list with *Exceptions

vincenty
Explorer

I want to search from a list of the following *Exceptions from log files. I don't have a field defined nor know how to define it. I want get a table report with number of occurrences for each type of exceptions. I think I may be able to do it with inputlookup but not sure how to get started.... please help

com.sun.jersey.api.client.ClientHandlerException

org.eclipse.persistence.exceptions.OptimisticLockException

Locks.checkThreadStopException

com.sun.xml.ws.client.ClientTransportException

java.io.IOException

java.lang.Exception

java.lang.IllegalAccessException

java.lang.reflect.InvocationTargetException
java.lang.RuntimeException
java.net.ConnectException,
java.net.SocketException
java.rmi.NoSuchObjectException

java.util.MissingResourceException

javax.ejb.NoSuchEJBException

javax.faces.application.ViewExpiredException
javax.faces.FacesException

javax.mail.MessagingException
...

Tags (1)
0 Karma

jonuwz
Influencer

Try this for a starter

Exception | rex ".*?(?<exception>(?:\w+\.)+\w*?Exception).*"
          | stats count by exception

acveer
Engager

Thank you. this worked for me.

0 Karma

vincenty
Explorer

ok thx. Can use the patterns as you've provided to search with the following. Is there a easier way to do this especially if I add another level?

Exception | rex "(?:^|\s)(?\w+.\w+.\w+.\w+Exception)(?:\s|$)" | search Exception | rex "(?:^|\s)(?\w+.\w+.\w+Exception)(?:\s|$)" |stats count by exception

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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