You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes a JSON result is not float value. And thus can not be parsed to an float64.
Example error: (msg="Failed to convert extracted value to float64" path={.state} value=GREEN err="strconv.ParseFloat: parsing "GREEN": invalid syntax; strconv.ParseFloat: parsing "GREEN")
It could be great to be able to configure a "translator" value.
Example:
name: example_global_value
path: '{ .counter }'
help: Example of a top-level global value scrape in the json
labels:
environment: beta # static label
location: 'planet-{.location}' # dynamic label translate:
GREEN: "0"
AMBER: "1"
RED: "2"
The text was updated successfully, but these errors were encountered:
delley123
changed the title
Feature suggestion: Configuration for translating non integer values into integer
Feature suggestion: Configuration for translating non float values into float64
Mar 22, 2024
Sometimes a JSON result is not float value. And thus can not be parsed to an float64.
Example error: (msg="Failed to convert extracted value to float64" path={.state} value=GREEN err="strconv.ParseFloat: parsing "GREEN": invalid syntax; strconv.ParseFloat: parsing "GREEN")
It could be great to be able to configure a "translator" value.
Example:
path: '{ .counter }'
help: Example of a top-level global value scrape in the json
labels:
environment: beta # static label
location: 'planet-{.location}' # dynamic label
translate:
GREEN: "0"
AMBER: "1"
RED: "2"
The text was updated successfully, but these errors were encountered: