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

proxmox: ignore QEMU templates and iron out a few bugs #8326

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

krzysdabro
Copy link
Contributor

Changes

  • Ignore QEMU templates
  • Fix logger calls (Error -> Errorf)
  • Changed confusing error node_name not found to search domain is not set
  • Fix creator to return a pointer to new struct on every call (now it uses the same struct every time, which results in gathering only the last input of proxmox in the configuration)
  • Updated README.md to acknowledge the default value of node_name

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

@krzysdabro
Copy link
Contributor Author

@ssoroka @danielnelson Can you review this PR?

Copy link
Contributor

@ssoroka ssoroka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

Comment on lines 56 to 59
if px.NodeName == "" {
return errors.New("node_name must be configured")
hostname, _ := os.Hostname()
px.NodeName = hostname
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a thought, if you move this to the init() function below, you don't need the "" check, and it'll allow users to unset it if they don't want it

@ssoroka ssoroka merged commit fb463bc into influxdata:master Nov 12, 2020
ssoroka pushed a commit that referenced this pull request Nov 13, 2020
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants