<?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 comparing a field and external file in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/comparing-a-field-and-external-file/m-p/108296#M1565</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;I'm a very new splunk user. I have this question:&lt;/P&gt;

&lt;P&gt;I have a list of verified hostnames. I can put them in any file, .txt or .csv, its just a list. &lt;BR /&gt;
I also have my hostname field in logs correctly extracted.&lt;/P&gt;

&lt;P&gt;I would like to set up an alert if the hostname doesn't match with any approved one from the list.&lt;/P&gt;

&lt;P&gt;How should I go ahead with it? Answers or even pointers would be helpful.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jul 2012 17:28:34 GMT</pubDate>
    <dc:creator>aniketb</dc:creator>
    <dc:date>2012-07-25T17:28:34Z</dc:date>
    <item>
      <title>comparing a field and external file</title>
      <link>https://community.splunk.com/t5/Alerting/comparing-a-field-and-external-file/m-p/108296#M1565</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;I'm a very new splunk user. I have this question:&lt;/P&gt;

&lt;P&gt;I have a list of verified hostnames. I can put them in any file, .txt or .csv, its just a list. &lt;BR /&gt;
I also have my hostname field in logs correctly extracted.&lt;/P&gt;

&lt;P&gt;I would like to set up an alert if the hostname doesn't match with any approved one from the list.&lt;/P&gt;

&lt;P&gt;How should I go ahead with it? Answers or even pointers would be helpful.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 17:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/comparing-a-field-and-external-file/m-p/108296#M1565</guid>
      <dc:creator>aniketb</dc:creator>
      <dc:date>2012-07-25T17:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: comparing a field and external file</title>
      <link>https://community.splunk.com/t5/Alerting/comparing-a-field-and-external-file/m-p/108297#M1566</link>
      <description>&lt;P&gt;upload the host list as a lookup file (save as .csv) host column header named hostname&lt;/P&gt;

&lt;P&gt;run this search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=&amp;lt;my_sourcetype_name_here&amp;gt; NOT [|inputlookup &amp;lt;lookup_name_here&amp;gt;.csv | fields hostname]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Jul 2012 17:34:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/comparing-a-field-and-external-file/m-p/108297#M1566</guid>
      <dc:creator>carmackd</dc:creator>
      <dc:date>2012-07-25T17:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: comparing a field and external file</title>
      <link>https://community.splunk.com/t5/Alerting/comparing-a-field-and-external-file/m-p/108298#M1567</link>
      <description>&lt;P&gt;aniketb,&lt;/P&gt;

&lt;P&gt;1) Create the list of verified hostnames as a CSV file. It is easy if the column containing the hostname values is the same name as Splunk's hostname. (i.e. if Splunk calls it "host=bob" your header should be "host" without the quotes.)&lt;/P&gt;

&lt;P&gt;2) Open Splunk. &lt;/P&gt;

&lt;P&gt;3) Navigate to Manager --&amp;gt; Lookups --&amp;gt; Add New --&amp;gt; Lookup Table File&lt;/P&gt;

&lt;P&gt;4) Upload your file and name it hostname_lookup.csv (or whatever you want, have the filename end in .csv)&lt;/P&gt;

&lt;P&gt;5) Under Manager --&amp;gt; Lookups --&amp;gt; Add New --&amp;gt; Lookup Definition&lt;/P&gt;

&lt;P&gt;6) Name: hostname_lookup , lookup-file: hostname_lookup.csv&lt;/P&gt;

&lt;P&gt;7) Now define your search query: index=this_index query_terms_here NOT [|inputlookup hostname_lookup | fields host]&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; Set your time and click Create --&amp;gt; Alert&lt;/P&gt;

&lt;P&gt;9) Schedule your alert and have it trigger when your results are great than 0.&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:08:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/comparing-a-field-and-external-file/m-p/108298#M1567</guid>
      <dc:creator>cburr2012</dc:creator>
      <dc:date>2020-09-28T12:08:54Z</dc:date>
    </item>
  </channel>
</rss>

