Splunk Search

各フィールドのデータを集計し、timechartで期間ごとのデータに纏めたい

tonakano
Engager

ご教授ください。

複数のフィールドにそれぞれの集計数が設定されています。
これの一部を集計し、timechartで表現したいのですが、フィールドの中身の合算する方法が分かりません。

・やりたいこと例
以下のフィールドを持つ
A,B,C,D,E
個々のフィールドは任意の数値が設定されており、デイリーで1月分のデータを使用する。
これから、A,Cの中身の集計値をα、B,Dの中身の集計値をβとする。(フィールドEは集計外)
この集計値αとβをtimechartで日付ごとのグラフに表したい。

但し、日単位でデータを持っているが、日によってAしかないレコード、BCDしかないレコードなどが混在しているため
eval sum_a = A + C
eval sum_b = C + D
とやると集計が出来ません。

宜しくお願いします。

Tags (1)
0 Karma
1 Solution

to4kawa
Ultra Champion
base search
|table _time A B C D
|fillnull A,B,C,D
|timechart span=1d sum(eval(A+C)) as sum_ac sum(eval(B+D)) as sum_bd

こちらでいかがでしょうか。

View solution in original post

0 Karma

to4kawa
Ultra Champion
base search
|table _time A B C D
|fillnull A,B,C,D
|timechart span=1d sum(eval(A+C)) as sum_ac sum(eval(B+D)) as sum_bd

こちらでいかがでしょうか。

0 Karma

tonakano
Engager

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

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...