clusters.proto 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. syntax = "proto3";
  2. package envoy.admin.v2alpha;
  3. import "envoy/admin/v2alpha/metrics.proto";
  4. import "envoy/api/v2/core/address.proto";
  5. import "envoy/api/v2/core/base.proto";
  6. import "envoy/api/v2/core/health_check.proto";
  7. import "envoy/type/percent.proto";
  8. import "udpa/annotations/status.proto";
  9. option java_package = "io.envoyproxy.envoy.admin.v2alpha";
  10. option java_outer_classname = "ClustersProto";
  11. option java_multiple_files = true;
  12. option go_package = "github.com/envoyproxy/go-control-plane/envoy/admin/v2alpha";
  13. option (udpa.annotations.file_status).package_version_status = FROZEN;
  14. // [#protodoc-title: Clusters]
  15. // Admin endpoint uses this wrapper for `/clusters` to display cluster status information.
  16. // See :ref:`/clusters <operations_admin_interface_clusters>` for more information.
  17. message Clusters {
  18. // Mapping from cluster name to each cluster's status.
  19. repeated ClusterStatus cluster_statuses = 1;
  20. }
  21. // Details an individual cluster's current status.
  22. // [#next-free-field: 6]
  23. message ClusterStatus {
  24. // Name of the cluster.
  25. string name = 1;
  26. // Denotes whether this cluster was added via API or configured statically.
  27. bool added_via_api = 2;
  28. // The success rate threshold used in the last interval.
  29. // If
  30. // :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>`
  31. // is *false*, all errors: externally and locally generated were used to calculate the threshold.
  32. // If
  33. // :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>`
  34. // is *true*, only externally generated errors were used to calculate the threshold.
  35. // The threshold is used to eject hosts based on their success rate. See
  36. // :ref:`Cluster outlier detection <arch_overview_outlier_detection>` documentation for details.
  37. //
  38. // Note: this field may be omitted in any of the three following cases:
  39. //
  40. // 1. There were not enough hosts with enough request volume to proceed with success rate based
  41. // outlier ejection.
  42. // 2. The threshold is computed to be < 0 because a negative value implies that there was no
  43. // threshold for that interval.
  44. // 3. Outlier detection is not enabled for this cluster.
  45. type.Percent success_rate_ejection_threshold = 3;
  46. // Mapping from host address to the host's current status.
  47. repeated HostStatus host_statuses = 4;
  48. // The success rate threshold used in the last interval when only locally originated failures were
  49. // taken into account and externally originated errors were treated as success.
  50. // This field should be interpreted only when
  51. // :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>`
  52. // is *true*. The threshold is used to eject hosts based on their success rate.
  53. // See :ref:`Cluster outlier detection <arch_overview_outlier_detection>` documentation for
  54. // details.
  55. //
  56. // Note: this field may be omitted in any of the three following cases:
  57. //
  58. // 1. There were not enough hosts with enough request volume to proceed with success rate based
  59. // outlier ejection.
  60. // 2. The threshold is computed to be < 0 because a negative value implies that there was no
  61. // threshold for that interval.
  62. // 3. Outlier detection is not enabled for this cluster.
  63. type.Percent local_origin_success_rate_ejection_threshold = 5;
  64. }
  65. // Current state of a particular host.
  66. // [#next-free-field: 10]
  67. message HostStatus {
  68. // Address of this host.
  69. api.v2.core.Address address = 1;
  70. // List of stats specific to this host.
  71. repeated SimpleMetric stats = 2;
  72. // The host's current health status.
  73. HostHealthStatus health_status = 3;
  74. // Request success rate for this host over the last calculated interval.
  75. // If
  76. // :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>`
  77. // is *false*, all errors: externally and locally generated were used in success rate
  78. // calculation. If
  79. // :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>`
  80. // is *true*, only externally generated errors were used in success rate calculation.
  81. // See :ref:`Cluster outlier detection <arch_overview_outlier_detection>` documentation for
  82. // details.
  83. //
  84. // Note: the message will not be present if host did not have enough request volume to calculate
  85. // success rate or the cluster did not have enough hosts to run through success rate outlier
  86. // ejection.
  87. type.Percent success_rate = 4;
  88. // The host's weight. If not configured, the value defaults to 1.
  89. uint32 weight = 5;
  90. // The hostname of the host, if applicable.
  91. string hostname = 6;
  92. // The host's priority. If not configured, the value defaults to 0 (highest priority).
  93. uint32 priority = 7;
  94. // Request success rate for this host over the last calculated
  95. // interval when only locally originated errors are taken into account and externally originated
  96. // errors were treated as success.
  97. // This field should be interpreted only when
  98. // :ref:`outlier_detection.split_external_local_origin_errors<envoy_api_field_cluster.OutlierDetection.split_external_local_origin_errors>`
  99. // is *true*.
  100. // See :ref:`Cluster outlier detection <arch_overview_outlier_detection>` documentation for
  101. // details.
  102. //
  103. // Note: the message will not be present if host did not have enough request volume to calculate
  104. // success rate or the cluster did not have enough hosts to run through success rate outlier
  105. // ejection.
  106. type.Percent local_origin_success_rate = 8;
  107. // locality of the host.
  108. api.v2.core.Locality locality = 9;
  109. }
  110. // Health status for a host.
  111. // [#next-free-field: 7]
  112. message HostHealthStatus {
  113. // The host is currently failing active health checks.
  114. bool failed_active_health_check = 1;
  115. // The host is currently considered an outlier and has been ejected.
  116. bool failed_outlier_check = 2;
  117. // The host is currently being marked as degraded through active health checking.
  118. bool failed_active_degraded_check = 4;
  119. // The host has been removed from service discovery, but is being stabilized due to active
  120. // health checking.
  121. bool pending_dynamic_removal = 5;
  122. // The host has not yet been health checked.
  123. bool pending_active_hc = 6;
  124. // Health status as reported by EDS. Note: only HEALTHY and UNHEALTHY are currently supported
  125. // here.
  126. // [#comment:TODO(mrice32): pipe through remaining EDS health status possibilities.]
  127. api.v2.core.HealthStatus eds_health_status = 3;
  128. }