Splunk Search

Search on Google Maps App

appleman
Contributor

下記のGoogle mapsでのサーチ文でそれぞれカウント数が違うのですが、この二つのサーチでカウントしているものの違いを詳しく教えて頂けますでしょうか。
ちなみに、ここで使っているログにはclientipはなく、latとlngがすでに定義されているので、これをGoogle Maps上でカウントすると、geo_positionというフィールドがでてくるのですが、これを使ってより簡単に地図上にマッピングする方法はありますでしょうか。

Search 1: sourcetype=external lat=* lng=* | stats count by lat lng | eval _geo=lat+","+lng

Search 2: sourcetype=external lat=* lng=* | stats count by lat lng | eval _geo=lat+","+lng | eval _geo_count=count

Hello.

I've just started using Google Maps. I made these searches but the results are different.
Can anybody tell me what is counted on my each search?
The log data doesn't have "clientip" field, but it does have "lat" and "lng" fields.
So I counted (stats count) lat and lng on google map, and as a result, "geo_position" field came out on a table.
Is there any way to put location on google map by using geo__position field?

Thank you.

Tags (3)
0 Karma
1 Solution

bananaman
Path Finder

既にお試しかも知れませんが。。。
より簡単に地図上へマッピングするということでしたら、"lat"及び"lng"フィールドの値を自動的に"_geo"としてマージする"geonormalize"はいかがでしょうか?

sourcetype=external | geonormalize

以下、やや類似のアンサーがありますのでご参考まで。

http://answers.splunk.com/answers/84671/google-maps-query-not-working

View solution in original post

bananaman
Path Finder

既にお試しかも知れませんが。。。
より簡単に地図上へマッピングするということでしたら、"lat"及び"lng"フィールドの値を自動的に"_geo"としてマージする"geonormalize"はいかがでしょうか?

sourcetype=external | geonormalize

以下、やや類似のアンサーがありますのでご参考まで。

http://answers.splunk.com/answers/84671/google-maps-query-not-working

appleman
Contributor

ご回答ありがとうございます。では、Search 2のほうが正確なマッピングのカウントと考えてよろしいでしょうか。
ちなみに、"geonormalize"を使用してサーチをしたのですが、結果がSearch 2と違う数字がでてきたのですが、この違いは何でしょうか。

0 Karma

splunkbase_japa
Splunk Employee
Splunk Employee

補足:

Search 1は stats count by lat lng の結果のcountがいくつであっても、lat-lng(_geo)ごとに1件と地図上ではカウントされますので、stats countのcountは反映されていません。

Search 2は stats count by lat lng の結果のcountを地図上のlat-lng(_geo)上にプロット(_geo_count)するので、地図上での数値はstats countの値になります。

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...