Dashboards & Visualizations

How to search and mark the locations on Google Maps in an HTML dashboard with IP addresses?

kartik13
Communicator

I am trying to fully customize the dashboard in which i need to include Google Maps to show the different IP addresses.. How can write this search?

0 Karma
1 Solution

fdi01
Motivator
  1. do your query by ex: your_base_search| iplocation device_ip | geostats latfield=lat longfield=lon count by IP_address.
  2. saved as dashboard
  3. after view my dashboard, go to edit > edit source XML
  4. in your XML code change chart or tablemark by map mark
  5. after you saved it to see results

see my ex in two panel of my dashboard:
- my query: | inputlookup geomaps_data.csv | iplocation device_ip | geostats latfield=lat longfield=lon count by method
- see my XML code dashboard:
Dashboard_example - Maps
Geographical data plotting on integrated maps.

<map>
  <title>Common Map Options</title>
  <searchString>| inputlookup geomaps_data.csv | iplocation device_ip | geostats latfield=lat longfield=lon count by method</searchString>
  <option name="height">400px</option>

  <!-- use custom colors -->
  <option name="mapping.seriesColors">[0x5379af,0x9ac23c,0xf7902b,0x956d95,0x6ab7c7,0xd85d3c,0xfac51c,0xdd86af]</option>

  <!-- adjust marker opacity and size range -->
  <option name="mapping.markerLayer.markerOpacity">0.8</option>
  <option name="mapping.markerLayer.markerMinSize">10</option>
  <option name="mapping.markerLayer.markerMaxSize">60</option>

  <!-- set initial map center and zoom level -->
  <option name="mapping.map.center">(30.810646,-10.556976)</option>
  <option name="mapping.map.zoom">2</option>
</map>

..........

  • save see results below:alt text

View solution in original post

fdi01
Motivator
  1. do your query by ex: your_base_search| iplocation device_ip | geostats latfield=lat longfield=lon count by IP_address.
  2. saved as dashboard
  3. after view my dashboard, go to edit > edit source XML
  4. in your XML code change chart or tablemark by map mark
  5. after you saved it to see results

see my ex in two panel of my dashboard:
- my query: | inputlookup geomaps_data.csv | iplocation device_ip | geostats latfield=lat longfield=lon count by method
- see my XML code dashboard:
Dashboard_example - Maps
Geographical data plotting on integrated maps.

<map>
  <title>Common Map Options</title>
  <searchString>| inputlookup geomaps_data.csv | iplocation device_ip | geostats latfield=lat longfield=lon count by method</searchString>
  <option name="height">400px</option>

  <!-- use custom colors -->
  <option name="mapping.seriesColors">[0x5379af,0x9ac23c,0xf7902b,0x956d95,0x6ab7c7,0xd85d3c,0xfac51c,0xdd86af]</option>

  <!-- adjust marker opacity and size range -->
  <option name="mapping.markerLayer.markerOpacity">0.8</option>
  <option name="mapping.markerLayer.markerMinSize">10</option>
  <option name="mapping.markerLayer.markerMaxSize">60</option>

  <!-- set initial map center and zoom level -->
  <option name="mapping.map.center">(30.810646,-10.556976)</option>
  <option name="mapping.map.zoom">2</option>
</map>

..........

  • save see results below:alt text

kartik13
Communicator

Thanks a lot

0 Karma

kartik13
Communicator

Can i use google map api to add some features through javascript .??

0 Karma
Get Updates on the Splunk Community!

Digital Resilience Assessment Launch | How prepared are you for disruption?

Disruption is inevitable. The question is – how prepared are you to handle it? In today’s fast-moving digital ...

Buttercup Games: Further Dashboarding Techniques (Part 2)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Index This | What is the next number in the series? 7,645 5,764 4,576…

February 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...