Splunk Search

How to extract the severity value from the events with different formats?

shanmugavelv
New Member

For example - I have the below different types of events under same index, all i need from this is the INFO, DEBUG, ERROR etc.(highlighted ones)

2017-07-11 16:01:52.9853 [10] [host-name] [Rabc.Gtgefsefwe.Sefwerg.werwer] DEBUG: erwer.wer.Sla.wer.wer.dfgdfg, gfh job.
2017-07-13 16:28:48.7464 [16] sdfsdgsdg.werwer.werwerewr DEBUG: Bath erwerwer of 1 triggers
2017-07-13 16:28:47.1820 [5] [hodt-name] Rewerwerg.Dal.tweewtert.ert.ertertertertert`2[[erterting.wsdfsddswwsssjects.sdfsggdg.Dtos.rrtrtw.UsefvbchdftrrtInfoDto, Rttererkng.sdfsdfsdfsdfsdf.weqwrerewt, Version=1.0.0.1, Cuure=neutral, PublicKeyToken=null],[wertwerwng.Data.werwer.werwer.User, rwertwerwe.Data.vgdfgdfg, Version=1.0.6372.25861, Culture=neutral, PublicKeyToken=null]]] INFO: No records to process. No Bulk insert of Entity: dfgdfgdfg.Data.dfgdfg.EntityModels.User is required.

Tags (1)
0 Karma

sbbadri
Motivator

try this

your base search | rex field=test "\d+-\d+-\d+\s\d+:\d+:\d+.\d+\S+.*(?P(DEBUG|INFO))"

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...