diff options
author | Joshua Lambert <joshua@gitlab.com> | 2017-09-08 16:16:38 -0400 |
---|---|---|
committer | Joshua Lambert <joshua@gitlab.com> | 2017-09-08 16:16:38 -0400 |
commit | e099e7eb23f948224ce406b0eb78054b39a50c8d (patch) | |
tree | 59a1c005a6e7187dfb2d0f970cd6843a3735e04a /config/prometheus | |
parent | cf9f560d51e9ed7a6315ddce9ffaadc9f29df77f (diff) | |
download | gitlab-ce-e099e7eb23f948224ce406b0eb78054b39a50c8d.tar.gz |
Update queries for colors and series
Diffstat (limited to 'config/prometheus')
-rw-r--r-- | config/prometheus/additional_metrics.yml | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/config/prometheus/additional_metrics.yml b/config/prometheus/additional_metrics.yml index 0642a0b2fe9..11670282ef9 100644 --- a/config/prometheus/additional_metrics.yml +++ b/config/prometheus/additional_metrics.yml @@ -4,12 +4,20 @@ - title: "Throughput" y_label: "Requests / Sec" required_metrics: - - nginx_upstream_requests_total + - nginx_upstream_responses_total weight: 1 queries: - - query_range: 'sum(rate(nginx_upstream_requests_total{upstream=~"%{kube_namespace}-%{ci_environment_slug}-.*"}[2m]))' - label: Total + - query_range: 'rate(nginx_upstream_responses_total{upstream=~"%{kube_namespace}-%{ci_environment_slug}-.*"}[2m])' unit: req / sec + series: + - label: status_code + when: + - value: 2xx + color: green + - value: 4xx + color: yellow + - value: 5xx + color: red - title: "Latency" y_label: "Latency (ms)" required_metrics: @@ -37,9 +45,17 @@ - haproxy_frontend_http_requests_total weight: 1 queries: - - query_range: 'sum(rate(haproxy_frontend_http_requests_total{%{environment_filter}}[2m]))' - label: Total + - query_range: 'sum(rate(haproxy_frontend_http_requests_total{%{environment_filter}}[2m])) by (code)' unit: req / sec + series: + - label: code + when: + - value: 2xx + color: green + - value: 4xx + color: yellow + - value: 5xx + color: red - title: "HTTP Error Rate" y_label: "Error Rate (%)" required_metrics: @@ -86,12 +102,21 @@ - title: "Throughput" y_label: "Requests / Sec" required_metrics: - - nginx_requests_total + - nginx_responses_total weight: 1 queries: - - query_range: 'sum(rate(nginx_requests_total{server_zone!="*", server_zone!="_", %{environment_filter}}[2m]))' - label: Total + - query_range: 'sum(rate(nginx_responses_total{server_zone!="*", server_zone!="_", %{environment_filter}}[2m])) by (status_code)' unit: req / sec + label: Status Code + series: + - label: status_code + when: + - value: 2xx + color: green + - value: 4xx + color: orange + - value: 5xx + color: red - title: "Latency" y_label: "Latency (ms)" required_metrics: @@ -128,6 +153,8 @@ - container_cpu_usage_seconds_total weight: 1 queries: - - query_range: 'sum(rate(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}[2m])) / count(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}) * 100' - label: Average + - query_range: 'sum(rate(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}[2m]) * 100) by (cpu)' + label: CPU unit: "%" + series: + - label: cpu |