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

Report rabbitmq_node measurement and return on gather error #6819

Merged
merged 2 commits into from
Jan 3, 2020

Conversation

danielnelson
Copy link
Contributor

closes #6814

Required for all PRs:

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

@danielnelson danielnelson added the fix pr to fix corresponding bug label Dec 23, 2019
@danielnelson danielnelson added this to the 1.13.1 milestone Dec 23, 2019
@danielnelson danielnelson requested a review from reimda December 23, 2019 20:50
}

var memory MemoryResponse
err = r.requestJSON("/api/nodes/"+node.Name+"/memory", &memory)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it ok to make another request when the health check failed? Now that we have "defer wg.done()" shouldn't we return early when health check fails?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Second request is safe to do, but is somewhat likely to fail in the case of an earlier error from requestJSON. It is probably best to not create a partial metric, so I'll change this to return early.

@danielnelson danielnelson requested a review from reimda January 3, 2020 00:13
@danielnelson danielnelson merged commit 0cf94cf into master Jan 3, 2020
@danielnelson danielnelson deleted the fix-rabbitmq-lockup branch January 3, 2020 19:38
danielnelson added a commit that referenced this pull request Jan 3, 2020
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 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
fix pr to fix corresponding bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RabbitMQ input reports forever that it did not complete in time after a single timeout
2 participants