Splunk Search

How to Display query result in text format,rather that a graph(chart or timechart)?)

geetanjali
Path Finder

Hello,

Thanks in advance.

I have one pie chart graph in a view having sum of power usage as per host.I want to display total power usage just below the pie chart. I want to display in text format. As of now, i am displaying in table format with following query :

index="test" sourcetype="test_usage" | chart sum(Power_consumption) as Total(W)

How could i display the result of this query in text format?

Geetanjali

Tags (1)
0 Karma

mw
Splunk Employee
Splunk Employee

How about using a Single Value element? You could, for extra credit :), also sprinkle in the rangemap command to have the Single Value show a green/yellow/red state based on the total consumption, if desired:

index="test" sourcetype="test_usage" | stats sum(Power_consumption) as total_pc | rangemap field=total_pc low=0-20 elevated=21-100 default=severe

Outside of that, I think you'd be hacking advanced xml to put a straight text value in there (but I'm not completely confident of that either).

0 Karma
Get Updates on the Splunk Community!

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...