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
Gotta issue when trying to implement starlark processor with this instruction link
###Helm value:
config:
processors:
- enum:
mapping:
field: "status"dest: "status_code"value_mappings:
healthy: 1problem: 2critical: 3
- starlark:
source: | def apply(metric): if metric.name == "prometheus_remote_write": for k, v in metric.fields.items(): metric.name = k metric.fields["value"] = v metric.fields.pop(k) return metric
result in configmap:
[[processors.starlark]]
source = "def apply(metric):\n if metric.name == \"prometheus_remote_write\":\n for k, v in metric.fields.items():\n metric.name = k\n metric.fields[\"value\"] = v\n metric.fields.pop(k)\n return metric\n"
The issue I was thought it came from the template we had to wrapped by processor helm template function
Should we go with this like we did for telegraf-ds#239
I would like to work on this :)
The text was updated successfully, but these errors were encountered:
hungran
changed the title
[telegraf] Cannot use starlark script as it doesn't accept multipleline string under processors.starlark.source
[WIP][telegraf] Cannot use starlark script as it doesn't accept multipleline string under processors.starlark.source
Mar 10, 2023
hungran
changed the title
[WIP][telegraf] Cannot use starlark script as it doesn't accept multipleline string under processors.starlark.source
[telegraf] Cannot use starlark script as it doesn't accept multipleline string under processors.starlark.source
Mar 10, 2023
Gotta issue when trying to implement starlark processor with this instruction link
###Helm value:
result in
configmap
:The issue I was thought it came from the template we had to wrapped by
processor
helm template functionShould we go with this like we did for
telegraf-ds
#239I would like to work on this :)
The text was updated successfully, but these errors were encountered: