Splunk Search

i have a query that outputs a chart with 3 columns. I want to output another column that has the delta between the column 2 and 3.

Explorer

Query : MSTC>0 run_id=123 OR run_id=456 | sort 0 MSTC | rename "Actual Battery Power _B0AP" as Battp | chart avg(Battp) as Battery by MSTC, run_id

Chart is as follows
MSTC 123 456 delta(Column that I need help with)
1 5 5 0
2 6 5.9 0. 1
3 10 10.5 0.5

Tags (2)
0 Karma
1 Solution

Esteemed Legend

Try this:

MSTC>0 run_id=123 OR run_id=456 | sort 0 MSTC | rename "Actual Battery Power _B0AP" as Battp | chart avg(Battp) as Battery by MSTC, run_id | eval Delta=run_id-Battery

View solution in original post

0 Karma

Esteemed Legend

Try this:

MSTC>0 run_id=123 OR run_id=456 | sort 0 MSTC | rename "Actual Battery Power _B0AP" as Battp | chart avg(Battp) as Battery by MSTC, run_id | eval Delta=run_id-Battery

View solution in original post

0 Karma