hashicorp / hashicorp/consul

Add http-check expect <match> <pattern> to change the response validation behaviour

Open
#3,467 0 comments 1 reaction 0 assignees View on GitHub
theme/health-checks type/enhancement
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

This is not an issue, but a proposal for new feature in consul services to enhance service http check behaviour.
Typically, I want to add a http check on a service which needs authentification, consul consider that a 403 return code is a failure, but I can suppose that even with a 403 , my service is up because it is answering.
Inspired from haproxy, we can add an new attribute for service checks
http-check expect [!] : change the response validation behavior by setting up a match rule:
[!] : negate the match result
: matching method used to look for in the response. Accepted match method are:
status : raw status code comparison
rstatus : regex match on status code
string : raw sting match in the response’s body
rstring : regex match in the response’s body
: raw information or regex used by the method

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.