<?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 Re: DB Connect database input: How to output some text if query gives no results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-database-input-How-to-output-some-text-if-query-gives/m-p/139602#M184809</link>
    <description>&lt;P&gt;Hi, can you file an enhancement request with support?&lt;/P&gt;</description>
    <pubDate>Sun, 14 Jun 2015 02:07:58 GMT</pubDate>
    <dc:creator>jcoates_splunk</dc:creator>
    <dc:date>2015-06-14T02:07:58Z</dc:date>
    <item>
      <title>DB Connect database input: How to output some text if query gives no results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-database-input-How-to-output-some-text-if-query-gives/m-p/139601#M184808</link>
      <description>&lt;P&gt;Some important queries that run every 5 or 10 minutes that are configured as DB Connect database inputs, give rarely any results on queries. Only on exceptions. As we have alerts configured that check when the last event was indexed, something like&lt;BR /&gt;
&lt;CODE&gt;metadata type=sourcetypes | search sourcetype="something:else" | where lastTime&amp;amp;lt;now()-3600&lt;/CODE&gt; (think of it as a universal forwarder down check)&lt;/P&gt;

&lt;P&gt;But we either have to filter out this specific host or source when no event comes in, or change the SQL query so that IF no results THEN echo something like OK or Nothing found. That way there's also some kind of healthcheck as a new event should be indexed every run.&lt;/P&gt;

&lt;P&gt;Of course you can -as we did for now- configure an identical database input with 'select 'OK' from DUAL' (some kind of PING if you like) - but it would be easier to combine those two inputs into one query. Haven't googled any solution, and our DBA isn't aware of any query that meets the requirements.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 11:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-database-input-How-to-output-some-text-if-query-gives/m-p/139601#M184808</guid>
      <dc:creator>tweaktubbie</dc:creator>
      <dc:date>2015-06-02T11:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: DB Connect database input: How to output some text if query gives no results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DB-Connect-database-input-How-to-output-some-text-if-query-gives/m-p/139602#M184809</link>
      <description>&lt;P&gt;Hi, can you file an enhancement request with support?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jun 2015 02:07:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DB-Connect-database-input-How-to-output-some-text-if-query-gives/m-p/139602#M184809</guid>
      <dc:creator>jcoates_splunk</dc:creator>
      <dc:date>2015-06-14T02:07:58Z</dc:date>
    </item>
  </channel>
</rss>

