<?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: Custom Condition in Alert in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Custom-Condition-in-Alert/m-p/84095#M12265</link>
    <description>&lt;P&gt;Just found out in alert condition you need to use . to concatenate search currentday = " ".date_mday&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jan 2013 17:51:04 GMT</pubDate>
    <dc:creator>pdash</dc:creator>
    <dc:date>2013-01-11T17:51:04Z</dc:date>
    <item>
      <title>Custom Condition in Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-in-Alert/m-p/84093#M12263</link>
      <description>&lt;P&gt;I want to have a custom condition where am comparing two fields of my search. One returns the current day (%e) and the other returns date_mday. How do I write this condition because %e has a space before it. So should it be like this?&lt;/P&gt;

&lt;P&gt;search currentday = " "+date_mday &lt;/P&gt;

&lt;P&gt;How to concatenate the space or is there a way i can get the current day without that space or a zero&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2013 18:46:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-in-Alert/m-p/84093#M12263</guid>
      <dc:creator>pdash</dc:creator>
      <dc:date>2013-01-10T18:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition in Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-in-Alert/m-p/84094#M12264</link>
      <description>&lt;P&gt;Found the solution. So in this alert I wanted to compare date_mday with my Today field and trigger an alert when it happens today. Here goes the details&lt;/P&gt;

&lt;P&gt;The query would be:&lt;BR /&gt;
index=_internal source=*license_usage.log type=Usage | eval MB=b/1024/1024 | stats sum(MB) as TotalMBUsed by pool, date_mday|eval Today=trim((strftime(now(), "%e")), " ")| eval MBExceededBy = 512000 - TotalMBUsed |eval MBAvailable = 512000 |eval Environment = "DEV" |eval TriggeredOn = if((match(date_mday,Today)), "Today", date_mday)|where TotalMBUsed &amp;gt; 512000&lt;/P&gt;

&lt;P&gt;Time Range is @mon to now&lt;/P&gt;

&lt;P&gt;Custom Condtion is "search TriggeredOn = Today"&lt;/P&gt;

&lt;P&gt;This would trigger the alert on the day a violation occurs and the alert table will have all the violation of that month so that you know how many violations you have done in this month.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-in-Alert/m-p/84094#M12264</guid>
      <dc:creator>pdash</dc:creator>
      <dc:date>2020-09-28T13:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Condition in Alert</title>
      <link>https://community.splunk.com/t5/Alerting/Custom-Condition-in-Alert/m-p/84095#M12265</link>
      <description>&lt;P&gt;Just found out in alert condition you need to use . to concatenate search currentday = " ".date_mday&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jan 2013 17:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Custom-Condition-in-Alert/m-p/84095#M12265</guid>
      <dc:creator>pdash</dc:creator>
      <dc:date>2013-01-11T17:51:04Z</dc:date>
    </item>
  </channel>
</rss>

