Skip to content
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

Wavefront output plugin adding empty tag #11077

Closed
farukhali opened this issue May 10, 2022 · 2 comments · Fixed by #11078
Closed

Wavefront output plugin adding empty tag #11077

farukhali opened this issue May 10, 2022 · 2 comments · Fixed by #11078
Labels
area/wavefront bug unexpected problem or unintended behavior help wanted Request for community participation, code, contribution

Comments

@farukhali
Copy link
Contributor

farukhali commented May 10, 2022

Relevant telegraf.conf

[[outputs.wavefront]]
  host = "somehost"
  port = 12878
  prefix = "\u2206telegraf."
  namepass = ["somenamepass*"]
  fielddrop = ["ln*" , "tdigest"]
  source_override = ["api"]

System info

1.21.0

Docker

No response

Steps to reproduce

  1. Use wavefront output.
  2. add source override tag.
  3. Do not provide host tag in metric.
  4. Plugin will add empty telegraf.host tag to the metric sent to wavefront proxy.
  5. Wavefront will return error for empty tag.
    ...

Expected behavior

Wavefront output plugin should not expect host tag in source metric. There should not be any empty tag output from this plugin.

Actual behavior

If host tag is not provided in metrics, wavefront output plugin add empty telegraf.host tag which cause failure on wavefront proxy end.

Additional info

The code here

mTags["telegraf_host"] = mTags["host"]
assume there will always be host tag. I can share a PR to fix this issue.

@farukhali farukhali added the bug unexpected problem or unintended behavior label May 10, 2022
@powersj
Copy link
Contributor

powersj commented May 10, 2022

Wavefront output plugin should not expect host tag in source metric. There should not be any empty tag output from this plugin.

Looking at the wavefront data format it does appear that source now, previously host was a required field.

I can share a PR to fix this issue.

Please do, but keep in mind we don't want to go breaking existing users by dropping tags suddenly.

@powersj powersj added the help wanted Request for community participation, code, contribution label May 10, 2022
@farukhali
Copy link
Contributor Author

Proposal is not to drop tag. It's just if the tag is missing don't add empty tag. Here is the PR #11078

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/wavefront bug unexpected problem or unintended behavior help wanted Request for community participation, code, contribution
Projects
None yet
2 participants