debian-mirror-gitlab/config/prometheus/common_metrics.yml

214 lines
12 KiB
YAML
Raw Normal View History

2019-07-31 22:56:46 +05:30
dashboard: 'Environment metrics'
priority: 1
panel_groups:
2020-04-08 14:13:33 +05:30
- group: System metrics (Kubernetes)
panels:
- title: "Memory Usage (Total)"
type: "area-chart"
y_label: "Total Memory Used (GB)"
metrics:
- id: system_metrics_kubernetes_container_memory_total
2020-07-28 23:09:34 +05:30
# Remove the second metric (after OR) when we drop support for K8s 1.13
# https://gitlab.com/gitlab-org/gitlab/-/issues/229279
query_range: 'avg(sum(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) /1024/1024/1024 OR avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) /1024/1024/1024'
2020-04-08 14:13:33 +05:30
label: Total (GB)
unit: GB
- title: "Core Usage (Total)"
type: "area-chart"
y_label: "Total Cores"
metrics:
- id: system_metrics_kubernetes_container_cores_total
2020-07-28 23:09:34 +05:30
# Remove the second metric (after OR) when we drop support for K8s 1.13
# https://gitlab.com/gitlab-org/gitlab/-/issues/229279
query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container!="POD",pod=~"^{{ci_environment_slug}}-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job) OR avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job)'
2020-04-08 14:13:33 +05:30
label: Total (cores)
unit: "cores"
- title: "Memory Usage (Pod average)"
type: "line-chart"
y_label: "Memory Used per Pod (MB)"
metrics:
- id: system_metrics_kubernetes_container_memory_average
2020-07-28 23:09:34 +05:30
# Remove the second metric (after OR) when we drop support for K8s 1.13
# https://gitlab.com/gitlab-org/gitlab/-/issues/229279
query_range: 'avg(sum(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024 OR avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024'
2020-04-08 14:13:33 +05:30
label: Pod average (MB)
unit: MB
- title: "Canary: Memory Usage (Pod Average)"
type: "line-chart"
y_label: "Memory Used per Pod (MB)"
metrics:
- id: system_metrics_kubernetes_container_memory_average_canary
2020-07-28 23:09:34 +05:30
# Remove the second metric (after OR) when we drop support for K8s 1.13
# https://gitlab.com/gitlab-org/gitlab/-/issues/229279
query_range: 'avg(sum(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-canary-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container!="POD",pod=~"^{{ci_environment_slug}}-canary-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024 OR avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-canary-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-canary-(.*)",namespace="{{kube_namespace}}"}) without (job)) /1024/1024'
2020-04-08 14:13:33 +05:30
label: Pod average (MB)
unit: MB
track: canary
- title: "Core Usage (Pod Average)"
type: "line-chart"
y_label: "Cores per Pod"
metrics:
- id: system_metrics_kubernetes_container_core_usage
2020-07-28 23:09:34 +05:30
# Remove the second metric (after OR) when we drop support for K8s 1.13
# https://gitlab.com/gitlab-org/gitlab/-/issues/229279
query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container!="POD",pod=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}[15m])) by (pod)) OR avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="{{kube_namespace}}"}[15m])) by (pod_name))'
2020-04-08 14:13:33 +05:30
label: Pod average (cores)
unit: "cores"
- title: "Canary: Core Usage (Pod Average)"
type: "line-chart"
y_label: "Cores per Pod"
metrics:
- id: system_metrics_kubernetes_container_core_usage_canary
2020-07-28 23:09:34 +05:30
# Remove the second metric (after OR) when we drop support for K8s 1.13
# https://gitlab.com/gitlab-org/gitlab/-/issues/229279
query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container!="POD",pod=~"^{{ci_environment_slug}}-canary-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container!="POD",pod=~"^{{ci_environment_slug}}-canary-(.*)",namespace="{{kube_namespace}}"}[15m])) by (pod)) OR avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-canary-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-canary-(.*)",namespace="{{kube_namespace}}"}[15m])) by (pod_name))'
2020-04-08 14:13:33 +05:30
label: Pod average (cores)
unit: "cores"
track: canary
- title: "Knative function invocations"
type: "area-chart"
y_label: "Invocations"
metrics:
- id: system_metrics_knative_function_invocation_count
2020-05-24 23:13:21 +05:30
query_range: 'sum(ceil(rate(istio_requests_total{destination_service_namespace="{{kube_namespace}}", destination_service=~"{{function_name}}.*"}[1m])*60))'
2020-04-08 14:13:33 +05:30
label: invocations / minute
unit: requests
2019-07-31 22:56:46 +05:30
# NGINX Ingress metrics for pre-0.16.0 versions
2019-02-15 15:39:39 +05:30
- group: Response metrics (NGINX Ingress VTS)
2019-07-31 22:56:46 +05:30
panels:
2017-09-10 17:25:29 +05:30
- title: "Throughput"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Requests / Sec"
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_nginx_ingress_throughput_status_code
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(nginx_upstream_responses_total{upstream=~"{{kube_namespace}}-{{ci_environment_slug}}-.*"}[2m])) by (status_code)'
2017-09-10 17:25:29 +05:30
unit: req / sec
2018-03-17 18:26:18 +05:30
label: Status Code
2017-09-10 17:25:29 +05:30
- title: "Latency"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Latency (ms)"
2020-04-08 14:13:33 +05:30
y_axis:
format: milliseconds
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_nginx_ingress_latency_pod_average
2020-05-24 23:13:21 +05:30
query_range: 'avg(nginx_upstream_response_msecs_avg{upstream=~"{{kube_namespace}}-{{ci_environment_slug}}-.*"})'
2019-10-12 21:52:04 +05:30
label: Pod average (ms)
2017-09-10 17:25:29 +05:30
unit: ms
- title: "HTTP Error Rate"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2019-10-12 21:52:04 +05:30
y_label: "HTTP Errors (%)"
2020-04-08 14:13:33 +05:30
y_axis:
format: percentHundred
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_nginx_ingress_http_error_rate
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(nginx_upstream_responses_total{status_code="5xx", upstream=~"{{kube_namespace}}-{{ci_environment_slug}}-.*"}[2m])) / sum(rate(nginx_upstream_responses_total{upstream=~"{{kube_namespace}}-{{ci_environment_slug}}-.*"}[2m])) * 100'
2019-10-12 21:52:04 +05:30
label: 5xx Errors (%)
2018-11-08 19:23:39 +05:30
unit: "%"
2019-02-15 15:39:39 +05:30
# NGINX Ingress metrics for post-0.16.0 versions
- group: Response metrics (NGINX Ingress)
2019-07-31 22:56:46 +05:30
panels:
2019-02-15 15:39:39 +05:30
- title: "Throughput"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2019-02-15 15:39:39 +05:30
y_label: "Requests / Sec"
2019-07-31 22:56:46 +05:30
metrics:
2019-02-15 15:39:39 +05:30
- id: response_metrics_nginx_ingress_16_throughput_status_code
2020-05-24 23:13:21 +05:30
query_range: 'sum(label_replace(rate(nginx_ingress_controller_requests{namespace="{{kube_namespace}}",ingress=~".*{{ci_environment_slug}}.*"}[2m]), "status_code", "${1}xx", "status", "(.)..")) by (status_code)'
2019-02-15 15:39:39 +05:30
unit: req / sec
label: Status Code
- title: "Latency"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2019-02-15 15:39:39 +05:30
y_label: "Latency (ms)"
2019-07-31 22:56:46 +05:30
metrics:
2019-02-15 15:39:39 +05:30
- id: response_metrics_nginx_ingress_16_latency_pod_average
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(nginx_ingress_controller_ingress_upstream_latency_seconds_sum{namespace="{{kube_namespace}}",ingress=~".*{{ci_environment_slug}}.*"}[2m])) / sum(rate(nginx_ingress_controller_ingress_upstream_latency_seconds_count{namespace="{{kube_namespace}}",ingress=~".*{{ci_environment_slug}}.*"}[2m])) * 1000'
2019-10-12 21:52:04 +05:30
label: Pod average (ms)
2019-02-15 15:39:39 +05:30
unit: ms
- title: "HTTP Error Rate"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2019-10-12 21:52:04 +05:30
y_label: "HTTP Errors (%)"
2019-07-31 22:56:46 +05:30
metrics:
2019-02-15 15:39:39 +05:30
- id: response_metrics_nginx_ingress_16_http_error_rate
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(nginx_ingress_controller_requests{status=~"5.*",namespace="{{kube_namespace}}",ingress=~".*{{ci_environment_slug}}.*"}[2m])) / sum(rate(nginx_ingress_controller_requests{namespace="{{kube_namespace}}",ingress=~".*{{ci_environment_slug}}.*"}[2m])) * 100'
2019-10-12 21:52:04 +05:30
label: 5xx Errors (%)
2019-02-15 15:39:39 +05:30
unit: "%"
2017-09-10 17:25:29 +05:30
- group: Response metrics (HA Proxy)
2019-07-31 22:56:46 +05:30
panels:
2017-09-10 17:25:29 +05:30
- title: "Throughput"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Requests / Sec"
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_ha_proxy_throughput_status_code
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(haproxy_frontend_http_requests_total{ {{environment_filter}} }[2m])) by (code)'
2017-09-10 17:25:29 +05:30
unit: req / sec
2018-11-20 20:47:30 +05:30
label: Status Code
2017-09-10 17:25:29 +05:30
- title: "HTTP Error Rate"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Error Rate (%)"
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_ha_proxy_http_error_rate
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(haproxy_frontend_http_responses_total{code="5xx",{{environment_filter}} }[2m])) / sum(rate(haproxy_frontend_http_responses_total{ {{environment_filter}} }[2m]))'
2019-10-12 21:52:04 +05:30
label: HTTP Errors (%)
2017-09-10 17:25:29 +05:30
unit: "%"
- group: Response metrics (AWS ELB)
2019-07-31 22:56:46 +05:30
panels:
2017-09-10 17:25:29 +05:30
- title: "Throughput"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Requests / Sec"
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_aws_elb_throughput_requests
2020-05-24 23:13:21 +05:30
query_range: 'sum(aws_elb_request_count_sum{ {{environment_filter}} }) / 60'
2019-10-12 21:52:04 +05:30
label: Total (req/sec)
2017-09-10 17:25:29 +05:30
unit: req / sec
- title: "Latency"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Latency (ms)"
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_aws_elb_latency_average
2020-05-24 23:13:21 +05:30
query_range: 'avg(aws_elb_latency_average{ {{environment_filter}} }) * 1000'
2019-10-12 21:52:04 +05:30
label: Average (ms)
2017-09-10 17:25:29 +05:30
unit: ms
- title: "HTTP Error Rate"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Error Rate (%)"
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_aws_elb_http_error_rate
2020-05-24 23:13:21 +05:30
query_range: 'sum(aws_elb_httpcode_backend_5_xx_sum{ {{environment_filter}} }) / sum(aws_elb_request_count_sum{ {{environment_filter}} })'
2019-10-12 21:52:04 +05:30
label: HTTP Errors (%)
2017-09-10 17:25:29 +05:30
unit: "%"
- group: Response metrics (NGINX)
2019-07-31 22:56:46 +05:30
panels:
2017-09-10 17:25:29 +05:30
- title: "Throughput"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Requests / Sec"
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_nginx_throughput_status_code
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(nginx_server_requests{server_zone!="*", server_zone!="_", {{environment_filter}} }[2m])) by (code)'
2017-09-10 17:25:29 +05:30
unit: req / sec
2018-03-17 18:26:18 +05:30
label: Status Code
2017-09-10 17:25:29 +05:30
- title: "Latency"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "Latency (ms)"
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_nginx_latency
2020-05-24 23:13:21 +05:30
query_range: 'avg(nginx_server_requestMsec{ {{environment_filter}} })'
2019-10-12 21:52:04 +05:30
label: Upstream (ms)
2017-09-10 17:25:29 +05:30
unit: ms
2019-10-12 21:52:04 +05:30
- title: "HTTP Error Rate (Errors / Sec)"
2019-07-31 22:56:46 +05:30
type: "area-chart"
2017-09-10 17:25:29 +05:30
y_label: "HTTP 500 Errors / Sec"
2020-04-08 14:13:33 +05:30
y_axis:
precision: 0
2019-07-31 22:56:46 +05:30
metrics:
2018-11-20 20:47:30 +05:30
- id: response_metrics_nginx_http_error_rate
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(nginx_server_requests{code="5xx", {{environment_filter}} }[2m]))'
2017-09-10 17:25:29 +05:30
label: HTTP Errors
unit: "errors / sec"
2020-04-22 19:07:51 +05:30
- title: "HTTP Error Rate"
type: "area-chart"
y_label: "HTTP Errors (%)"
metrics:
- id: response_metrics_nginx_http_error_percentage
2020-05-24 23:13:21 +05:30
query_range: 'sum(rate(nginx_server_requests{code=~"5.*", host="*", {{environment_filter}} }[2m])) / sum(rate(nginx_server_requests{code="total", host="*", {{environment_filter}} }[2m])) * 100'
2020-04-22 19:07:51 +05:30
label: 5xx Errors (%)
unit: "%"