outlier_detection_event.proto 6.2 KB

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