<?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 Regex inside eval is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-inside-eval-is-not-working/m-p/556881#M158167</link>
    <description>&lt;P&gt;I am trying to do a stats count where 2XX https response means as success and any non 2XX means that it's a failure. I am using below snippet. But it doesn't work. Am I missing something ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stats&amp;nbsp; count(eval(httpresponse="2*")) as TRANSACTIONS_SUCCESS,&amp;nbsp; count(eval(httpresponse!="2*"))&amp;nbsp;as TRANSACTIONS_FAILURE by service&lt;/P&gt;</description>
    <pubDate>Wed, 23 Jun 2021 15:41:16 GMT</pubDate>
    <dc:creator>pjtbasu</dc:creator>
    <dc:date>2021-06-23T15:41:16Z</dc:date>
    <item>
      <title>Regex inside eval is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-inside-eval-is-not-working/m-p/556881#M158167</link>
      <description>&lt;P&gt;I am trying to do a stats count where 2XX https response means as success and any non 2XX means that it's a failure. I am using below snippet. But it doesn't work. Am I missing something ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stats&amp;nbsp; count(eval(httpresponse="2*")) as TRANSACTIONS_SUCCESS,&amp;nbsp; count(eval(httpresponse!="2*"))&amp;nbsp;as TRANSACTIONS_FAILURE by service&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 15:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-inside-eval-is-not-working/m-p/556881#M158167</guid>
      <dc:creator>pjtbasu</dc:creator>
      <dc:date>2021-06-23T15:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regex inside eval is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-inside-eval-is-not-working/m-p/556882#M158168</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/71017"&gt;@pjtbasu&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| stats sum(eval(if(like(httpresponse,"2%"),1,0))) as TRANSACTIONS_SUCCESS, sum(eval(if(!like(httpresponse,"2%"),1,0))) as TRANSACTIONS_FAILURE by service&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 15:48:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-inside-eval-is-not-working/m-p/556882#M158168</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-23T15:48:13Z</dc:date>
    </item>
  </channel>
</rss>

