<?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 search on multiple key/value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-on-multiple-key-value/m-p/389018#M172067</link>
    <description>&lt;P&gt;&lt;CODE&gt;"Log was backed up. Database: &amp;lt;abc&amp;gt;"  host=&amp;lt;xyz&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I currently have multiple alerts - one for each database / server. There must be a better way to perform the following search Where I have multiple multiple hosts containing multiple databases and  to alert when an individual database has zero events within a 60 minute window?&lt;/P&gt;

&lt;P&gt;This seems very cumbersome, and I don't know how to set up alert to capture the database / server when no events are occurring.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"Log was backed up. " Database: &amp;lt;abc_1&amp;gt; OR Database: &amp;lt;abc_2&amp;gt;  host=&amp;lt;xyz_1&amp;gt; OR host=&amp;lt;xyz_1&amp;gt;  OR host=&amp;lt;xyz_2&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2019 06:49:48 GMT</pubDate>
    <dc:creator>splunkhan</dc:creator>
    <dc:date>2019-04-03T06:49:48Z</dc:date>
    <item>
      <title>how to search on multiple key/value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-on-multiple-key-value/m-p/389018#M172067</link>
      <description>&lt;P&gt;&lt;CODE&gt;"Log was backed up. Database: &amp;lt;abc&amp;gt;"  host=&amp;lt;xyz&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I currently have multiple alerts - one for each database / server. There must be a better way to perform the following search Where I have multiple multiple hosts containing multiple databases and  to alert when an individual database has zero events within a 60 minute window?&lt;/P&gt;

&lt;P&gt;This seems very cumbersome, and I don't know how to set up alert to capture the database / server when no events are occurring.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"Log was backed up. " Database: &amp;lt;abc_1&amp;gt; OR Database: &amp;lt;abc_2&amp;gt;  host=&amp;lt;xyz_1&amp;gt; OR host=&amp;lt;xyz_1&amp;gt;  OR host=&amp;lt;xyz_2&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2019 06:49:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-on-multiple-key-value/m-p/389018#M172067</guid>
      <dc:creator>splunkhan</dc:creator>
      <dc:date>2019-04-03T06:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to search on multiple key/value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-on-multiple-key-value/m-p/389019#M172068</link>
      <description>&lt;P&gt;One way of doing this is to have those servers/databases in a lookup and then use that lookup in your search to see which lookup row (host-database combination) has data. &lt;BR /&gt;
Something like this (assuming field database is already extracted)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup hostdatabase.csv | search NOT [ search "Log was backed up. " | stats count by host database | table host database  ] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try this if database field is not extracted&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup hostdatabase.csv | search NOT [ search "Log was backed up. " | rex "Log was backed up\.\s+(?&amp;lt;database&amp;gt;\S+)" | stats count by host database | table host database  ] 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Apr 2019 14:25:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-on-multiple-key-value/m-p/389019#M172068</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-04-03T14:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to search on multiple key/value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-search-on-multiple-key-value/m-p/389020#M172069</link>
      <description>&lt;P&gt;This solution works as expected! Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 06:28:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-search-on-multiple-key-value/m-p/389020#M172069</guid>
      <dc:creator>splunkhan</dc:creator>
      <dc:date>2019-04-04T06:28:01Z</dc:date>
    </item>
  </channel>
</rss>

