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!

Enterprise Security Content Update (ESCU) | New Releases

In January, the Splunk Threat Research Team had one release of new security content via the Splunk ES Content ...

Expert Tips from Splunk Professional Services, Ensuring Compliance, and More New ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Observability Release Update: AI Assistant, AppD + Observability Cloud Integrations & ...

This month’s releases across the Splunk Observability portfolio deliver earlier detection and faster ...