health check: structured active healthcheck logging (#3176)
Signed-off-by: James Sedgwick <jsedgwick@lyft.com> Mirrored from https://github.com/envoyproxy/envoy @ a5da0783828d21a2a90d1088134967a7201f0210pull/620/head
parent
5d0d8a33fe
commit
efedb2d9f1
4 changed files with 78 additions and 0 deletions
@ -0,0 +1,15 @@ |
||||
load("//bazel:api_build_system.bzl", "api_proto_library") |
||||
|
||||
licenses(["notice"]) # Apache 2 |
||||
|
||||
api_proto_library( |
||||
name = "health_check_event", |
||||
srcs = ["health_check_event.proto"], |
||||
visibility = [ |
||||
"//visibility:public", |
||||
], |
||||
deps = [ |
||||
"//envoy/api/v2/core:address", |
||||
"//envoy/api/v2/core:base", |
||||
], |
||||
) |
@ -0,0 +1,58 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package envoy.data.core.v2alpha; |
||||
|
||||
import "envoy/api/v2/core/address.proto"; |
||||
import "envoy/api/v2/core/base.proto"; |
||||
|
||||
import "google/protobuf/duration.proto"; |
||||
import "google/protobuf/wrappers.proto"; |
||||
|
||||
import "validate/validate.proto"; |
||||
import "gogoproto/gogo.proto"; |
||||
|
||||
option (gogoproto.equal_all) = true; |
||||
|
||||
// [#protodoc-title: Health check logging events] |
||||
// :ref:`Health check logging <arch_overview_health_check_logging>`. |
||||
|
||||
message HealthCheckEvent { |
||||
HealthCheckerType health_checker_type = 1 [(validate.rules).enum.defined_only = true]; |
||||
envoy.api.v2.core.Address host = 2; |
||||
string cluster_name = 3 [(validate.rules).string.min_bytes = 1]; |
||||
|
||||
oneof event { |
||||
option (validate.required) = true; |
||||
|
||||
// Host ejection. |
||||
HealthCheckEjectUnhealthy eject_unhealthy_event = 4; |
||||
|
||||
// Host addition. |
||||
HealthCheckAddHealthy add_healthy_event = 5; |
||||
} |
||||
} |
||||
|
||||
enum HealthCheckFailureType { |
||||
ACTIVE = 0; |
||||
PASSIVE = 1; |
||||
NETWORK = 2; |
||||
} |
||||
|
||||
enum HealthCheckerType { |
||||
HTTP = 0; |
||||
TCP = 1; |
||||
GRPC = 2; |
||||
REDIS = 3; |
||||
} |
||||
|
||||
message HealthCheckEjectUnhealthy { |
||||
// The type of failure that caused this ejection. |
||||
HealthCheckFailureType failure_type = 1 [(validate.rules).enum.defined_only = true]; |
||||
} |
||||
|
||||
message HealthCheckAddHealthy { |
||||
// Whether this addition is the result of the first ever health check on a host, in which case |
||||
// the configured :ref:`healthy threshold <envoy_api_field_core.HealthCheck.healthy_threshold>` |
||||
// is bypassed and the host is immediately added. |
||||
bool first_check = 1; |
||||
} |
Loading…
Reference in new issue