<?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: stats count returning servers more than once using dedup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706094#M238989</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274630"&gt;@Thomas2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;conferming what &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;pointed out,&amp;nbsp;&lt;/P&gt;&lt;P&gt;let us know if we can help you more, or, please, accept one answer for the other people of Community.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Dec 2024 06:56:13 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-12-06T06:56:13Z</dc:date>
    <item>
      <title>stats count returning servers more than once using dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706031#M238977</link>
      <description>&lt;P&gt;Trying to get a count of servers sending logs to an index "cloud_servers", Running this command to get the count:&lt;BR /&gt;index=cloud_servers | search host="*server_name-h-nk01-*" | dedup host | stats count&lt;BR /&gt;The problem is, some servers it's counting twice because the server names appear with and without a fqdn depending on the type of log being sent.&amp;nbsp; So dedup doesn't work since technically it is a unique host.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Example of the same server appearing with two host names:&lt;BR /&gt;host buffnybd1-h-nk01-555&lt;BR /&gt;host buffnybd1-h-nk01-555.nyny.os1.com&lt;BR /&gt;Is there a way to count the server just using the first 20 or so digits, so it will ingore the fqdn?&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 16:20:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706031#M238977</guid>
      <dc:creator>Thomas2</dc:creator>
      <dc:date>2024-12-05T16:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: stats count returning servers more than once using dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706034#M238978</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274630"&gt;@Thomas2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;at first don't use the search command after the mai nsearch.&lt;/P&gt;&lt;P&gt;then anyway, you can use the rex command to extract the first part of the field or eval to use the first 20 chars.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=cloud_servers host="*server_name-h-nk01-*"
| rex field=host "^(?&amp;lt;host&amp;gt;[^\.]+)"
| stats dc(host) AS count&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 16:26:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706034#M238978</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-12-05T16:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: stats count returning servers more than once using dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706053#M238979</link>
      <description>&lt;P&gt;Let me give this a try.&amp;nbsp; Thank you,&amp;nbsp;&lt;SPAN&gt;Giuseppe&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 19:53:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706053#M238979</guid>
      <dc:creator>Thomas2</dc:creator>
      <dc:date>2024-12-05T19:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: stats count returning servers more than once using dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706073#M238983</link>
      <description>&lt;P&gt;Also unless you absolutely have to, avoid using leading wildcards in the search term&amp;nbsp;&lt;STRONG&gt;host="*..."&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 23:57:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706073#M238983</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-12-05T23:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: stats count returning servers more than once using dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706094#M238989</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274630"&gt;@Thomas2&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;conferming what &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;pointed out,&amp;nbsp;&lt;/P&gt;&lt;P&gt;let us know if we can help you more, or, please, accept one answer for the other people of Community.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 06:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706094#M238989</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-12-06T06:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: stats count returning servers more than once using dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706187#M239012</link>
      <description>&lt;P&gt;Yes this worked, thank you very much&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 18:22:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706187#M239012</guid>
      <dc:creator>Thomas2</dc:creator>
      <dc:date>2024-12-06T18:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: stats count returning servers more than once using dedup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706188#M239013</link>
      <description>&lt;P&gt;Yes I took out the leading *.&amp;nbsp; Thank you much&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2024 18:23:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-count-returning-servers-more-than-once-using-dedup/m-p/706188#M239013</guid>
      <dc:creator>Thomas2</dc:creator>
      <dc:date>2024-12-06T18:23:19Z</dc:date>
    </item>
  </channel>
</rss>

