/
outlier_detection_event.proto
145 lines (111 loc) · 6.07 KB
/
outlier_detection_event.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
syntax = "proto3";
package envoy.data.cluster.v3;
import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.data.cluster.v3";
option java_outer_classname = "OutlierDetectionEventProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Outlier detection logging events]
// :ref:`Outlier detection logging <arch_overview_outlier_detection_logging>`.
// Type of ejection that took place
enum OutlierEjectionType {
// In case upstream host returns certain number of consecutive 5xx.
// If
// :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_config.cluster.v3.OutlierDetection.split_external_local_origin_errors>`
// is *false*, all type of errors are treated as HTTP 5xx errors.
// See :ref:`Cluster outlier detection <arch_overview_outlier_detection>` documentation for
// details.
CONSECUTIVE_5XX = 0;
// In case upstream host returns certain number of consecutive gateway errors
CONSECUTIVE_GATEWAY_FAILURE = 1;
// Runs over aggregated success rate statistics from every host in cluster
// and selects hosts for which ratio of successful replies deviates from other hosts
// in the cluster.
// If
// :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_config.cluster.v3.OutlierDetection.split_external_local_origin_errors>`
// is *false*, all errors (externally and locally generated) are used to calculate success rate
// statistics. See :ref:`Cluster outlier detection <arch_overview_outlier_detection>`
// documentation for details.
SUCCESS_RATE = 2;
// Consecutive local origin failures: Connection failures, resets, timeouts, etc
// This type of ejection happens only when
// :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_config.cluster.v3.OutlierDetection.split_external_local_origin_errors>`
// is set to *true*.
// See :ref:`Cluster outlier detection <arch_overview_outlier_detection>` documentation for
CONSECUTIVE_LOCAL_ORIGIN_FAILURE = 3;
// Runs over aggregated success rate statistics for local origin failures
// for all hosts in the cluster and selects hosts for which success rate deviates from other
// hosts in the cluster. This type of ejection happens only when
// :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_config.cluster.v3.OutlierDetection.split_external_local_origin_errors>`
// is set to *true*.
// See :ref:`Cluster outlier detection <arch_overview_outlier_detection>` documentation for
SUCCESS_RATE_LOCAL_ORIGIN = 4;
// Runs over aggregated success rate statistics from every host in cluster and selects hosts for
// which ratio of failed replies is above configured value.
FAILURE_PERCENTAGE = 5;
// Runs over aggregated success rate statistics for local origin failures from every host in
// cluster and selects hosts for which ratio of failed replies is above configured value.
FAILURE_PERCENTAGE_LOCAL_ORIGIN = 6;
}
// Represents possible action applied to upstream host
enum Action {
// In case host was excluded from service
EJECT = 0;
// In case host was brought back into service
UNEJECT = 1;
}
// [#next-free-field: 12]
message OutlierDetectionEvent {
option (udpa.annotations.versioning).previous_message_type =
"envoy.data.cluster.v2alpha.OutlierDetectionEvent";
// In case of eject represents type of ejection that took place.
OutlierEjectionType type = 1 [(validate.rules).enum = {defined_only: true}];
// Timestamp for event.
google.protobuf.Timestamp timestamp = 2;
// The time in seconds since the last action (either an ejection or unejection) took place.
google.protobuf.UInt64Value secs_since_last_action = 3;
// The :ref:`cluster <envoy_api_msg_config.cluster.v3.Cluster>` that owns the ejected host.
string cluster_name = 4 [(validate.rules).string = {min_len: 1}];
// The URL of the ejected host. E.g., ``tcp://1.2.3.4:80``.
string upstream_url = 5 [(validate.rules).string = {min_len: 1}];
// The action that took place.
Action action = 6 [(validate.rules).enum = {defined_only: true}];
// If ``action`` is ``eject``, specifies the number of times the host has been ejected (local to
// that Envoy and gets reset if the host gets removed from the upstream cluster for any reason and
// then re-added).
uint32 num_ejections = 7;
// If ``action`` is ``eject``, specifies if the ejection was enforced. ``true`` means the host was
// ejected. ``false`` means the event was logged but the host was not actually ejected.
bool enforced = 8;
oneof event {
option (validate.required) = true;
OutlierEjectSuccessRate eject_success_rate_event = 9;
OutlierEjectConsecutive eject_consecutive_event = 10;
OutlierEjectFailurePercentage eject_failure_percentage_event = 11;
}
}
message OutlierEjectSuccessRate {
option (udpa.annotations.versioning).previous_message_type =
"envoy.data.cluster.v2alpha.OutlierEjectSuccessRate";
// Host’s success rate at the time of the ejection event on a 0-100 range.
uint32 host_success_rate = 1 [(validate.rules).uint32 = {lte: 100}];
// Average success rate of the hosts in the cluster at the time of the ejection event on a 0-100
// range.
uint32 cluster_average_success_rate = 2 [(validate.rules).uint32 = {lte: 100}];
// Success rate ejection threshold at the time of the ejection event.
uint32 cluster_success_rate_ejection_threshold = 3 [(validate.rules).uint32 = {lte: 100}];
}
message OutlierEjectConsecutive {
option (udpa.annotations.versioning).previous_message_type =
"envoy.data.cluster.v2alpha.OutlierEjectConsecutive";
}
message OutlierEjectFailurePercentage {
option (udpa.annotations.versioning).previous_message_type =
"envoy.data.cluster.v2alpha.OutlierEjectFailurePercentage";
// Host's success rate at the time of the ejection event on a 0-100 range.
uint32 host_success_rate = 1 [(validate.rules).uint32 = {lte: 100}];
}