<?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: Creating map dashboard with geostat in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320037#M40256</link>
    <description>&lt;P&gt;@bwouters, after performing stats on your data by &lt;CODE&gt;IP&lt;/CODE&gt; address in your data, you can pipe IPs to &lt;CODE&gt;iplocation&lt;/CODE&gt; command which will give the Longitude and Latitude as required by Geostats command.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Iplocation"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Iplocation&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Geostats"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Geostats&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2017 09:46:13 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-12-05T09:46:13Z</dc:date>
    <item>
      <title>Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320036#M40255</link>
      <description>&lt;P&gt;I need to create a dashboard that contains a world map on which we can display certain results.&lt;BR /&gt;
I would already be happy that I can display the amount of request coming from a certain location.&lt;/P&gt;

&lt;P&gt;There is a major log file (that gets updated several times per second..) that contains a lot of data. Including the IP of the source of the request.&lt;/P&gt;

&lt;P&gt;Snippet of the logfile&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2017-12-05 04:30:50,629 WARN  [HTTP worker thread 12] QueryEngine - [SOME IP] [RequestId = 70084c77-209b-4ae0-a880-ac31a13ff6e7] message, value '291391fb-0dda-4d12-8d2a-404aca0a0248#c7effc6f-6bf3-4f90-8584-686ba0bd979f'
Original message from Another IP + PORT
Method = Put
Uri = Some URI
Headers = 
X-Forwarded-For: Some IP
X-Forwarded-Proto: http
X-Real-IP: Some IP
Connection: close
Content-Length: numbers
Content-Type: application
Accept: *
Accept-Encoding: encoding
Cookie: load-balancer-token=1700
Host: Hostname
User-Agent: Some User Agents
Body = XML CODE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I'm guessing that there should be a way to filter out the IPs and display this on a map to show me where they are originated from? It could also contain internal IPs&lt;BR /&gt;
Any advice is greatly appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 09:12:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320036#M40255</guid>
      <dc:creator>bwouters</dc:creator>
      <dc:date>2017-12-05T09:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320037#M40256</link>
      <description>&lt;P&gt;@bwouters, after performing stats on your data by &lt;CODE&gt;IP&lt;/CODE&gt; address in your data, you can pipe IPs to &lt;CODE&gt;iplocation&lt;/CODE&gt; command which will give the Longitude and Latitude as required by Geostats command.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Iplocation"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Iplocation&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Geostats"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Geostats&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 09:46:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320037#M40256</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-05T09:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320038#M40257</link>
      <description>&lt;P&gt;@niketnilay, regretfully I've already checked the documentation you provided but I'm not really getting wiser from iet (on the contrary).&lt;BR /&gt;
Do I need to filter out only the IP of such a log and then process it? Or can I leave it in RAW (assuming the commands are clever enough to look for IPs)?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 09:51:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320038#M40257</guid>
      <dc:creator>bwouters</dc:creator>
      <dc:date>2017-12-05T09:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320039#M40258</link>
      <description>&lt;P&gt;In the following video of Splunk: &lt;A href="https://www.youtube.com/watch?v=7SzkRmIfr8U"&gt;https://www.youtube.com/watch?v=7SzkRmIfr8U&lt;/A&gt;&lt;BR /&gt;
So currently I use something like &lt;BR /&gt;
    sourcetype=G2Logs | iplocation IP | geostats count&lt;/P&gt;

&lt;P&gt;Where IP is a field that has been filtered about before in the syntax [IP ADDRESS], so including '[ ]'&lt;BR /&gt;
However, when performing this search, I get no matches.&lt;/P&gt;

&lt;P&gt;In the video, they use 'clientip'. Is this mandatory to name it like that or?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 10:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320039#M40258</guid>
      <dc:creator>bwouters</dc:creator>
      <dc:date>2017-12-05T10:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320040#M40259</link>
      <description>&lt;P&gt;Oke, I got it to work &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Here is how:&lt;BR /&gt;
