<?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: Why is geostats not showing data for all expected countries when the search finishes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224778#M66231</link>
    <description>&lt;P&gt;Hi @kskujawa&lt;/P&gt;

&lt;P&gt;Please do not downvote someone unless they've suggested something that is not best practice and could potentially do harm in a Splunk environment. Simply comment to ask for more information in the future, and upvote questions, comments, and answers that you find helpful. To learn more about voting etiquette in this community and Splunk Answers, check out this previous Answers post on the topic:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/244111/proper-etiquette-and-timing-for-voting-here-on-ans.html"&gt;https://answers.splunk.com/answers/244111/proper-etiquette-and-timing-for-voting-here-on-ans.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Sep 2016 23:24:41 GMT</pubDate>
    <dc:creator>ppablo</dc:creator>
    <dc:date>2016-09-12T23:24:41Z</dc:date>
    <item>
      <title>Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224770#M66223</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;I have an issue trying to visualize data on a map. I don't have an extra plugin and is not a search by IP.&lt;/P&gt;

&lt;P&gt;Now, I'm trying to get the lat and log from a lookup and count the events per country, then, visualize it on the map.&lt;/P&gt;

&lt;P&gt;Here is my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="*alerts"    | dedup Alert    | rename Country as country    | lookup countries.csv  country | rename latitude as lat | rename longitude as lon |eventstats count(Alert) as alerts by country  | geostats  count(alerts) by country globallimit=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With this, I want to count number of alerts per country.&lt;/P&gt;

&lt;P&gt;While the search is processing, it is showing all the countries (really not all, but I just miss 3) like this:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1296i7B38BBF095F247E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;But when the search ends, it show this:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1297i1EB7FF8C37A93F1B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Can you help me and tell what I'm doing wrong or what is causing countries as USA or Japan to not show up on the map when the search is finished?&lt;/P&gt;

&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2016 12:45:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224770#M66223</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2016-04-28T12:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224771#M66224</link>
      <description>&lt;P&gt;Also, why it don't sum up all the events for each country, I have X events in different geobin for each country, why is that?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2016 08:09:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224771#M66224</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2016-04-29T08:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224772#M66225</link>
      <description>&lt;P&gt;I've resolved myself this question. Thakn you all the visitors for check it!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2016 07:18:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224772#M66225</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2016-07-21T07:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224773#M66226</link>
      <description>&lt;P&gt;Hi @marina_rovira&lt;/P&gt;

&lt;P&gt;Glad you were able to solve your question, but would you actually be able to share your final working solution here so other users can learn how you got your desired result?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2016 23:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224773#M66226</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-07-26T23:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224774#M66227</link>
      <description>&lt;P&gt;I downvoted this post because how?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2016 18:23:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224774#M66227</guid>
      <dc:creator>kskujawa</dc:creator>
      <dc:date>2016-08-30T18:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224775#M66228</link>
      <description>&lt;P&gt;Hey, I haven't answer yet because I wasn't sure about the solution.&lt;/P&gt;

&lt;P&gt;Since nobody answer me I don't see the necessity to downvoted this, but anyway, I will exposure my last search which worked, but still not sure of the reason.&lt;/P&gt;

&lt;P&gt;This is the first search, the one I wrote in the question:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="*alerts"    | dedup Alert    | rename Country as country    | lookup countries.csv  country | rename latitude as lat | rename longitude as lon |eventstats count(Alert) as alerts by country  | geostats  count(alerts) by country globallimit=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And this one is the working one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="*_alerts" | dedup Alert | lookup customer_details.csv  Customer| lookup geo_countries longitude as Longitude, latitude as Latitude | stats count by Country | geom geo_countries  featureIdField="Country"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I guess  at the begging, not knowing how the geo_countries lookup  was working, I tried another lookup with country information and maybe the geostats was not able to proceed all the longitudes and latitudes and some of the countries disappear because the lack of this information, not in the table but in the process. &lt;BR /&gt;
Then, after some time doing some test with this lookup table and the geo_attr_us_states default lookup table, I was stating to understand how this default lookup tables were working, and finally, after some test worked out with USA geo stats, I went to use the world geo stats table, and it results.&lt;/P&gt;

&lt;P&gt;I had to rename some fields as country (to merge the index and the lookup table) and the latitude and logitude to then do the geom geo_countries. I've found out that besides selecting a field to do the count, this field has to be indicated to as featureIdField.&lt;/P&gt;

&lt;P&gt;As you can understand, I'm not sure why the first search didn't work, I've just change to use the splunk default tables for the maps instead of using the other one found in another post (I've consult a lot of questions related to maps).&lt;/P&gt;

&lt;P&gt;Sorry for not being able to help more, because as you see, I don't have a concrete solution for this, I've just try a workaround until something worked.&lt;/P&gt;

&lt;P&gt;Anything, write again and I will be glad to try to answer or assist in this kind of searches.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:47:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224775#M66228</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2020-09-29T10:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224776#M66229</link>
      <description>&lt;P&gt;Thanks for following up.  I did work on my similar issue yesterday and found that if I put a high limit first with the globallimit=0, it mapped all my data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| top limit=50000 something,Latitude,Longitude
| geostats globallimit=0 latfield=Latitude longfield=Longitude count by something
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Sep 2016 18:24:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224776#M66229</guid>
      <dc:creator>kskujawa</dc:creator>
      <dc:date>2016-09-01T18:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224777#M66230</link>
      <description>&lt;P&gt;Interesting...... Good to know this version too, It might be helpful!&lt;/P&gt;

&lt;P&gt;Thank you. Have you indicate something about usenull or useother to be false too? Just to know more.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2016 07:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224777#M66230</guid>
      <dc:creator>marina_rovira</dc:creator>
      <dc:date>2016-09-02T07:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224778#M66231</link>
      <description>&lt;P&gt;Hi @kskujawa&lt;/P&gt;

&lt;P&gt;Please do not downvote someone unless they've suggested something that is not best practice and could potentially do harm in a Splunk environment. Simply comment to ask for more information in the future, and upvote questions, comments, and answers that you find helpful. To learn more about voting etiquette in this community and Splunk Answers, check out this previous Answers post on the topic:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/244111/proper-etiquette-and-timing-for-voting-here-on-ans.html"&gt;https://answers.splunk.com/answers/244111/proper-etiquette-and-timing-for-voting-here-on-ans.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 23:24:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224778#M66231</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-09-12T23:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why is geostats not showing data for all expected countries when the search finishes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224779#M66232</link>
      <description>&lt;P&gt;Using top fixed it for me. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 21:10:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-geostats-not-showing-data-for-all-expected-countries-when/m-p/224779#M66232</guid>
      <dc:creator>romedome</dc:creator>
      <dc:date>2017-08-15T21:10:31Z</dc:date>
    </item>
  </channel>
</rss>

