outlier_detection_event.proto 5.7 KB

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