Closed daniel-falk closed 3 months ago
@daniel-falk please test the binary in PR #15630, available as soon as CI finished the tests, and let me know if this fixes the issue!
@srebhan Thanks, that fixed it! :rocket:
Tested OK on:
commit c7bb5b40067e2018070bff1cb470517874451192 (HEAD -> custom_builder_issue_15627)
Author: Sven Rebhan <srebhan@influxdata.com>
Date: Tue Jul 16 18:26:46 2024 +0200
fix(tools.custom_builder): Handle multiple instance of the same plugin correctly
Relevant telegraf.conf
Logs from Telegraf
System info
Linux danielfa-ThinkPad-T590 6.5.0-41-generic #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Docker
No response
Steps to reproduce
master
orv.1.31.1
make build_tools
./tools/custom_builder/custom_builder --config <path-to-config>
./telegraf --config /tmp/t.conf
Expected behavior
Telegraf should be built with the correct plugins and run.
Actual behavior
One of the parsers are not built / found be the custom_builder. This seems to be since there are two inputs using the same plugin, and the scanner seems to only use one of them.
When running the custom build, only the parser from the second usage of the plugin is captured:
Note that
json_v2
parser was not captured.When running telegraf using the same config we get an error:
If I split the config file into two config files where each one is using one of the mqtt inputs, then both parsers are correctly detected:
Additional info
No response