From 1ac5097f8908204d766b7bc76f5074cca90e77cc Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 20 Jan 2020 15:01:42 +0100 Subject: [PATCH] custom metrics for prometheus self healing --- onboarding-carts/sli-config-prometheus.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/onboarding-carts/sli-config-prometheus.yaml b/onboarding-carts/sli-config-prometheus.yaml index d6b1ead..a320fbd 100644 --- a/onboarding-carts/sli-config-prometheus.yaml +++ b/onboarding-carts/sli-config-prometheus.yaml @@ -1,5 +1,6 @@ --- spec_version: '1.0' indicators: - cpu_usage: avg(rate(container_cpu_usage_seconds_total{namespace="$PROJECT-$STAGE",pod_name=~"$SERVICE-primary-.*"}[5m])) - response_time_p95: histogram_quantile(0.95, sum by(le) (rate(http_response_time_milliseconds_bucket{handler="ItemsController.addToCart",job="$SERVICE-$PROJECT-$STAGE-canary"}[$DURATION_SECONDS]))) \ No newline at end of file + response_time_p50: histogram_quantile(0.5, sum by(le) (rate(http_response_time_milliseconds_bucket{handler="ItemsController.addToCart",job="$SERVICE-$PROJECT-$STAGE"}[$DURATION_SECONDS]))) + response_time_p90: histogram_quantile(0.9, sum by(le) (rate(http_response_time_milliseconds_bucket{handler="ItemsController.addToCart",job="$SERVICE-$PROJECT-$STAGE"}[$DURATION_SECONDS]))) + response_time_p95: histogram_quantile(0.95, sum by(le) (rate(http_response_time_milliseconds_bucket{handler="ItemsController.addToCart",job="$SERVICE-$PROJECT-$STAGE"}[$DURATION_SECONDS]))) \ No newline at end of file