Splunk Enterprise

For single value panel need to replace 'no results found' message with custom data

kirrusk
Communicator

Hi,

I tried the below logic, to replace the "no results found "message with a custom message.
But after adding append count the,  at end of the query.
logic is not working as expected. Can anyone please help?

base search | fields version, time  | appendpipe [stats count | where count=0]
<done>
    <condition match=" 'job.resultCount' == 0">
        <set token="show_html">true</set>
    </condition>
    <condition>
        <unset token="show_html"/>
    </condition>
<done>
<chart rejects="$show_html$">
   ...
</chart>
<html depends="$show_token$">
     <div style="font-weight:bold;font-size:150%;text-align:center;color:red">
          No data, Please check later
     </div>
</html>

 

Labels (2)
Tags (4)
0 Karma

efavreau
Motivator

@kirruskDid you get a zero at the end of your query? Or are you still trying to do that?
If you do have a "0" at the end of your query, then it is as easy as modifying your last line to

 

| appendpipe 
    [ stats count 
    | where count=0 
    | eval count="No data, Please check later"]

I tested this and it will display in a single value viz. So you won't need any of the custom xml, because the logic is in the query itself.

 

###

If this reply helps you, an upvote would be appreciated.
0 Karma

kirrusk
Communicator

@efavreau Thank you, but it is not exactly what I'm looking for. I'm using the hyper link. So if there is no data also hyperlink is still enabled on custom message, which should not.

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

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