Splunk Search

plot numeric value in a field on a google map

melonman
Motivator

Hi

I am trying to plot numeric value in a field on a google map.
I can show the count of a field, but can not figure out how to show the value in field.

e.g. results of intermediate search look like this:

    myField lat         lng
1   0.0810  34.730268   136.508594
2   0.0660  35.021279   135.755635
3   0.080   33.249322   130.298799
4   0.065   34.691304   135.182995
5   0.0640  43.064278   141.346785

and plot value in myField on _geo=lat,lng.
Can anyone know how to do this?

Thanks,

Tags (2)
0 Karma
1 Solution

sdaniels
Splunk Employee
Splunk Employee

Once you have Google Maps installed in Splunk you'll just need to do the following:

 <your search> | eval _geo_count = tonumber(trim(myField)) |  eval _geo = latitude+","+longitude

You set _geo for the lat/long and _geo_count for the value. In the above example I am converting myField to a number. You might not need that.

... | eval _geo_count = myField | ... 

View solution in original post

sdaniels
Splunk Employee
Splunk Employee

Once you have Google Maps installed in Splunk you'll just need to do the following:

 <your search> | eval _geo_count = tonumber(trim(myField)) |  eval _geo = latitude+","+longitude

You set _geo for the lat/long and _geo_count for the value. In the above example I am converting myField to a number. You might not need that.

... | eval _geo_count = myField | ... 

melonman
Motivator

Thanks!

Only thing is _geo_count needs to be int, so in my case value * 1000 will do the job. Now I can plot many kind of data, like temperature, pressure, etc...

I hope _geo_count can handle other number/text format as well.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...