Open vkrasnici opened 2 days ago
When receiving open-config power management data over telemetry using the 'cisco_telemetry_mdt' input plugin, the values are base64 encoded IEEE 754 Float32 type.
{"fields":{"data_json_content_state_openconfig-platform-psu:input-current":"QWAAAA==","data_json_timestamp":"1731938073759"},"name":"file","tags":{"host":"YJ4"},"timestamp":1732125250} {"fields":{"data_json_content_state_openconfig-platform-psu:output-current":"QcAAAA==","data_json_timestamp":"1731938073763"},"name":"file","tags":{"host":"YJ4"},"timestamp":1732125250} {"fields":{"data_json_content_state_openconfig-platform-psu:input-current":"QVAAAA==","data_json_timestamp":"1731938073766"},"name":"file","tags":{"host":"YJ4"},"timestamp":1732125250} {"fields":{"data_json_content_state_openconfig-platform-psu:output-power":"RKeAAA==","data_json_timestamp":"1731938073773"},"name":"file","tags":{"host":"YJ4"},"timestamp":1732125250}
Currently, the only way to convert this is using a binary parser as suggested by @srebhan on #14950
This requires a parser block of config for each field.
Use processors.converter and utilise the target field array to convert all the required fields in one block of code.
Converter doesn't support this use case.
The proposal is to add the support for this conversion on the processors.converter and utilise the simplified configuration:
[[processors.converter]] [processors.converter.fields] base64_ieee_float32 = ["input-voltage", "output-voltage"]
Use Case
When receiving open-config power management data over telemetry using the 'cisco_telemetry_mdt' input plugin, the values are base64 encoded IEEE 754 Float32 type.
Currently, the only way to convert this is using a binary parser as suggested by @srebhan on #14950
This requires a parser block of config for each field.
Expected behavior
Use processors.converter and utilise the target field array to convert all the required fields in one block of code.
Actual behavior
Converter doesn't support this use case.
Additional info
The proposal is to add the support for this conversion on the processors.converter and utilise the simplified configuration: