<?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 can't I get geostats in Splunk 6.3 to create a map from latitude and longitude values extracted in a search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228644#M67638</link>
    <description>&lt;P&gt;_time,host,source,sourcetype,DeviceLocation&lt;BR /&gt;
11/16/15 5:29:58.148 PM,hostnameChanged,/path/to/the/files,log4j,+37.32/-112.03&lt;/P&gt;

&lt;P&gt;The second rex breaks them out alright into latitude and longitude...I think im missing something obvious&lt;/P&gt;</description>
    <pubDate>Mon, 16 Nov 2015 23:43:50 GMT</pubDate>
    <dc:creator>jcrombie</dc:creator>
    <dc:date>2015-11-16T23:43:50Z</dc:date>
    <item>
      <title>Why can't I get geostats in Splunk 6.3 to create a map from latitude and longitude values extracted in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228642#M67636</link>
      <description>&lt;P&gt;Using Splunk 6.3&lt;/P&gt;

&lt;P&gt;I have a search that extracts from JSON from a log entry (packed as log4j), then rex out a Lat Long from one of the fields.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = "production" DeviceLocation | rex "(?&amp;lt;json_data&amp;gt;{.*)" | spath input=json_data | rex field=DeviceLocation "(?&amp;lt;latitude&amp;gt;.*)/(?&amp;lt;longitude&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The this leaves me with two values: a latitude and longitude as a field, however, I can't get it to create a map using geostats.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = "production" DeviceLocation | rex "(?&amp;lt;json_data&amp;gt;{.*)" | spath input=json_data | rex field=DeviceLocation "(?&amp;lt;latitude&amp;gt;.*)/(?&amp;lt;longitude&amp;gt;.*)"|geostats latfield=latitude longfield=longitude count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Every time I run the search, I only get "No results found."  &lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 22:01:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228642#M67636</guid>
      <dc:creator>jcrombie</dc:creator>
      <dc:date>2015-11-16T22:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I get geostats in Splunk 6.3 to create a map from latitude and longitude values extracted in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228643#M67637</link>
      <description>&lt;P&gt;The query looks right. Would you be able to post an excerpt of a CSV export of your data before you use the second &lt;CODE&gt;rex&lt;/CODE&gt;? Feel free to scrub it if it contains sensitive data&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 23:12:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228643#M67637</guid>
      <dc:creator>mporath_splunk</dc:creator>
      <dc:date>2015-11-16T23:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I get geostats in Splunk 6.3 to create a map from latitude and longitude values extracted in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228644#M67638</link>
      <description>&lt;P&gt;_time,host,source,sourcetype,DeviceLocation&lt;BR /&gt;
11/16/15 5:29:58.148 PM,hostnameChanged,/path/to/the/files,log4j,+37.32/-112.03&lt;/P&gt;

&lt;P&gt;The second rex breaks them out alright into latitude and longitude...I think im missing something obvious&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 23:43:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228644#M67638</guid>
      <dc:creator>jcrombie</dc:creator>
      <dc:date>2015-11-16T23:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I get geostats in Splunk 6.3 to create a map from latitude and longitude values extracted in a search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228645#M67639</link>
      <description>&lt;P&gt;Based on your comment, it looks like Splunk doesn't parse the latitude correctly where you have a &lt;CODE&gt;+&lt;/CODE&gt; in your field. Try the following query that strips away the &lt;CODE&gt;+&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=DeviceLocation "\+?(?&amp;lt;latitude&amp;gt;[0-9.-]*)/\+?(?&amp;lt;longitude&amp;gt;[0-9.-]*)" |geostats latfield=latitude longfield=longitude count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Nov 2015 23:59:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-can-t-I-get-geostats-in-Splunk-6-3-to-create-a-map-from/m-p/228645#M67639</guid>
      <dc:creator>mporath_splunk</dc:creator>
      <dc:date>2015-11-16T23:59:13Z</dc:date>
    </item>
  </channel>
</rss>

