Splunk Search

2つのIndexerのデータを連携する方法をご教授ください

tonakano
Engager

2つのデータを別のindex名でインポートしました。
2つのデータは、共通の端末IDにてリンクを取ることが可能です。
・データA:各端末のバージョンを持ったデータ
・データB:各端末のエラー情報を持ったデータ

やりたいこととしては、
1.データAでバージョン毎の端末数を抽出します
2.1で抽出したバージョン毎の端末でどれだけエラーが出ているかの数をデータBから抽出する
これで、各バージョン毎のエラー数を抽出したいと考えています。

個々の抽出は出来るのですが、1->2へ連携が分からないため、端末ID毎に2の抽出をするしか分かりませんでした。
この連携方法をご教授願えませんでしょうか?

0 Karma
1 Solution

HiroshiSatoh
Champion

例えばデータAのバージョンと端末IDの関係は1:1の前提とした場合ですが

index=A OR index=B
|stats count,latest(viersion) as version by 端末ID
|stats sum(count) as count by version

BのデータにJOINでAのデータを紐づけることも可能ですがJOINは処理の負荷が高いのでSTATS を使えるなら例の方法がよいと思います。

View solution in original post

0 Karma

tonakano
Engager

ありがとうございました。
いけそうです!

0 Karma

HiroshiSatoh
Champion

例えばデータAのバージョンと端末IDの関係は1:1の前提とした場合ですが

index=A OR index=B
|stats count,latest(viersion) as version by 端末ID
|stats sum(count) as count by version

BのデータにJOINでAのデータを紐づけることも可能ですがJOINは処理の負荷が高いのでSTATS を使えるなら例の方法がよいと思います。

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...