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

http_response: status_code match #8032

Merged
merged 3 commits into from
Oct 16, 2020

Conversation

eraac
Copy link
Contributor

@eraac eraac commented Aug 25, 2020

Required for all PRs:

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

I've added the possibility to match on the status code instead of only the response body, can be useful if your service return a 204.

I'm not fully satisfied because actually we can only check the body OR the status code (not both). Technically isn't difficult to be able to do both, but that require some decisions about the result value, if only one of these fail the value is pretty obvious but in case both check fail, do we need to create another value (response_mismatch?) or set the field to response_status_code_mismatch or response_string_mismatch

Thanks!

plugins/inputs/http_response/README.md Outdated Show resolved Hide resolved
plugins/inputs/http_response/http_response.go Outdated Show resolved Hide resolved
plugins/inputs/http_response/http_response.go Outdated Show resolved Hide resolved
@eraac
Copy link
Contributor Author

eraac commented Aug 27, 2020

The CI has failed but it's seems to be an error from another plugin, not sure I've an impact on this

@eraac
Copy link
Contributor Author

eraac commented Sep 10, 2020

@reimda They're a way to re-triggrer circleci without commit?

@reimda
Copy link
Contributor

reimda commented Sep 10, 2020

@reimda They're a way to re-triggrer circleci without commit?

I think only admins can so triggered them. Looks like they passed

@ssoroka
Copy link
Contributor

ssoroka commented Oct 13, 2020

would it make more sense to instead just record the status code, instead of a binary match/no-match?

@eraac
Copy link
Contributor Author

eraac commented Oct 14, 2020

would it make more sense to instead just record the status code, instead of a binary match/no-match?

The status code is already record under http_response_code

@reimda reimda merged commit 527a11a into influxdata:master Oct 16, 2020
ssoroka pushed a commit that referenced this pull request Oct 16, 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.

3 participants