Splunk Enterprise

help to display 0 & unit if there is no results

jip31
Motivator

hi

if tere is no results retourned I need to display 0 in my single panel and the unit whic is "sec"

So I need to display "0 sec" and the formatting options even if there is no results

how to do this please?

<single>
        <title>Bur</title>
        <search base="hang">
          <query>| stats perc90(hang_duration_sec) as hang_duration_sec </query>
        </search>
        <option name="drilldown">none</option>
        <option name="height">85</option>
        <option name="numberPrecision">0.0</option>
        <option name="rangeColors">["0x53a051","0xf8be34","0xf1813f","0xdc4e41"]</option>
        <option name="rangeValues">[0,5,10]</option>
        <option name="refresh.display">progressbar</option>
        <option name="unit">sec</option>
        <option name="useColors">1</option>
      </single>
Labels (1)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| stats perc90(hang_duration_sec) as hang_duration_sec
| appendpipe [stats count as _events | where _events = 0 | eval hang_duration_sec = 0 ]

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats perc90(hang_duration_sec) as hang_duration_sec
| appendpipe [stats count as _events | where _events = 0 | eval hang_duration_sec = 0 ]
0 Karma

jip31
Motivator

thanks

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...