<?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 search alert using static file in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34621#M362</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
I will have a csv file like this:&lt;BR /&gt;
cachename, value&lt;BR /&gt;
max,1000&lt;BR /&gt;
min, 100&lt;/P&gt;

&lt;P&gt;I want to do search | fileds cachename, value | and compare the value to the value in csv file and send alert if it is =1000 or &amp;lt;1000 like that.&lt;BR /&gt;
is this possible in Splunk? if possible can you please let me know the best way to do it.&lt;/P&gt;

&lt;P&gt;Thank You&lt;/P&gt;</description>
    <pubDate>Fri, 15 Feb 2013 22:00:39 GMT</pubDate>
    <dc:creator>gudavasr</dc:creator>
    <dc:date>2013-02-15T22:00:39Z</dc:date>
    <item>
      <title>search alert using static file</title>
      <link>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34621#M362</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I will have a csv file like this:&lt;BR /&gt;
cachename, value&lt;BR /&gt;
max,1000&lt;BR /&gt;
min, 100&lt;/P&gt;

&lt;P&gt;I want to do search | fileds cachename, value | and compare the value to the value in csv file and send alert if it is =1000 or &amp;lt;1000 like that.&lt;BR /&gt;
is this possible in Splunk? if possible can you please let me know the best way to do it.&lt;/P&gt;

&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2013 22:00:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34621#M362</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2013-02-15T22:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: search alert using static file</title>
      <link>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34622#M363</link>
      <description>&lt;P&gt;In other words, you want to define the alert triggering condition based on minimum and maximum values for a field from a csv file?&lt;/P&gt;

&lt;P&gt;Here's a mildly hacked approach: I've defined a test.csv with two columns, min and max, with values 300 and 600. Do the same (in $SPLUNK_HOME/etc/system/lookups) and compare these two queries:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 increment=5m | eval foo = starttime % 1200

| gentimes start=-1 increment=5m | eval foo = starttime % 1200 | search [inputlookup test.csv | return min max | eval search = replace(search, "min=", "foo&amp;gt;=") | eval search = replace(search, "max=", "foo&amp;lt;=")]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The first is the unfiltered one, with foo values from 0 to 900. The second filters the previous result based on the limits defined in the CSV file and only returns those events with 300&amp;lt;=foo&amp;lt;=600.&lt;/P&gt;

&lt;P&gt;I'm not certain whether the trigger-conditions-in-CSV-file approach is the best for your problem though, what do you want to achieve?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2013 23:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34622#M363</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-15T23:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: search alert using static file</title>
      <link>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34623#M364</link>
      <description>&lt;P&gt;I will try this approach but why to gentimes? can I just use inputlookup part?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Feb 2013 00:01:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34623#M364</guid>
      <dc:creator>gudavasr</dc:creator>
      <dc:date>2013-02-16T00:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: search alert using static file</title>
      <link>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34624#M365</link>
      <description>&lt;P&gt;gentimes generates time range results, I use it to simulate actual events.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Feb 2013 00:03:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/search-alert-using-static-file/m-p/34624#M365</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-02-16T00:03:04Z</dc:date>
    </item>
  </channel>
</rss>

