Splunk Search

Realtime Google map Dashboard

nocostk
Communicator

I'm trying to configure a real-time dashboard using the Google Maps application. I'm able to get the application working with a defined time period but this is taking too long to render the results.

I think I nearly have the required XML but the last problem is the results are never displayed on the map. Any help? Here's the XML.

    <?xml version="1.0"?>
<view template="dashboard.html" refresh="60">
  <label>Geographical Location of Visitors</label>


  <module name="TitleBar" layoutPanel="viewHeader">
    <param name="actionsMenuFilter">dashboard</param>
  </module> 

  <module name="GenericHeader" layoutPanel="panel_row1_col1" autoRun="True">
    <param name="label">Geographical Location</param>
            <module name="HiddenSearch" group="Map View" autoRun="True" layout_panel="panel_row1_col1">
        <param name="search">source=/opt/shoppingsite/work/logs/access_log | geoip</param>
         <param name="earliest">rt-5m</param>
        <param name="latest">rt</param>

         <module name="EnablePreview">
            <param name="enable">true</param>
            <param name="display">false</param>


<module name="GoogleMaps">
        <param name="autoPostProcess">false</param>
        <param name="height">950px</param>
        <param name="mapType">terrain</param>
        <param name="mapTypeControl">on</param>
        <param name="navigationControl">on</param>
        <param name="scaleControl">on</param>
        <param name="scrollwheel">off</param>
        <param name="zoomLevel">3</param>
    </module>



            </module> 
      </module>
  </module>
</view>
0 Karma
1 Solution

ziegfried
Influencer

You could try it with a more efficient search (Assuming there is a clientip field in the source you're querying):

<view template="dashboard.html">
    <label>Geographical Location of Visitors</label>
    <module name="TitleBar" layoutPanel="viewHeader">
        <param name="actionsMenuFilter">dashboard</param>
    </module>
    <module name="GenericHeader" layoutPanel="panel_row1_col1" autoRun="True">
        <param name="label">Geographical Location</param>
        <module name="HiddenSearch" group="Map View" autoRun="True" layout_panel="panel_row1_col1">
            <param name="search">host=tuvok sourcetype=access_combined | fields clientip | geoip clientip | stats count as _geo_count by _lat,_lng</param>
            <param name="earliest">rt-15m</param>
            <param name="latest">rt</param>
            <module name="GoogleMaps">
                <param name="autoPostProcess">false</param>
                <param name="height">950px</param>
                <param name="mapType">terrain</param>
                <param name="mapTypeControl">on</param>
                <param name="navigationControl">on</param>
                <param name="scaleControl">on</param>
                <param name="scrollwheel">off</param>
                <param name="zoomLevel">3</param>
            </module>
        </module>
    </module>
</view>

View solution in original post

ziegfried
Influencer

You could try it with a more efficient search (Assuming there is a clientip field in the source you're querying):

<view template="dashboard.html">
    <label>Geographical Location of Visitors</label>
    <module name="TitleBar" layoutPanel="viewHeader">
        <param name="actionsMenuFilter">dashboard</param>
    </module>
    <module name="GenericHeader" layoutPanel="panel_row1_col1" autoRun="True">
        <param name="label">Geographical Location</param>
        <module name="HiddenSearch" group="Map View" autoRun="True" layout_panel="panel_row1_col1">
            <param name="search">host=tuvok sourcetype=access_combined | fields clientip | geoip clientip | stats count as _geo_count by _lat,_lng</param>
            <param name="earliest">rt-15m</param>
            <param name="latest">rt</param>
            <module name="GoogleMaps">
                <param name="autoPostProcess">false</param>
                <param name="height">950px</param>
                <param name="mapType">terrain</param>
                <param name="mapTypeControl">on</param>
                <param name="navigationControl">on</param>
                <param name="scaleControl">on</param>
                <param name="scrollwheel">off</param>
                <param name="zoomLevel">3</param>
            </module>
        </module>
    </module>
</view>

ziegfried
Influencer

Please accept the answers if it solved your problem

0 Karma

nocostk
Communicator

Well that took my search time from 2:50 to about 20 seconds so that will do nicely. Thanks, ziegfied.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...