Open nick-piz opened 4 years ago
Would love to see this, app insights has this ability and improved our analytics reporting by making it much more human readable.
This would be very useful to have :)
Is it important for your use cases that a number gets already converted at processing time (and stored like that), or would it also be ok to convert it at display time?
Ideally an option to do both.
Displayed at processing time is a nice to have for quick and easy metrics.
Convert and store at prcessing time is absolutely required so we could use the mathematical functions within Dashboards and Pipeline rules.
My thinking, at a minimum, a round function in pipeline rules would be nice.
Please can we have the ability to Round numbers in Pipelines.
Beats reports all memory and file system sizes in bytes. I want to convert these to KiB, MiB, GiB and TiB (it's similar for uptime in ms where I don't want to round to a datetime but number of days, hours, minutes or seconds).
That should be as simple as dividing each value in turn by 1024. This can give very large decimal place values that are difficult to display with dashboards.
to_round(value, decimal places) would be ideal (perhaps even an option for up or down, floor ceiling etc.).
An example:
metricbeat_system_filesystem_total 42303746048
I want to convert and store this value as KiB, MiB, GiB and TiB so I write the following Pipeline rule.
The values should be as follows:
41312252 40343.99609375 39.39843368530273 0.0384750328958035
I need to get these to two decimal places so my only option at the moment is to split the number on ".", convert the two halves of the number to strings and then substring the second half of the number to two characters. Then concat them back together and convert to double.
This gives me the result
41312252 (correct in this case) 40343.99 (should be 40344.00) 39.39 (should be 39.40) 0.038 (should be 0.04)