<?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 show results if 2 values are true in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668483#M229328</link>
    <description>&lt;P&gt;I may not totally understand how imperva identifies unique events&lt;BR /&gt;This query shows alot of confusing results. seems for every event our main site also gets a&amp;nbsp;cs_sessionid which I was led to believe was a unique identifier. AS you can see in the screenshot, the results are kina skewed.&lt;BR /&gt;index=imperva sourcetype=imperva:waf (sc_action="REQ_CHALLENGE_CAPTCHA" OR sc_action="REQ_PASSED") s_computername=*&lt;BR /&gt;| transaction maxspan=1m startswith="sc_action=REQ_CHALLENGE_CAPTCHA" endswith="sc_action=REQ_PASSED"&lt;BR /&gt;| where sc_action="REQ_PASSED" OR sc_action="REQ_CHALLENGE_CAPTCHA"&lt;BR /&gt;| eval human_readable_time=strftime(min(_time),"%Y-%m-%d %H:%M:%S")&lt;BR /&gt;| mvexpand human_readable_time&lt;BR /&gt;| table human_readable_time, s_computername, sc_action, c_ip, cs_sessionid | rename human_readable_time AS Date/Time, s_computername AS "Web Server", sc_action AS "Request Response", cs_sessionid AS "Client Session ID", c_ip AS "client IP"&lt;/P&gt;</description>
    <pubDate>Tue, 14 Nov 2023 00:08:17 GMT</pubDate>
    <dc:creator>Dallastek1</dc:creator>
    <dc:date>2023-11-14T00:08:17Z</dc:date>
    <item>
      <title>How to show results if 2 values are true</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668473#M229324</link>
      <description>&lt;P&gt;Im trying to get specific results if two values in the same field are true but I keep failing&lt;/P&gt;&lt;P&gt;I want to count the number of times a&amp;nbsp; sc_action=REQ_PASSED when&amp;nbsp;sc_action=REQ_CHALLENGE_CAPTCHA was required&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this :&lt;/P&gt;&lt;P&gt;My search&amp;nbsp;&lt;SPAN&gt;| eval activity=if(IN(sc_action, "REQ_CHALLENGE_CAPTCHA", "REQ_PASSED")"passed","captcha") | stats count by activity&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I tried if/where and evals, I either get get an error or I get all the results where both are true. Maybe im overthinking it&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 22:14:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668473#M229324</guid>
      <dc:creator>Dallastek1</dc:creator>
      <dc:date>2023-11-13T22:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to show results if 2 values are true</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668478#M229327</link>
      <description>&lt;P&gt;Your eval is wrong - you don't need IN&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search...
| eval activity=case(sc_action="REQ_CHALLENGE_CAPTCHA", "captcha", sc_action="REQ_PASSED","passed", true(), sc_action)
| stats count by activity&lt;/LI-CODE&gt;&lt;P&gt;but that will just give you counters of each - are you looking to relate that to a user or IP and should one event follow the other - if so, that's not enough.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 22:50:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668478#M229327</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-11-13T22:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to show results if 2 values are true</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668483#M229328</link>
      <description>&lt;P&gt;I may not totally understand how imperva identifies unique events&lt;BR /&gt;This query shows alot of confusing results. seems for every event our main site also gets a&amp;nbsp;cs_sessionid which I was led to believe was a unique identifier. AS you can see in the screenshot, the results are kina skewed.&lt;BR /&gt;index=imperva sourcetype=imperva:waf (sc_action="REQ_CHALLENGE_CAPTCHA" OR sc_action="REQ_PASSED") s_computername=*&lt;BR /&gt;| transaction maxspan=1m startswith="sc_action=REQ_CHALLENGE_CAPTCHA" endswith="sc_action=REQ_PASSED"&lt;BR /&gt;| where sc_action="REQ_PASSED" OR sc_action="REQ_CHALLENGE_CAPTCHA"&lt;BR /&gt;| eval human_readable_time=strftime(min(_time),"%Y-%m-%d %H:%M:%S")&lt;BR /&gt;| mvexpand human_readable_time&lt;BR /&gt;| table human_readable_time, s_computername, sc_action, c_ip, cs_sessionid | rename human_readable_time AS Date/Time, s_computername AS "Web Server", sc_action AS "Request Response", cs_sessionid AS "Client Session ID", c_ip AS "client IP"&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 00:08:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668483#M229328</guid>
      <dc:creator>Dallastek1</dc:creator>
      <dc:date>2023-11-14T00:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to show results if 2 values are true</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668488#M229331</link>
      <description>&lt;P&gt;If you use transaction (which I advise against) you need to correlate with the session id - as you can see in your rows 2 and 3, the session id ending in 93 is out of sync with your rows&lt;/P&gt;&lt;P&gt;Generally the way to find these things is to use something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search....
| stats min(_time) as min max(_time) as max values(*) as * by cs_sessionid&lt;/LI-CODE&gt;&lt;P&gt;and in the stats, collect the values you want (instead of values(*) as *)&lt;/P&gt;&lt;P&gt;You won't hit the limitations of transaction with large data sets which silently break your results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Nov 2023 01:04:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-show-results-if-2-values-are-true/m-p/668488#M229331</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-11-14T01:04:57Z</dc:date>
    </item>
  </channel>
</rss>

