Splunk Search

サーチ結果をpie chartに反映する

appleman
Contributor

以下のデータは、A〜Dのネットワークのトラフィックを表しています。
alt text

このA〜Dそれぞれの合計値をパイチャートに結果と反映するために、以下のサーチを組んだのですが、statisticsでは結果が出せても、それをパイチャートに反映させようとすると、Aの値しか認識しませんでした。(何かでくくらないといけないのでしょうが、例えばhostとかでくくるとホストの値が出てしまいます。)
A〜D別の合計値を確実にパイチャートとして表示するためにはどんなサーチをしたらよいのでしょうか。

Search: index=test sourcetype=traffic | stats sum(A) as A sum(B) as B sum(C) as C sum(D) as D

alt text

Tags (3)
0 Karma
1 Solution

melonman
Motivator

なんの結果が必要となるかにもよりますが、上記のsum(A) ... の結果をPieにするには、

index=test sourcetype=traffic | stats sum(A) as A sum(B) as B sum(C) as C sum(D) as D | transpose

とすれば一応、pieで表示できるデータ形式にはなるとおもいます。
どういった情報をpieで表現したいか、内容があっているかどうか、確認いただければとおもいます。

View solution in original post

appleman
Contributor

alt text

このように、Dが一番大きく表示されるはずが、一番小さい値になってしまっています。

0 Karma

melonman
Motivator

なんの結果が必要となるかにもよりますが、上記のsum(A) ... の結果をPieにするには、

index=test sourcetype=traffic | stats sum(A) as A sum(B) as B sum(C) as C sum(D) as D | transpose

とすれば一応、pieで表示できるデータ形式にはなるとおもいます。
どういった情報をpieで表現したいか、内容があっているかどうか、確認いただければとおもいます。

appleman
Contributor

すいません、よく見たらパイチャートの値が小さい方が大きく表示されていたりしていて、これをどうやって結果の数字通りに表示させられますでしょうか?

0 Karma

appleman
Contributor

希望通りの結果だ出せました。ありがとうございました!

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 ...