-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to customize the display of duration fields #11706
Comments
I would also like to be able to convert milliseconds to an accurate human readable duration which would be dynamic depending on its size. Much like the Human Readable version of the Duration format but with far more accuracy than it currently provides. SNMP Timeticks are in centiseconds (which there is also no input option for under Duration Format requiring it to be converted before indexing). TimeTick Value: 559231234 Converting to Millis: 559231234 x 10 = 5592312340 milliseconds Resulting Format in Kibana: 64 days, 17:25:12.34 It would be good if this was as customizable as possible with the option to expand the values to years, months, weeks, days etc. As I'm sure there are others with use cases other than what have been mentioned here. If these values are converted to time duration strings and stored then proper sorting order in Kibana breaks. Thanks |
I am looking for the same. Actually we are measuring DB up-time stats. We have uptime values in milliseconds and we are trying to show it up in DD:HH:MM:SS format. |
Same here, I need Duration to be displayed in HH:mm:ss format, any ETA on this Kibana enhancement? |
I too would really value more configurability for duration fields, and/or for the "Human Readable" setting to do a more sensible job. IMHO, the current "Human Readable" output is far too vague. |
I'm trying to add a clearer list of expectations to some of these formatting-related issues, and it seems like there are multiple options here. I see some different things being discussed:
To address the first one, I would point out that there is a workaround. If your numbers represent seconds, and only seconds, you can use numeraljs instead of our duration formatter. Numeraljs supports the following two formats:
We should obviously build this into Kibana in a more generic way, and one option is the moment-duration-format plugin. I really like the default templates: https://github.com/jsmreese/moment-duration-format#default-template-function
This library also solves the precision issue by providing an argument to round to the nearest unit, such as hours: https://github.com/jsmreese/moment-duration-format#precision It seems like the next step would be to investigate how we can show accurate durations while keeping the setup as easy as possible. |
@wylieconlon , I agree with your assessment that concerns here can be split into two. Personally, I'm most interested in a "smarter" human-readable option which could pick a "reasonably"-precise output, along the lines of the following examples: "100ms", "30s", "3m20s", "4h16m", "1d8h12m" - that sort of thing. So, something which decides what the largest relevant unit is, but then allows the user to decide on the precision after that - e.g., for an input of 3.11 hours, do you want that as just "3h", or "3h7m", or "3h6m36s"? Perhaps to keep this simple, the default setup could be to allow user selection of "low", "medium", or "high" precision for this? Maybe that plugin which you mentioned doe something like this? I'll take a look at it. Anyway, whatever love you can give this issue, that's great. Thanks for taking a look. |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
A big +1 from me too. The current I'd love to see it just move up the time unit scale, and keep a defined number of decimal places; just like the Example keeping 2 places past the decimal:
"A few seconds" is very misleading and very broken when even |
Hi Guys, Is there any solution to this issue yet? I have a numeric field which has duration in seconds. Need to show this value is the format of HH:MM:SS. Is there any alternate way which can be done by the painless script? Its kind of urgent. Looking for a quick response. Thank you! :) |
you can set it as number and add the format 00:00:00. for other formats see http://numeraljs.com/ |
When a numeric field is defined as duration, there is a dropdown for several format options but none of them met my need of displaying the duration as Minutes:Seconds. I would like the option to further customize the display format. e.g. mm:ss or hh:mm:ss. Other formats could be helpful too but those would meet my needs.
The text was updated successfully, but these errors were encountered: