<?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: Using Eval to find the usecase in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636838#M221161</link>
    <description>&lt;LI-CODE lang="markup"&gt;| eval alert_type=case(like(alert_name,"%pdm%"), "pdm", like(alert_name,"%encrypted%"), "encrypted", 1==1, "notpdm")
| chart count by user alert_type
| where pdm &amp;gt; 0 AND encrypted &amp;gt; 0&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;| eval alert_type=case(like(alert_name,"%pdm%"), "pdm", like(alert_name,"%encrypted%"), "encrypted", 1==1, "notpdm")
| chart count by user alert_type
| where notpdm &amp;gt; 1&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 31 Mar 2023 08:10:56 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2023-03-31T08:10:56Z</dc:date>
    <item>
      <title>How to use eval to find the usecase?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636824#M221153</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Could any one able to write the query for the use case if user triggers both alerts (alert_name="*pdm*" AND alert_name="*encrypted*") in between 2 hours&lt;BR /&gt;&lt;BR /&gt;another use case is alertname!="*pdm*" if user triggers other than pdm alert in between 2 hours&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;need a query for above use cases&amp;nbsp;&lt;BR /&gt;thanks...&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 10:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636824#M221153</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-04-04T10:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636831#M221157</link>
      <description>&lt;P&gt;You could start by counting the alerts by user over a two hour period&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count by user alert_name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Then classify the alerts&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval alert_type=case(like(alert_name,"%pdm%"), "pdm", like(alert_name,"%encrypted%"), "encrypted", 1==1, "notpdm")
| chart count by user alert_type
| where (pdm &amp;gt; 0 AND encrypted &amp;gt; 0) OR notpdm &amp;gt; 1&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Mar 2023 07:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636831#M221157</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-31T07:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636836#M221160</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, Could you please make search seperate as per the use case instead of all in one search&lt;/P&gt;&lt;P&gt;1.Use case alert_name= "*pdm*" AND alert_name="*encrypted*"&lt;/P&gt;&lt;P&gt;Both alerts in between 2 hours.&lt;/P&gt;&lt;P&gt;2. Use case alertname!="*pdm*"&lt;/P&gt;&lt;P&gt;Between 2 hours of period.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 07:37:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636836#M221160</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-03-31T07:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636838#M221161</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval alert_type=case(like(alert_name,"%pdm%"), "pdm", like(alert_name,"%encrypted%"), "encrypted", 1==1, "notpdm")
| chart count by user alert_type
| where pdm &amp;gt; 0 AND encrypted &amp;gt; 0&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;| eval alert_type=case(like(alert_name,"%pdm%"), "pdm", like(alert_name,"%encrypted%"), "encrypted", 1==1, "notpdm")
| chart count by user alert_type
| where notpdm &amp;gt; 1&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Mar 2023 08:10:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636838#M221161</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-31T08:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636843#M221162</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second use case is like alert_ name other than pdm, dnt mention encrypted,we are not interested in encrypted alert_name in second search.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alert_ name!= "*pdm*"&lt;/P&gt;&lt;P&gt;Here we are using *pdm* coz to find the similar word pdm in alert_name&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pls remove encrypted from query it is different alert type ,&lt;/P&gt;&lt;P&gt;Only need alert_name !="*pdm*"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 08:36:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636843#M221162</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-03-31T08:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636844#M221163</link>
      <description>&lt;P&gt;It is a simple change - you could have done it yourself?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval alert_type=case(like(alert_name,"%pdm%"), "pdm", 1==1, "notpdm")
| chart count by user alert_type
| where notpdm &amp;gt; 1&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Mar 2023 08:48:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636844#M221163</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-31T08:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636856#M221169</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Could you pls check why this query is&amp;nbsp; not listing all the stats&amp;nbsp; fields in the output&lt;BR /&gt;index=es sourcetype=alert (alert_name!="*PDM*")&lt;BR /&gt;| stats earliest(_time) as incident_time,&lt;BR /&gt;values(severity) as severity,&lt;BR /&gt;values(action) as action,&lt;BR /&gt;values(file_type) as file_type,&lt;BR /&gt;values(exposure) as exposure,&lt;BR /&gt;values(url) as url,&lt;BR /&gt;values(device) as device&lt;BR /&gt;by user,alert_name&lt;BR /&gt;| eval alert_type=case(like(alert_name,"%pdm%"), "pdm", 1==1, "notpdm")&lt;BR /&gt;| chart count by user alert_type&lt;BR /&gt;| where notpdm &amp;gt; 1&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 10:13:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636856#M221169</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-03-31T10:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636857#M221170</link>
      <description>&lt;P&gt;Try it this way&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=es sourcetype=alert NOT (alert_name="*PDM*")&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Mar 2023 10:15:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636857#M221170</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-31T10:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636859#M221172</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why still it is not listing out the stats fields mentioned ? What could be the reason&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 10:24:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636859#M221172</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-03-31T10:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636860#M221173</link>
      <description>&lt;P&gt;The chart command has two dimensions - in your case, these are user, and alert_type, against which there is a count.&lt;/P&gt;&lt;P&gt;If you want more fields, don't use chart.&lt;/P&gt;&lt;P&gt;What are you attempting to show?&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 10:27:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636860#M221173</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-31T10:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636870#M221174</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Other fields as well like dlprule,filetype,incidentime&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 12:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636870#M221174</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-03-31T12:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636887#M221176</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In this search you didn't mention any time interval like the period of two hours&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the user triggers the non pdm alerts in between 2 hours of&amp;nbsp; time&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 13:45:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636887#M221176</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-03-31T13:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636892#M221178</link>
      <description>&lt;P&gt;Don't use chart!&lt;/P&gt;&lt;P&gt;Try with eventstats&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eventstats count by user alert_type
| where alert_type=="notpdm" AND count &amp;gt; 1&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Mar 2023 14:03:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/636892#M221178</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-31T14:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/638431#M221268</link>
      <description>&lt;P class="lia-align-left"&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P class="lia-align-left"&gt;Pls could you make the search in between 2 hours more than 3 times if user triggers alert other than pdm&lt;/P&gt;&lt;P class="lia-align-left"&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 17:49:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/638431#M221268</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-04-03T17:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Eval to find the usecase</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/638577#M221281</link>
      <description>&lt;P&gt;Change the timeframe of the search to be the time period you want.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 07:45:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-eval-to-find-the-usecase/m-p/638577#M221281</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-04-04T07:45:50Z</dc:date>
    </item>
  </channel>
</rss>

