<?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 Why is it showing more data after dc count with the right order? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634566#M220449</link>
    <description>&lt;P&gt;Hi! im working on an alert for access from different countries for certain users in a short time period. The alert and the search works fine but i will like to show more info when the alert triggers (source ip and time).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here a sample of the event:&lt;/P&gt;
&lt;P&gt;09:09:55,377 INFO [XX.XXX.XXXXXXX.cbapi.dao.login.LoginDAOImpl] (default task-34878) Enviamos parámetros: [authTipoPassword=E, authDato=4249929, authTipoDato=D, nroDocEmpresa=80097256-2, tipoDocEmpresa=D, authCodCanal=999, authIP=45.170.128.191, esDealer=N, dispositivoID=40ee57e1-e5eb-4b14-b7ef-9f0f8ccdf6c&lt;/P&gt;
&lt;P&gt;2, dispositivoOS=null ]&lt;/P&gt;
&lt;P&gt;Here the search:&lt;/P&gt;
&lt;P&gt;index="XXXX" host="XXX.XXX.-*" sourcetype=XXXXXXCBAPI*&amp;nbsp; authDato authIP dao.login.LoginDAOImpl authIP=* authCodCanal=999 | iplocation authIP | eval Country = if(isnull(Country) OR Country="", "Unknown", Country) | stats&lt;BR /&gt;dc(Country) AS count&lt;BR /&gt;values(Country) AS country values(authIP) as authIP&lt;BR /&gt;latest(_time) AS latest&lt;BR /&gt;BY authDato | where count &amp;gt; 1 | eval latest=strftime(latest,"%Y-%m-%d %H:%M:%S") | sort - latest&lt;/P&gt;
&lt;P&gt;With this i get a result like this:&lt;/P&gt;
&lt;P&gt;authdato | count | Country | authIP | latest&lt;/P&gt;
&lt;P&gt;2363494 | 2 |&amp;nbsp; &amp;nbsp;Argentina |&amp;nbsp;170.51.250.39 |&amp;nbsp;2023-03-15 09:09:09&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Paraguay |&amp;nbsp;170.51.55.186&lt;BR /&gt;&lt;BR /&gt;the thing is.. the ip address aren't aligned with the country for that ip, neither the time is aligned with the last Country or ip address.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Ive tried several things but still can't figure out how to correctly present the results (in the right order i mean)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2023 18:35:23 GMT</pubDate>
    <dc:creator>dieguiariel</dc:creator>
    <dc:date>2023-03-15T18:35:23Z</dc:date>
    <item>
      <title>Why is it showing more data after dc count with the right order?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634566#M220449</link>
      <description>&lt;P&gt;Hi! im working on an alert for access from different countries for certain users in a short time period. The alert and the search works fine but i will like to show more info when the alert triggers (source ip and time).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here a sample of the event:&lt;/P&gt;
&lt;P&gt;09:09:55,377 INFO [XX.XXX.XXXXXXX.cbapi.dao.login.LoginDAOImpl] (default task-34878) Enviamos parámetros: [authTipoPassword=E, authDato=4249929, authTipoDato=D, nroDocEmpresa=80097256-2, tipoDocEmpresa=D, authCodCanal=999, authIP=45.170.128.191, esDealer=N, dispositivoID=40ee57e1-e5eb-4b14-b7ef-9f0f8ccdf6c&lt;/P&gt;
&lt;P&gt;2, dispositivoOS=null ]&lt;/P&gt;
&lt;P&gt;Here the search:&lt;/P&gt;
&lt;P&gt;index="XXXX" host="XXX.XXX.-*" sourcetype=XXXXXXCBAPI*&amp;nbsp; authDato authIP dao.login.LoginDAOImpl authIP=* authCodCanal=999 | iplocation authIP | eval Country = if(isnull(Country) OR Country="", "Unknown", Country) | stats&lt;BR /&gt;dc(Country) AS count&lt;BR /&gt;values(Country) AS country values(authIP) as authIP&lt;BR /&gt;latest(_time) AS latest&lt;BR /&gt;BY authDato | where count &amp;gt; 1 | eval latest=strftime(latest,"%Y-%m-%d %H:%M:%S") | sort - latest&lt;/P&gt;
&lt;P&gt;With this i get a result like this:&lt;/P&gt;
&lt;P&gt;authdato | count | Country | authIP | latest&lt;/P&gt;
&lt;P&gt;2363494 | 2 |&amp;nbsp; &amp;nbsp;Argentina |&amp;nbsp;170.51.250.39 |&amp;nbsp;2023-03-15 09:09:09&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Paraguay |&amp;nbsp;170.51.55.186&lt;BR /&gt;&lt;BR /&gt;the thing is.. the ip address aren't aligned with the country for that ip, neither the time is aligned with the last Country or ip address.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Ive tried several things but still can't figure out how to correctly present the results (in the right order i mean)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 18:35:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634566#M220449</guid>
      <dc:creator>dieguiariel</dc:creator>
      <dc:date>2023-03-15T18:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Showing more data after dc count with the right order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634571#M220451</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;values&lt;/FONT&gt; function returns unique values of a field in alphabetical order.&amp;nbsp; You can't change that.&lt;/P&gt;&lt;P&gt;Try the &lt;FONT face="courier new,courier"&gt;list&lt;/FONT&gt; function, instead, which return all values in the order they were found.&amp;nbsp; Only 100 values are returned, however.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 12:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634571#M220451</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-03-15T12:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Showing more data after dc count with the right order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634572#M220452</link>
      <description>&lt;P&gt;Use list() rather than values() - values() will put the values in (lexicographical) order and removes duplicates, whereas list() maintains the order and duplicates.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 12:43:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634572#M220452</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-03-15T12:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Showing more data after dc count with the right order</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634579#M220453</link>
      <description>&lt;P&gt;Hi! thank yoy both for the answer, it worked with list!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2023 13:02:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-it-showing-more-data-after-dc-count-with-the-right-order/m-p/634579#M220453</guid>
      <dc:creator>dieguiariel</dc:creator>
      <dc:date>2023-03-15T13:02:08Z</dc:date>
    </item>
  </channel>
</rss>

