# Outlier detection logging events¶

## data.cluster.v2alpha.OutlierDetectionEvent¶

[data.cluster.v2alpha.OutlierDetectionEvent proto]

{
"type": "...",
"timestamp": "{...}",
"secs_since_last_action": "{...}",
"cluster_name": "...",
"upstream_url": "...",
"action": "...",
"num_ejections": "...",
"enforced": "...",
"eject_success_rate_event": "{...}",
"eject_consecutive_event": "{...}",
"eject_failure_percentage_event": "{...}"
}

type

(data.cluster.v2alpha.OutlierEjectionType) In case of eject represents type of ejection that took place.

timestamp

(Timestamp) Timestamp for event.

secs_since_last_action

(UInt64Value) The time in seconds since the last action (either an ejection or unejection) took place.

cluster_name

(string, REQUIRED) The cluster that owns the ejected host.

upstream_url

(string, REQUIRED) The URL of the ejected host. E.g., tcp://1.2.3.4:80.

action

(data.cluster.v2alpha.Action) The action that took place.

num_ejections

(uint32) 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).

enforced

(bool) 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.

eject_success_rate_event

Precisely one of eject_success_rate_event, eject_consecutive_event, eject_failure_percentage_event must be set.

eject_consecutive_event

Precisely one of eject_success_rate_event, eject_consecutive_event, eject_failure_percentage_event must be set.

eject_failure_percentage_event

Precisely one of eject_success_rate_event, eject_consecutive_event, eject_failure_percentage_event must be set.

## data.cluster.v2alpha.OutlierEjectSuccessRate¶

[data.cluster.v2alpha.OutlierEjectSuccessRate proto]

{
"host_success_rate": "...",
"cluster_average_success_rate": "...",
"cluster_success_rate_ejection_threshold": "..."
}

host_success_rate

(uint32) Host’s success rate at the time of the ejection event on a 0-100 range.

cluster_average_success_rate

(uint32) Average success rate of the hosts in the cluster at the time of the ejection event on a 0-100 range.

cluster_success_rate_ejection_threshold

(uint32) Success rate ejection threshold at the time of the ejection event.

## data.cluster.v2alpha.OutlierEjectConsecutive¶

[data.cluster.v2alpha.OutlierEjectConsecutive proto]

{}


## data.cluster.v2alpha.OutlierEjectFailurePercentage¶

[data.cluster.v2alpha.OutlierEjectFailurePercentage proto]

{
"host_success_rate": "..."
}

host_success_rate

(uint32) Host’s success rate at the time of the ejection event on a 0-100 range.

## Enum data.cluster.v2alpha.OutlierEjectionType¶

[data.cluster.v2alpha.OutlierEjectionType proto]

Type of ejection that took place

CONSECUTIVE_5XX

(DEFAULT) ⁣In case upstream host returns certain number of consecutive 5xx. If outlier_detection.split_external_local_origin_errors is false, all type of errors are treated as HTTP 5xx errors. See Cluster outlier detection documentation for details.

CONSECUTIVE_GATEWAY_FAILURE

⁣In case upstream host returns certain number of consecutive gateway errors

SUCCESS_RATE

⁣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 outlier_detection.split_external_local_origin_errors is false, all errors (externally and locally generated) are used to calculate success rate statistics. See Cluster outlier detection documentation for details.

CONSECUTIVE_LOCAL_ORIGIN_FAILURE

⁣Consecutive local origin failures: Connection failures, resets, timeouts, etc This type of ejection happens only when outlier_detection.split_external_local_origin_errors is set to true. See Cluster outlier detection documentation for

SUCCESS_RATE_LOCAL_ORIGIN

⁣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 outlier_detection.split_external_local_origin_errors is set to true. See Cluster outlier detection documentation for

FAILURE_PERCENTAGE

⁣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_LOCAL_ORIGIN

⁣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.

## Enum data.cluster.v2alpha.Action¶

[data.cluster.v2alpha.Action proto]

Represents possible action applied to upstream host

EJECT

(DEFAULT) ⁣In case host was excluded from service

UNEJECT

⁣In case host was brought back into service