Dashboards & Visualizations

Creating a table, but it shows 3 column error msg?

Khanu89
Path Finder

I am trying to create a table which shows 3 column error msg, errorcode, and count. my current query is pulling the errorcode/msg in one column and error count  individually instead of whole. Please assist.

my Current Query

My current queryMy current query

 

 

 

 

 

Current Output

Screen Shot 2022-05-09 at 8.46.04 PM.png

Expected Output

Screen Shot 2022-05-09 at 8.52.59 PM.png

Labels (3)
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust

@Khanu89 - It's actually an issue with regex (rex) extracting ErrorCode, that it is extracting ErrorCode and error message everything in a single field.

You can try extracting them separately and then you can update your stats to add the error_msg field in the groupby (or by).

 

I hope this helps!!!

 

Khanu89
Path Finder

@VatsalJagani  Thank you for your input. Can you please elaborate on how can I extract separately?

Tags (1)
0 Karma

VatsalJagani
SplunkTrust
SplunkTrust
| rex field=_raw "%\s(?<ErrorCode>\d+)\s(?<error_msg>.*)\s"

 

And then you can use 

| stats ..... by ErrorCode, error_msg

 

something like this. Regex could not be valid for all the use cases, I'm just seeing a few examples from the screenshot.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

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