Closed as not planned
Description
Describe the feature:
Working with Filebeat modules, I have come across several instances where I need to convert seconds to millis and kilobytes/megabytes/gigabytes to bytes. While the script processor is available to perform such unit conversions, a dedicated processor for this task would facilitate the development of modules greatly by eliminating the need to write and rewrite them in painless. It might look something like this:
{
"units": {
"field": "duration_sec",
"from": "seconds",
"to": "milliseconds"
}
}
Then use rename
to adjust the field name accordingly:
{
"rename": {
"field": "duration_sec",
"target_field": "duration_ms"
}
}
Even better might a processor that accepts a conversion factor or possibly formula so it could be applied to any unit of measure; e.g., temperature, speed, energy, leagues, etc.
{
"units": {
"field": "duration_sec",
"factor": .001,
"target_field": "duration_ms"
}
}