-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat: inputs/powerdns: Add underscore option #10021
Conversation
7c8efc8
to
9339bf0
Compare
When telegraf's metrics are eventually polled via PromQL, dash in metric names are not supported. Allow dash to be converted to underscore. Signed-off-by: Josef Johansson <josef@oderland.se>
When telegraf's metrics are eventually polled via PromQL, dash in metric names are not supported. Allow dash to be converted to underscore. Signed-off-by: Josef Johansson <josef@oderland.se>
🥳 This pull request decreases the Telegraf binary size by -1.10 % for linux amd64 (new size: 130.7 MB, nightly size 132.2 MB) 📦 Looks like new artifacts were built from this PR. Expand this list to get them here! 🐯Artifact URLs |
It doesn't seem right to adapt an input plugin to the limitations of an output plugin (or the systems behind it). Next to that, have a look at the latest artefacts from #9561 as I think this can cover your problem as well. |
I just found it odd that it produced the metrics with dash in them. It felt off? |
That's indeed more common, but there are also plugins that produce CamelCase names.. |
What are your views around field names, should they always be the same? Or should all output plugins have to possibility to support CamelCase, dash and underscore via a generic function? Controlling output_format=camelcase|dash|underscore instead. |
If a specific output doesn't accept a field/tag/metric format, it should warn/error the user or convert if possible. There are processor plugins that can rename field/tag/metric names and/or values. In my opinion, there is nothing to be fixed on the input, you might want to test the given PR if that solves your issues. You could however provide a fix for the output plugin if really wanted, but I don't think this is relevant in this case as well. |
Ok, thanks for the clear answers! |
When telegraf's metrics are eventually polled via PromQL,
dash in metric names are not supported.
Allow dash to be converted to underscore.
Required for all PRs:
In my case I'm using telegraf to send Influx to VictoriaMetrics,
which in it's turn offer PromQL to Grafana. It does not like dash in Measurements.
Current workaround is to use {name="powerdns_field-name"}, which is a hassle.
This makes it possible to use powerdns_field_name{} instead.