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

feat(inputs.vsphere): Flag for more lenient behavior when connect fails on startup #12828

Merged
merged 32 commits into from
Mar 13, 2023

Conversation

prydin
Copy link
Contributor

@prydin prydin commented Mar 9, 2023

  • Updated associated README.md.
  • Wrote appropriate unit tests.
  • Pull request title or commits are in [conventional commit format]

resolves #10523

Added the server_disconnected_behavior flag mimicking the behavior of the MongoDB-plugin. A value of "error" (default) exits telegraf if the connection to vCenter failed on startup. A value of "ignore" prints a warning and continues to try to connect every collection cycle.

@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Mar 9, 2023
@prydin
Copy link
Contributor Author

prydin commented Mar 9, 2023

The merge history looks a bit stupid, but I've checked it and it's fine. Just an artifact of how I brought the changes I made earlier today into this branch. Yes, I should have rebased instead... :)

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

Thanks

@srebhan when you review, the leaf changes in finder.go and directory readme changes were from a previous PR merged thursday morning

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Mar 9, 2023
Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Just have one comment about quoting the string, otherwise looks good. Do you plan to rebase this to get rid of the non-related changes?

plugins/inputs/vsphere/endpoint.go Outdated Show resolved Hide resolved
plugins/inputs/vsphere/vsphere_test.go Outdated Show resolved Hide resolved
prydin and others added 2 commits March 10, 2023 10:42
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
Co-authored-by: Sven Rebhan <36194019+srebhan@users.noreply.github.com>
@prydin
Copy link
Contributor Author

prydin commented Mar 10, 2023

Just have one comment about quoting the string, otherwise looks good. Do you plan to rebase this to get rid of the non-related changes?

I'm fine with your suggested changed and I've committed them.

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for the contribution @prydin!

@srebhan srebhan changed the title feat(vsphere): Flag for more lenient behavior when connect fails on startup feat(inputs.vsphere): Flag for more lenient behavior when connect fails on startup Mar 13, 2023
@srebhan srebhan added area/vsphere plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Mar 13, 2023
@srebhan srebhan merged commit 7daf7bb into influxdata:master Mar 13, 2023
## Specifies plugin behavior regarding disconnected servers
## Available choices :
## - error: telegraf will return an error on startup if one the servers is unreachable
## - skip: telegraf will skip unreachable servers on both startup and gather

Choose a reason for hiding this comment

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

Might be 'ignore' instead of 'skip'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vsphere feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[inputs.vsphere] Telegraf exit on init if conn to vsphere fails
4 participants