<?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: SPL - mergin two values of a field into the same one in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543622#M9728</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223684"&gt;@MLGSPLUNK&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Since you are using &lt;STRONG&gt;first&lt;/STRONG&gt; function in chart command, you get only first High value. You should use &lt;STRONG&gt;sum&lt;/STRONG&gt; function. Please try below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats summariesonly=true allow_old_summaries=true count from datamodel=Intrusion_Detection.IDS_Attacks by IDS_Attacks.severity
| rename IDS_Attacks.*as *
| eval temp=""
| eval severity = if(severity="high","High", severity)
| chart useother=true sum(count) over temp by severity
| rename temp as count&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 13 Mar 2021 08:45:42 GMT</pubDate>
    <dc:creator>scelikok</dc:creator>
    <dc:date>2021-03-13T08:45:42Z</dc:date>
    <item>
      <title>SPL - mergin two values of a field into the same one</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543059#M9722</link>
      <description>&lt;P&gt;Hi Community.&lt;/P&gt;&lt;P&gt;I have this SPL:&lt;/P&gt;&lt;P&gt;| tstats summariesonly=true allow_old_summaries=true count from datamodel=Intrusion_Detection.IDS_Attacks by IDS_Attacks.severity&lt;BR /&gt;| rename "IDS_Attacks.*" as "*"&lt;BR /&gt;| eval temp=""&lt;BR /&gt;| chart useother=true first(count) over temp by severity&lt;BR /&gt;| rename temp as count&lt;/P&gt;&lt;P&gt;And its working fine. However, I have values for IDS_Attacks.severity in form of "high" and "High" appart from other values, wich i woudl like to keep intact.&lt;/P&gt;&lt;P&gt;The SPL is counting the two values as different values, and I would like them to be merged into one count as "High".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| tstats summariesonly=true allow_old_summaries=true count from datamodel=Intrusion_Detection.IDS_Attacks by IDS_Attacks.severity&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;| rename IDS_Attacks.severity as severity2&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;| eval temp=""&lt;BR /&gt;| eval severity3 = if(&lt;SPAN&gt;severity2&lt;/SPAN&gt;="high","High",&amp;nbsp;&lt;SPAN&gt;severity2&lt;/SPAN&gt;)&lt;BR /&gt;| chart useother=true first(count) over temp by severidad2&lt;BR /&gt;| rename temp as count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and its not working.&lt;/P&gt;&lt;P&gt;Note I need the SPL to be showing a report from a dashboard.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 16:19:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543059#M9722</guid>
      <dc:creator>MLGSPLUNK</dc:creator>
      <dc:date>2021-03-09T16:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: SPL - mergin two values of a field into the same one</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543079#M9723</link>
      <description>&lt;P&gt;The second query likely is failing because the stats command uses a field that is not specified anywhere else.&amp;nbsp; Also, you don't need interim severity fields.&amp;nbsp; &amp;nbsp;Try this query.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats summariesonly=true allow_old_summaries=true count from datamodel=Intrusion_Detection.IDS_Attacks by IDS_Attacks.severity
| rename IDS_Attacks.*as *
| eval temp=""
| eval severity = if(severity="high","High", severity)
| chart useother=true first(count) over temp by severity
| rename temp as count&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 Mar 2021 18:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543079#M9723</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-09T18:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: SPL - mergin two values of a field into the same one</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543082#M9724</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;thanks for the input, but this query appears to not add up the values from "high" and "High".&lt;/P&gt;&lt;P&gt;My count after your query says 87 events with High, and there are no events "high" counted.&lt;/P&gt;&lt;P&gt;What I mean is that it shoudl add up values from high and High after the eval command, right?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 18:42:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543082#M9724</guid>
      <dc:creator>MLGSPLUNK</dc:creator>
      <dc:date>2021-03-09T18:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: SPL - mergin two values of a field into the same one</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543085#M9725</link>
      <description>&lt;P&gt;Before state of what I get with the spl. I would like to add up the High and high values...&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 18:43:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543085#M9725</guid>
      <dc:creator>MLGSPLUNK</dc:creator>
      <dc:date>2021-03-09T18:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: SPL - mergin two values of a field into the same one</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543101#M9726</link>
      <description>&lt;P&gt;My reply is based on the requirement "&lt;SPAN&gt;&lt;STRONG&gt;The SPL is counting the two values as different values, and I would like them to be merged into one count as "High".&lt;/STRONG&gt;"&amp;nbsp; There is no "high" anymore - there is just "High" (and, I presume, "Low").&amp;nbsp; If that's not what is desired then clarify the requirements.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 19:35:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543101#M9726</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-03-09T19:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: SPL - mergin two values of a field into the same one</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543106#M9727</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;the requirement is that after the sum of "high" and "High" the count doesn't appear like:&lt;/P&gt;&lt;P&gt;sum of "high" values = 10&lt;/P&gt;&lt;P&gt;sum of "High" values=20&lt;/P&gt;&lt;P&gt;I need to have a total of sum of "High" values = 30 (that's the sole purpose of the eval command).&lt;/P&gt;&lt;P&gt;Thanks for the insight.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 20:31:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543106#M9727</guid>
      <dc:creator>MLGSPLUNK</dc:creator>
      <dc:date>2021-03-09T20:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: SPL - mergin two values of a field into the same one</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543622#M9728</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/223684"&gt;@MLGSPLUNK&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Since you are using &lt;STRONG&gt;first&lt;/STRONG&gt; function in chart command, you get only first High value. You should use &lt;STRONG&gt;sum&lt;/STRONG&gt; function. Please try below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats summariesonly=true allow_old_summaries=true count from datamodel=Intrusion_Detection.IDS_Attacks by IDS_Attacks.severity
| rename IDS_Attacks.*as *
| eval temp=""
| eval severity = if(severity="high","High", severity)
| chart useother=true sum(count) over temp by severity
| rename temp as count&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 13 Mar 2021 08:45:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543622#M9728</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-03-13T08:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: SPL - mergin two values of a field into the same one</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543780#M9729</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206061"&gt;@scelikok&lt;/a&gt;&amp;nbsp;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 06:43:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/SPL-mergin-two-values-of-a-field-into-the-same-one/m-p/543780#M9729</guid>
      <dc:creator>MLGSPLUNK</dc:creator>
      <dc:date>2021-03-15T06:43:15Z</dc:date>
    </item>
  </channel>
</rss>

