Skip to content
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

Base64 Encoded IEEE 754 Float32 decoder/converter required #16213

Open
vkrasnici opened this issue Nov 20, 2024 · 0 comments · May be fixed by #16214
Open

Base64 Encoded IEEE 754 Float32 decoder/converter required #16213

vkrasnici opened this issue Nov 20, 2024 · 0 comments · May be fixed by #16214
Labels
feature request Requests for new plugin and for new features to existing plugins

Comments

@vkrasnici
Copy link

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.

{"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.

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:

[[processors.converter]]
  [processors.converter.fields]
    base64_ieee_float32 = ["input-voltage", "output-voltage"]
@vkrasnici vkrasnici added the feature request Requests for new plugin and for new features to existing plugins label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant