Hi Newbie here,
Im exploring right now the map on splunk 6, Now my question is,is it possible to add a rangemap in geostats for example i have servers in certain areas and i want to know the util of all the servers ,so in the map it will show the cpu util in every area and change the color of the value or the circle around it, if it meet the set threshold.
Please englighten me.
Thanks in advance!
hi @xisura have you got this ??
i am also lagging from same type of requirement.
If you found any clue for this please give me reply here.
I have the answer for you!!!
try this...but for this you need to first install Google Maps app into your splunk,
then for example look at this search query :index=XXX sourcetype=XXX | fields cpu, location | lookup location.csv location as location OUTPUTNEW latitude,longitude | geostats latfield=latitude longfield=longitude values(CPU) by location
here you need upload the latitude and longitude of your locations in the location.csv file and then do a lookup command n match it using geostats command
So am defining colors in the XML code like i use the below xml code for assigning the colors:
It works with google Maps only because it providse the Google API to splunk
I am having one field as :
here is my query.
| eval Churn = if(Churn="True.","1","0")
| eventstats sum(Churn) as truechurn , count(Churn) as totalchurn by state
| eval prop= truechurn*100 / totalchurn
| rangemap field=prop green=0-5 yellow=6-10 orange=11-15 default=red
| geostats values(prop) by StateName globallimit=0
For adding colors to existing Geo Map you can note the names of series plotted in your Geo Map and apply field color as per your need. For example following set colors for red and green series using hex code for respective colors. You can use mapping.fieldColors (refer to the following documentation: http://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML#map_.28event_t...)
If you want to color map based on stats range, you are actually looking for Choropleth Map (http://docs.splunk.com/Documentation/Splunk/latest/Viz/ChoroplethFormatting)
Please also check out Choropleth Map - Color Modes example on Splunk 6.x Dashboard Examples
<option name="mapping.choroplethLayer.colorBins">6</option> <option name="mapping.choroplethLayer.colorMode">auto</option> <option name="mapping.choroplethLayer.maximumColor">0xDB5800</option> <option name="mapping.choroplethLayer.minimumColor">0x2F25BA</option>