I am using the helm chart to deploy telegraf. I configure my telegraph instance via the values.yaml file. Here is my inputs section of the values.yaml configuration:
Notice how the security_mode and security_policy fields are placed after the nodes sections? This causes telegraf to crash with the following error:
2024-10-09T02:52:08Z I! Loading config: /etc/telegraf/telegraf.conf
2024-10-09T02:52:08Z E! loading config file /etc/telegraf/telegraf.conf failed: plugin inputs.opcua: line 32: configuration specified the fields ["request_timeout" "security_mode" "security_policy"], but they were not used. This is either a typo or this config option does not exist in this version.
If I manually update the configmap to put the fields above the nodes section, then telegraf will boot normally:
I don't know enough about toml to understand why the keys can't be after the nodes sections. But it does seem like the keys are sorted alphabetically before generating the toml. If that step could be skipped then we could work around this issue.
I am using the helm chart to deploy telegraf. I configure my telegraph instance via the values.yaml file. Here is my inputs section of the values.yaml configuration:
That produces the following toml file (found in the telegraf configmap:
Notice how the
security_mode
andsecurity_policy
fields are placed after the nodes sections? This causes telegraf to crash with the following error:If I manually update the configmap to put the fields above the nodes section, then telegraf will boot normally:
I don't know enough about
toml
to understand why the keys can't be after the nodes sections. But it does seem like the keys are sorted alphabetically before generating the toml. If that step could be skipped then we could work around this issue.