<?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: eval command for two types of error in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/eval-command-for-two-types-of-error/m-p/494152#M137778</link>
    <description>&lt;P&gt;Here's the breakdown of the Code:&lt;/P&gt;

&lt;P&gt;index="app" sourcetype="rxc" host="rxc-ip*" id=7 URL="/user/unauth" OR referer="&lt;A href="https://quest.com/user/unauth*" target="_blank"&gt;https://quest.com/user/unauth*&lt;/A&gt;" earliest=-15m@m latest=now&lt;BR /&gt;
 &lt;EM&gt;- [ Base search ]&lt;/EM&gt; &lt;/P&gt;

&lt;P&gt;| dedup qid&lt;BR /&gt;
&lt;EM&gt;- Using dedup will remove all the duplicate for the specific field. &lt;BR /&gt;
- Example :  You have 30 events of "00001", and 10 events of "00002" in total of 50 events. Once you use the dedup command you will only got 1 event per each , meaning you will get only 2 rows&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;| eval "Error"=id+"-"+Name+"(Impacted-"+referer+"OR"+URL+")"&lt;BR /&gt;
| stats count by "Error"&lt;/P&gt;

&lt;P&gt;Also a screenshot or result would be helpful in this situation.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:21:58 GMT</pubDate>
    <dc:creator>jadengoho</dc:creator>
    <dc:date>2020-09-30T05:21:58Z</dc:date>
    <item>
      <title>eval command for two types of error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-command-for-two-types-of-error/m-p/494151#M137777</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have this query :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="app" sourcetype="rxc" host="rxc-ip*" id=7 URL="/user/unauth" OR referer="https://quest.com/user/unauth*"  earliest=-15m@m latest=now| dedup qid| eval "Error"=id+"-"+Name+"(Impacted-"+referer+"OR"+URL+")"| stats count by "Error"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What I am looking for is that it should count the occurrence of either URL or referer dedup the quid as some quid are common in both and then give me result like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;7-name:Impacted-/user/unauth            100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But stat is not working in this case for me ....probably because eval is not used correctly...can someone help?&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 05:05:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-command-for-two-types-of-error/m-p/494151#M137777</guid>
      <dc:creator>ksharma7</dc:creator>
      <dc:date>2020-05-06T05:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: eval command for two types of error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-command-for-two-types-of-error/m-p/494152#M137778</link>
      <description>&lt;P&gt;Here's the breakdown of the Code:&lt;/P&gt;

&lt;P&gt;index="app" sourcetype="rxc" host="rxc-ip*" id=7 URL="/user/unauth" OR referer="&lt;A href="https://quest.com/user/unauth*" target="_blank"&gt;https://quest.com/user/unauth*&lt;/A&gt;" earliest=-15m@m latest=now&lt;BR /&gt;
 &lt;EM&gt;- [ Base search ]&lt;/EM&gt; &lt;/P&gt;

&lt;P&gt;| dedup qid&lt;BR /&gt;
&lt;EM&gt;- Using dedup will remove all the duplicate for the specific field. &lt;BR /&gt;
- Example :  You have 30 events of "00001", and 10 events of "00002" in total of 50 events. Once you use the dedup command you will only got 1 event per each , meaning you will get only 2 rows&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;| eval "Error"=id+"-"+Name+"(Impacted-"+referer+"OR"+URL+")"&lt;BR /&gt;
| stats count by "Error"&lt;/P&gt;

&lt;P&gt;Also a screenshot or result would be helpful in this situation.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:21:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-command-for-two-types-of-error/m-p/494152#M137778</guid>
      <dc:creator>jadengoho</dc:creator>
      <dc:date>2020-09-30T05:21:58Z</dc:date>
    </item>
  </channel>
</rss>

