Reporting

How to split columns in a bar chart based on part of a field?

skhushalani
New Member

I have input data from a software runtime log in the form:

DATE TIME, SEVERITY, ERROR MESSAGE

The "ERROR MESSAGE" field could be one of two messages:

  • "Could not connect to : Timed out"
  • "Could not connect to : No route to host"

I'd like to split the columns in the chart by colour between the two types (timed out vs no route), but because of the "server IP" being in the message, instead of two columns every hour, I get about 100, one for each server IP, since the IP address makes each message look unique.

By the way, I'm relatively new to Splunk so if there is an obvious answer or my question sounds trivial and has been answered plenty of times before, I apologize.
Is there any way to split the columns into just two, ignoring the server IP in the message - therefore just splitting based on part of the message.

0 Karma

aweitzman
Motivator

There are two things you want to do here. First is to grab the back part of the error message, and the second is to count them separately.

To do the first thing, create a new field using rex (I'm calling it EndMessage here). To do the second thing, split the result by that message:

...your search... | rex field="ERROR MESSAGE" ":\s(?<EndMessage>.*)" | timechart span=1h count by EndMessage

You should be able to create a stacked bar chart or split column chart based on this information.

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...