<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to show custom message in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430150#M169165</link>
    <description>&lt;P&gt;Below is the source of my code. I want to display "A Custom Message" instead of "No results found" I tried many ways but still it shows me No results found. How can i do that and when I've results i want to see the bar chart with tableName which somehow is not showing now. My Splunk Version is 7.0.1&lt;BR /&gt;
My Query: index=index sourcetype="sourcetype" TableName=* ErrorTotal&amp;gt;0&lt;BR /&gt;
| chart sum(Errors) as "Error Row",sum(When) as "Conditional Rows",sum(NULL) as "NULL" by TableName&lt;/P&gt;

&lt;P&gt;TestDashboard index=index sourcetype="sourcetype" TableName=* ErrorTotal&amp;gt;0 | chart sum(Errors) as "Error Row",sum(When) as "Conditional Rows",sum(NULL) as "NULL" by TableName -24h@h now 1 ellipsisNone 0 visible visible visible none linear none linear none 0 inherit bar 50 10 area gaps none 0.01 default minimal none 0 0 ellipsisMiddle standard right 2 0 1 medium&lt;/P&gt;</description>
    <pubDate>Tue, 29 May 2018 20:21:13 GMT</pubDate>
    <dc:creator>splunking1t</dc:creator>
    <dc:date>2018-05-29T20:21:13Z</dc:date>
    <item>
      <title>How to show custom message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430150#M169165</link>
      <description>&lt;P&gt;Below is the source of my code. I want to display "A Custom Message" instead of "No results found" I tried many ways but still it shows me No results found. How can i do that and when I've results i want to see the bar chart with tableName which somehow is not showing now. My Splunk Version is 7.0.1&lt;BR /&gt;
My Query: index=index sourcetype="sourcetype" TableName=* ErrorTotal&amp;gt;0&lt;BR /&gt;
| chart sum(Errors) as "Error Row",sum(When) as "Conditional Rows",sum(NULL) as "NULL" by TableName&lt;/P&gt;

&lt;P&gt;TestDashboard index=index sourcetype="sourcetype" TableName=* ErrorTotal&amp;gt;0 | chart sum(Errors) as "Error Row",sum(When) as "Conditional Rows",sum(NULL) as "NULL" by TableName -24h@h now 1 ellipsisNone 0 visible visible visible none linear none linear none 0 inherit bar 50 10 area gaps none 0.01 default minimal none 0 0 ellipsisMiddle standard right 2 0 1 medium&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 20:21:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430150#M169165</guid>
      <dc:creator>splunking1t</dc:creator>
      <dc:date>2018-05-29T20:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to show custom message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430151#M169166</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index sourcetype="sourcetype" TableName=* ErrorTotal&amp;gt;0
| chart sum(Errors) as "Error Row",sum(When) as "Conditional Rows",sum(NULL) as "NULL" by TableName
| appendpipe [| stats count | where count=0 | eval Message="Your Custom Message Here" | table Message]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 May 2018 20:42:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430151#M169166</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-29T20:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to show custom message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430152#M169167</link>
      <description>&lt;P&gt;Thanks Somesoni2 for your response. I tried this earlier and it doesn't still shows the custom message.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 20:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430152#M169167</guid>
      <dc:creator>splunking1t</dc:creator>
      <dc:date>2018-05-29T20:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to show custom message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430153#M169168</link>
      <description>&lt;P&gt;There was a missing double quotes which I added now.&lt;/P&gt;

&lt;P&gt;I got similar query working for me. See this runanywhere sample search , need access to _internal index in order to run it. Just add some dummy keywords in the base search so that it will not return anything.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=scheduler  result_count&amp;gt;0| chart sum(result_count) as ResultCount sum(run_time) as "RunTime" by status | appendpipe [| stats count | where count=0 | eval Message="Custom"| table Message]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 May 2018 21:31:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430153#M169168</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-29T21:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to show custom message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430154#M169169</link>
      <description>&lt;P&gt;Yes, I saw there was a missing quotes and added that. I tried the sample query as well but still I see my chart with lines when there're no results instead of  custom message.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 21:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430154#M169169</guid>
      <dc:creator>splunking1t</dc:creator>
      <dc:date>2018-05-29T21:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to show custom message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430155#M169170</link>
      <description>&lt;P&gt;So you do see a table with custom message in Statistics tab? What should your bar chart show when there are no results.? &lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 22:11:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430155#M169170</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-29T22:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to show custom message</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430156#M169171</link>
      <description>&lt;P&gt;Yes, I see the custom message in statistics tab. It still shows me empty bar chart. &lt;BR /&gt;
If in case there're no result Instead of showing an empty bar chart I wanted to show a custom message eg. "No errors Found". &lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 12:40:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-custom-message/m-p/430156#M169171</guid>
      <dc:creator>splunking1t</dc:creator>
      <dc:date>2018-05-30T12:40:20Z</dc:date>
    </item>
  </channel>
</rss>