1. Upload the logs (or monitor it)&lt;BR /&gt;
2. Once the logs are being retrieved and your IP is not available as a field -&amp;gt; create a new field (which I had to do)&lt;BR /&gt;
3. I used a regular expression to filter it out WITHOUT '[ ]' -&amp;gt; fI named that specific field 'clientip'&lt;BR /&gt;
4. Save the field&lt;BR /&gt;
5. Make a search like 'sourcetype= | iplocation clientip | geostats count'&lt;BR /&gt;
6. DONE&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 10:50:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320040#M40259</guid>
      <dc:creator>bwouters</dc:creator>
      <dc:date>2017-12-05T10:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320041#M40260</link>
      <description>&lt;P&gt;May I know what kind of System/Tool/Technology is generating this log?&lt;/P&gt;

&lt;P&gt;Based on your sample data one of the query you can try is as below:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourBaseSearch&amp;gt;
| rex "X-Real-IP: (?&amp;lt;Real_IP&amp;gt;(\d|\.)+)"
| stats count by Real_IP
| iplocation Real_IP
| geostats sum(count) by Real_IP latfield=lat longfield=lon
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, before jumping into Map visualization you should think of appropriate statistics and use cases for your data consisting of IP addresses. Some of the primitive popular use cases are &lt;CODE&gt;Failed User Logins from various locations on earth&lt;/CODE&gt;, &lt;CODE&gt;Maximum HTTP Errors in particular State/Country or location&lt;/CODE&gt; etc.&lt;/P&gt;

&lt;P&gt;You can get &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;Splunk Dashboard Examples App&lt;/A&gt; to see some examples for &lt;CODE&gt;Cluster Map&lt;/CODE&gt;, &lt;CODE&gt;Choropleth Map&lt;/CODE&gt; and &lt;CODE&gt;Location Tracker&lt;/CODE&gt; maps which present different use cases based on the type of data. On Splunkbase there are several other map visualizations which actually extend the usage of Geo locations like &lt;A href="https://splunkbase.splunk.com/app/3511/"&gt;Missile Map&lt;/A&gt;, &lt;A href="https://splunkbase.splunk.com/app/3122/"&gt;Custom Cluster Map Visualization&lt;/A&gt; and &lt;A href="https://splunkbase.splunk.com/app/3124/"&gt;Clustered Single Value Map&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 10:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320041#M40260</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-05T10:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320042#M40261</link>
      <description>&lt;P&gt;Thanks for the extensive answer!&lt;/P&gt;

&lt;P&gt;Of course the query you provided is even more detailed than the one I found &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; but I had to start somewhere.&lt;/P&gt;

&lt;P&gt;Also thanks for the additional information about different maps etc.&lt;/P&gt;

&lt;P&gt;We want to monitor how many certain requests are being sent from an IP.&lt;BR /&gt;
Some of the request is just a query to retrieve metadata, some requests are send to video servers to set up streams and so on and on &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;If you would have some advice about this, I'm happy to here.&lt;BR /&gt;
The problem that I currently have is that the logs are rather complex and there are multiple lines being written per second&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 10:59:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320042#M40261</guid>
      <dc:creator>bwouters</dc:creator>
      <dc:date>2017-12-05T10:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320043#M40262</link>
      <description>&lt;P&gt;Please also check the comments from @niketnilay!&lt;BR /&gt;
There is much more information to be found&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2017 10:59:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320043#M40262</guid>
      <dc:creator>bwouters</dc:creator>
      <dc:date>2017-12-05T10:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating map dashboard with geostat</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320044#M40263</link>
      <description>&lt;P&gt;This is what I tried to mention in my query and explanation. Performance wise you should perform stats first and then iplocation.&lt;/P&gt;

&lt;P&gt;Check out Optimizing your lookup search link under geostats command usage documentation: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Geostats#Usage"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Geostats#Usage&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=G2Logs 
| stats count by IP
| iplocation IP 
| geostats sum(count)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 12:12:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Creating-map-dashboard-with-geostat/m-p/320044#M40263</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-05T12:12:28Z</dc:date>
    </item>
  </channel>
</rss>

