<?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: splunk query with if condition in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-if-condition/m-p/554103#M157306</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;check stats + eval from this page&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.0/SearchReference/Stats" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.0/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I think that this is your solution.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
    <pubDate>Wed, 02 Jun 2021 14:15:52 GMT</pubDate>
    <dc:creator>isoutamo</dc:creator>
    <dc:date>2021-06-02T14:15:52Z</dc:date>
    <item>
      <title>splunk query with if condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-if-condition/m-p/554101#M157305</link>
      <description>&lt;P&gt;Hi Team&lt;BR /&gt;&lt;BR /&gt;i want to display the success and failure count for that i have only one field i.e&lt;BR /&gt;&lt;BR /&gt;b_failed="false"&lt;BR /&gt;&lt;BR /&gt;using this i could get the success count how can i get the count of jobs that are failed&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Below is the query and it doesnt return the failure count&lt;BR /&gt;&lt;BR /&gt;....|eval status=if(b_failed="false","success","failed")&lt;BR /&gt;&amp;nbsp; &amp;nbsp; |stats count(status) as count&lt;BR /&gt;&lt;BR /&gt;can someone please correct me&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 14:04:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-if-condition/m-p/554101#M157305</guid>
      <dc:creator>Nith1</dc:creator>
      <dc:date>2021-06-02T14:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with if condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-if-condition/m-p/554103#M157306</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;check stats + eval from this page&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.0/SearchReference/Stats" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.0/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I think that this is your solution.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2021 14:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-if-condition/m-p/554103#M157306</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-06-02T14:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: splunk query with if condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-if-condition/m-p/554104#M157307</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|stats sum(eval(if(b_failed="false",1,0))) as success_count, sum(eval(if(b_failed="false",0,1))) as failed_count&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Jun 2021 14:17:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splunk-query-with-if-condition/m-p/554104#M157307</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2021-06-02T14:17:51Z</dc:date>
    </item>
  </channel>
</rss>

