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

Hi,

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?

Thanks

any thoughts?

Hello,

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.

Hi,

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

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

any idea?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.