<?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: Trigger alert for stats query when events are null in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329612#M98105</link>
    <description>&lt;P&gt;ok so then, how do i set thetrigger condition if the "events" tab is still null&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2017 18:57:01 GMT</pubDate>
    <dc:creator>santiagn</dc:creator>
    <dc:date>2017-09-11T18:57:01Z</dc:date>
    <item>
      <title>Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329604#M98097</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;scheduling an alert to notify me what my current license usage is and I can't get it to trigger since the events return null but rather show a statistic row. How can I get my alert to trigger when events are null?&lt;/P&gt;

&lt;P&gt;here is my query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rest splunk_server=local /services/licenser/pools | rename title AS Pool | search [rest splunk_server=local /services/licenser/groups | search is_active=1 | eval stack_id=stack_ids | fields stack_id] | join type=outer stack_id [rest splunk_server=local /services/licenser/stacks | eval stack_id=title | eval stack_quota=quota | fields stack_id stack_quota] | stats sum(used_bytes) as used max(stack_quota) as total | eval usedGB=round(used/1024/1024/1024,4)  | appendcols [| stats count AS tnow | eval tnow = now() | eval timenow=strftime(tnow,"%H%M") | eval useMAX=((timenow/2400)*100)] | convert num(useMAX) as IntMax  | eval license_stats=if('usedGB' &amp;gt;= 'IntMax', "WARNING", "GOOD") | fields usedGB, license_stats, IntMax 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Sep 2017 16:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329604#M98097</guid>
      <dc:creator>santiagn</dc:creator>
      <dc:date>2017-09-11T16:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329605#M98098</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest splunk_server=local /services/licenser/pools | rename title AS Pool | search [rest splunk_server=local /services/licenser/groups | search is_active=1 | eval stack_id=stack_ids | fields stack_id] | join type=outer stack_id [rest splunk_server=local /services/licenser/stacks | eval stack_id=title | eval stack_quota=quota | fields stack_id stack_quota] | stats sum(used_bytes) as used max(stack_quota) as total | eval usedGB=round(used/1024/1024/1024,4)  | appendcols [| gentimes start=-1 | eval tnow = now() | table tnow | eval timenow=strftime(tnow,"%H%M") | eval useMAX=((timenow/2400)*100)] | convert num(useMAX) as IntMax  | eval license_stats=if('usedGB' &amp;gt;= 'IntMax', "WARNING", "GOOD") | fields usedGB, license_stats, IntMax 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Sep 2017 16:53:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329605#M98098</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-11T16:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329606#M98099</link>
      <description>&lt;P&gt;events still are null and stats return same. i setthe trigger to run when number of results does not equal 0, still did not trigger&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:02:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329606#M98099</guid>
      <dc:creator>santiagn</dc:creator>
      <dc:date>2017-09-11T17:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329607#M98100</link>
      <description>&lt;P&gt;Ok. I may have misunderstand the requirement here. When you say events are null means which fields are null/not returned? &lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329607#M98100</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-11T17:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329608#M98101</link>
      <description>&lt;P&gt;sorry i did a bad job explaining. so with my query it returns my usedGB for the day under the "statistics" tab but under the "events" tab " no events found" is shown. im trying to trigger an alert to show me the statistics data but it wont trigger because the "events" tab returns null&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:11:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329608#M98101</guid>
      <dc:creator>santiagn</dc:creator>
      <dc:date>2017-09-11T17:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329609#M98102</link>
      <description>&lt;P&gt;Because your usedGB is coming from a join subsearch, the events for that will not be shown. What's the trigger condition you're using right now?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329609#M98102</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-11T17:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329610#M98103</link>
      <description>&lt;P&gt;i see and i tried all of the trigger conditions lol but right now its set to number of results = 0&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:20:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329610#M98103</guid>
      <dc:creator>santiagn</dc:creator>
      <dc:date>2017-09-11T17:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329611#M98104</link>
      <description>&lt;P&gt;So basically you want to trigger alert if you get any records with license_stats="WARNING", correct? If yes, then add following to end of your search and set the alert condition to "if number of events are greater than 0".&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search | where license_stats="WARNING"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:43:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329611#M98104</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-09-11T17:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329612#M98105</link>
      <description>&lt;P&gt;ok so then, how do i set thetrigger condition if the "events" tab is still null&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 18:57:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329612#M98105</guid>
      <dc:creator>santiagn</dc:creator>
      <dc:date>2017-09-11T18:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329613#M98106</link>
      <description>&lt;P&gt;bump i still cant figure out how to trigger alert for a statistics query please help&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 16:30:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329613#M98106</guid>
      <dc:creator>santiagn</dc:creator>
      <dc:date>2017-09-19T16:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger alert for stats query when events are null</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329614#M98107</link>
      <description>&lt;P&gt;bumping this&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 01:59:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trigger-alert-for-stats-query-when-events-are-null/m-p/329614#M98107</guid>
      <dc:creator>santiagn</dc:creator>
      <dc:date>2017-10-04T01:59:23Z</dc:date>
    </item>
  </channel>
</rss>

