Any possibility calculate Average Duration in HH:mm:ss format

(kovas) #1


I have Average calculation for job execution Duration in Kibana on one number field.

The problem is that number field provides view in number format like
3,43 min or in Human Readable format which is not accurate in both cases.

Is any way we could get number format changed to time HH:mm:ss format during Average Duration calculation?

I have tried Date type but it does not calculates Averages on Date type.
I tried adding Scripted Field, but also with no luck.

Any advise?


(kovas) #2

any thoughts?

(Marius Dragomir) #3


Right now there isn't a way to do this exactly. Best option would be to have a scripted field, that gets the value of that duration field and then converts it from seconds to a HH:mm:ss format. You can use typical Java date libraries in a Kibana scripted field so documentation is widely available for that.

(kovas) #4


If I use Java date libraries what type I would get in output?

I tried converting number to date in scripted field

But can not calculate Average in Kibana's visualization

(kovas) #5

Also tried some calculation script in Scripted Field
doc['duration'].value + ":" + doc['duration'].value / 60

But got NA for that field in Kibana's Discovery

Does anyone had this issue?

Many thanks

(kovas) #7

any idea?