<?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 to write condition in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-write-condition/m-p/490465#M8704</link>
    <description>&lt;P&gt;Hi yvreddy90,&lt;BR /&gt;
At first you should try your search  putting attention to the field names (don't use spaces); false_perc.&lt;BR /&gt;
Then you have to be sure that "f" and "t" fields have values, so you can calculate the false_perc field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=logs OR index=audit) source="commtasks-logger" id=finishedcommtask 
| stats count by data.succeeded 
| transpose header_field="data.succeeded" 
| eval false_perc=(f/(f+t))*100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then, when you'll be sure of this, at the end of your search you can add the condition:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where false_perc&amp;gt;10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So if you have results you can trigger the alert.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:16:13 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-09-30T02:16:13Z</dc:date>
    <item>
      <title>How to write condition</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-write-condition/m-p/490463#M8702</link>
      <description>&lt;P&gt;(index=logs OR index=audit) AND source="commtasks-logger" AND id=finishedcommtask |stats count by data.succeeded | transpose header_field="data.succeeded" | eval false perc = (f/(f+t))*100 | eval true perc = (t/(f+t))*100 &lt;/P&gt;

&lt;P&gt;This my query based on this how to write a condition is  "false perc &amp;gt;10" trigger alert&lt;/P&gt;

&lt;P&gt;Please help me anyone&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:20:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-write-condition/m-p/490463#M8702</guid>
      <dc:creator>yvreddy90</dc:creator>
      <dc:date>2020-09-30T02:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to write condition</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-write-condition/m-p/490464#M8703</link>
      <description>&lt;P&gt;did you try &lt;CODE&gt;... | top data.succeeded&lt;/CODE&gt; instead of your &lt;CODE&gt;... | stats count ...&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 20:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-write-condition/m-p/490464#M8703</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2019-09-26T20:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to write condition</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-write-condition/m-p/490465#M8704</link>
      <description>&lt;P&gt;Hi yvreddy90,&lt;BR /&gt;
At first you should try your search  putting attention to the field names (don't use spaces); false_perc.&lt;BR /&gt;
Then you have to be sure that "f" and "t" fields have values, so you can calculate the false_perc field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=logs OR index=audit) source="commtasks-logger" id=finishedcommtask 
| stats count by data.succeeded 
| transpose header_field="data.succeeded" 
| eval false_perc=(f/(f+t))*100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then, when you'll be sure of this, at the end of your search you can add the condition:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where false_perc&amp;gt;10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So if you have results you can trigger the alert.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:16:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-write-condition/m-p/490465#M8704</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-30T02:16:13Z</dc:date>
    </item>
  </channel>
</rss>

