health check: structured active healthcheck logging (#3176)

Signed-off-by: James Sedgwick <jsedgwick@lyft.com>

Mirrored from https://github.com/envoyproxy/envoy @ a5da0783828d21a2a90d1088134967a7201f0210
pull/620/head
data-plane-api(CircleCI) 6 years ago
parent 5d0d8a33fe
commit efedb2d9f1
  1. 1
      docs/BUILD
  2. 4
      envoy/api/v2/core/health_check.proto
  3. 15
      envoy/data/core/v2alpha/BUILD
  4. 58
      envoy/data/core/v2alpha/health_check_event.proto

@ -58,6 +58,7 @@ proto_library(
"//envoy/config/trace/v2:trace",
"//envoy/config/transport_socket/capture/v2alpha:capture",
"//envoy/data/accesslog/v2:accesslog",
"//envoy/data/core/v2alpha:health_check_event",
"//envoy/data/tap/v2alpha:capture",
"//envoy/service/accesslog/v2:als",
"//envoy/service/auth/v2alpha:attribute_context",

@ -185,6 +185,10 @@ message HealthCheck {
//
// The default value for "healthy edge interval" is the same as the default interval.
google.protobuf.Duration healthy_edge_interval = 16;
// Specifies the path to the :ref:`health check event log <arch_overview_health_check_logging>`.
// If empty, no event log will be written.
string event_log_path = 17;
}
// Endpoint health status.

@ -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…
Cancel
Save