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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...