Splunk Search

How does one create a pie chart that would result in 3 equal pie slices?

fdswitch
Explorer

I'm logging memory stats, and I have fields like "mem_free", "mem_used", and "mem_cache" that represent memory in MB.

Let's assume all three of these avg(fields) value is 33. How does one create a pie chart that would result in 3 equal pie slices?

0 Karma
1 Solution

woodcock
Esteemed Legend

Just add transpose, maybe something like this:

... | stats last(mem_*) AS mem_* | transpose

View solution in original post

woodcock
Esteemed Legend

Just add transpose, maybe something like this:

... | stats last(mem_*) AS mem_* | transpose

cmerriman
Super Champion

if they DON'T have equal values and, for whatever reason, you still want them to have equal slices, I'd create a dummy variable.

| stats last(mem_*) AS mem_* |transpose|eval column=column+" - "+'row 1'|eval sliceSize=33|fields - "row 1"

fdswitch
Explorer

I'm not trying to force 3 equal slices, moderator changed my topic. But useful information none the less, thanks.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...