Splunk Search

Scatter plot with text values and colour

alex_collins_in
New Member

I'm trying to plot the following as a scatter chart:

  • The y-axis should be the namespace. Namespace is a small set of strings, e.g. "default", "argo" or "kube-system".
  • The x-axis is time.
  • Each point should be coloured either green or red depending on whether or not the workflow succeeded or failed.

Problem 1 - you cannot have non-numeric x and y axis. Time does not appear to be numeric. So how do I convert my namespace to a number? I think it should be 0..N based on it's index is the values that namespace can be.

Problem 2 - how to colour points?

This is how far I have gotten so far:

index=foo sourcetype=eventrouter host="event-router-*" source="foo/*" event.involvedObject.kind=Workflow (event.reason=WorkflowSucceeded OR event.reason=WorkflowFailed) | convert num(_time) as x | table event.metadata.namespace x event.reason

 

Labels (1)
0 Karma

Random_Walk
Path Finder

Hi @alex ,

To map the namespace to a number you can use an eval case like:

| eval NameIndex=case(NameSpace=="default",0, NameSpace=="argo",1, NameSpace=="kube-system",2, NameSpace=="AWS",3)

The scatterplot colouring I'm not so sure, most of the charts have colour values in the XML, but I've not played with scatterplots.

 

Kind Regards,

R.

0 Karma
Get Updates on the Splunk Community!

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, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...