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!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...