<?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: How do I create an alert that is triggered if a source type exists in a lookup table? in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421092#M7347</link>
    <description>&lt;P&gt;Please try below query , &lt;/P&gt;

&lt;P&gt;index=foo |stats count by sourcetype|join type=outer sourcetype [|inputlookup srctype.csv| eval x=1] | where isnull(x)&lt;/P&gt;

&lt;P&gt;This will give you all sourcetype from index foo and the field x with value 1 wherever the lookup has sourcetype else the value of x will be null if the particular sourcetype does not exist in lookup.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Oct 2018 14:53:59 GMT</pubDate>
    <dc:creator>Vijeta</dc:creator>
    <dc:date>2018-10-09T14:53:59Z</dc:date>
    <item>
      <title>How do I create an alert that is triggered if a source type exists in a lookup table?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421089#M7344</link>
      <description>&lt;P&gt;I want to create an alert that triggers when a source type doesn't exist in a lookup table (e.g. srctype.csv). But I'm not sure how to create the search string for this. The fields I'm using in the srctype.csv lookup table is source type as follows:&lt;/P&gt;

&lt;P&gt;If the source type matches a source type listed in the table, the alert should triggered. Any help on how to do this are much appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:02:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421089#M7344</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-10-09T14:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create an alert that is triggered if a source type exists in a lookup table?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421090#M7345</link>
      <description>&lt;P&gt;without knowing the dataset for sourcetypes you're looking at, something like this might work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo |stats count by sourcetype|join sourcetype [|inputlookup srctype.csv]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and alert if the results are greater than 0&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:25:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421090#M7345</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-10-09T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create an alert that is triggered if a source type exists in a lookup table?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421091#M7346</link>
      <description>&lt;P&gt;Actually I need the values which are not matched from the lookup table.&lt;/P&gt;

&lt;P&gt;In this query I think, It is matching and publishing the result of current match instead of the values which are not matched with the lookup table. I need to trigger the alert if that not match is present only.&lt;/P&gt;

&lt;P&gt;I tried below query also but I'm getting the same result as yours.&lt;/P&gt;

&lt;P&gt;index=foo&lt;BR /&gt;
| lookup srctype.csv sourcetype OUTPUT sourcetype as sourcetype&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421091#M7346</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-10-09T14:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create an alert that is triggered if a source type exists in a lookup table?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421092#M7347</link>
      <description>&lt;P&gt;Please try below query , &lt;/P&gt;

&lt;P&gt;index=foo |stats count by sourcetype|join type=outer sourcetype [|inputlookup srctype.csv| eval x=1] | where isnull(x)&lt;/P&gt;

&lt;P&gt;This will give you all sourcetype from index foo and the field x with value 1 wherever the lookup has sourcetype else the value of x will be null if the particular sourcetype does not exist in lookup.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 14:53:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421092#M7347</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-10-09T14:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create an alert that is triggered if a source type exists in a lookup table?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421093#M7348</link>
      <description>&lt;P&gt;Hello :),&lt;/P&gt;

&lt;P&gt;You can try something like that :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo 
| stats count by sourcetype
| inputlookup append=true srctype.csv
| stats count by sourcetype
| where count &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should return you the sourcetype present in the index AND in the lookup&lt;BR /&gt;
Let me know.&lt;/P&gt;

&lt;P&gt;KailA&lt;/P&gt;</description>
      <pubDate>Tue, 09 Oct 2018 15:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421093#M7348</guid>
      <dc:creator>KailA</dc:creator>
      <dc:date>2018-10-09T15:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create an alert that is triggered if a source type exists in a lookup table?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421094#M7349</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;This code have done the job with a minor change, i.e |where count=1. using this we can get all the remaining fields which are not available.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 08:39:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421094#M7349</guid>
      <dc:creator>soumyacharya91</dc:creator>
      <dc:date>2018-10-12T08:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create an alert that is triggered if a source type exists in a lookup table?</title>
      <link>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421095#M7350</link>
      <description>&lt;P&gt;I thought you wanted the sourcetype present in the index and the lookup but glad that help you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 13:31:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-do-I-create-an-alert-that-is-triggered-if-a-source-type/m-p/421095#M7350</guid>
      <dc:creator>KailA</dc:creator>
      <dc:date>2018-10-12T13:31:00Z</dc:date>
    </item>
  </channel>
</rss>

