-
Notifications
You must be signed in to change notification settings - Fork 5
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
implement --response-code functionality #16
Comments
@jspaleta I wonder if we could implement this one as a metric tag + metric threshold check? |
@agoddard something to consider in implementing this would be its behavior with respect to the --redirect-ok flag. May require additional documentation (e.g. you cannot use --redirect-ok when doing --response-code 301) and the already noted caveats for --redirect-ok. |
@agoddard is there an internal ref for this one? |
I'm wondering if |
Should |
Maybe it can be a single code or an array, and when it is an array the order matters, so then you can say "when I hit this redirecting URL with redirect-ok, I want to know that the place I end up gives me a 200" and then of providing an Array, then "when I hit this redirecting URL, I should get a 302 on the way to the 200" [302,200] |
Let’s implement the suggested changes allowing the concurrent usage of |
@fguimond to release the next version of the plugin. |
Allow checking for an expected http status code, exiting 0 if the expected code matches the returned code. This is to implement checks to ensure that a site responds with a particular status code, such as a 403, or a 301. For reference, in the legacy ruby version of this plugin, this functionality was implemented as
--response code <code>
https://github.com/sensu-plugins/sensu-plugins-http/blob/master/bin/check-http.rb#L30-L31The text was updated successfully, but these errors were encountered: