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
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...