Commit bf44d054 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch '215563-support-only-liquid-syntax' into 'master'

Change system dashboard to use {{ }} syntax for variable substitution

See merge request gitlab-org/gitlab!31362
parents aaa0a6c5 74447f11
...@@ -10,7 +10,7 @@ panel_groups: ...@@ -10,7 +10,7 @@ panel_groups:
weight: 4 weight: 4
metrics: metrics:
- id: system_metrics_kubernetes_container_memory_total - id: system_metrics_kubernetes_container_memory_total
query_range: 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) /1024/1024/1024' query_range: 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-(.*)",namespace="{{kube_namespace}}"}) by (job)) without (job) /1024/1024/1024'
label: Total (GB) label: Total (GB)
unit: GB unit: GB
- title: "Core Usage (Total)" - title: "Core Usage (Total)"
...@@ -19,7 +19,7 @@ panel_groups: ...@@ -19,7 +19,7 @@ panel_groups:
weight: 3 weight: 3
metrics: metrics:
- id: system_metrics_kubernetes_container_cores_total - id: system_metrics_kubernetes_container_cores_total
query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job)' query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^{{ci_environment_slug}}-(.*)",namespace="{{kube_namespace}}"}[15m])) by (job)) without (job)'
label: Total (cores) label: Total (cores)
unit: "cores" unit: "cores"
- title: "Memory Usage (Pod average)" - title: "Memory Usage (Pod average)"
...@@ -28,7 +28,7 @@ panel_groups: ...@@ -28,7 +28,7 @@ panel_groups:
weight: 2 weight: 2
metrics: metrics:
- id: system_metrics_kubernetes_container_memory_average - id: system_metrics_kubernetes_container_memory_average
query_range: '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' query_range: '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'
label: Pod average (MB) label: Pod average (MB)
unit: MB unit: MB
- title: "Canary: Memory Usage (Pod Average)" - title: "Canary: Memory Usage (Pod Average)"
...@@ -37,7 +37,7 @@ panel_groups: ...@@ -37,7 +37,7 @@ panel_groups:
weight: 2 weight: 2
metrics: metrics:
- id: system_metrics_kubernetes_container_memory_average_canary - id: system_metrics_kubernetes_container_memory_average_canary
query_range: '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' query_range: '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'
label: Pod average (MB) label: Pod average (MB)
unit: MB unit: MB
track: canary track: canary
...@@ -47,7 +47,7 @@ panel_groups: ...@@ -47,7 +47,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: system_metrics_kubernetes_container_core_usage - id: system_metrics_kubernetes_container_core_usage
query_range: '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))' query_range: '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))'
label: Pod average (cores) label: Pod average (cores)
unit: "cores" unit: "cores"
- title: "Canary: Core Usage (Pod Average)" - title: "Canary: Core Usage (Pod Average)"
...@@ -56,7 +56,7 @@ panel_groups: ...@@ -56,7 +56,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: system_metrics_kubernetes_container_core_usage_canary - id: system_metrics_kubernetes_container_core_usage_canary
query_range: '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))' query_range: '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))'
label: Pod average (cores) label: Pod average (cores)
unit: "cores" unit: "cores"
track: canary track: canary
...@@ -66,7 +66,7 @@ panel_groups: ...@@ -66,7 +66,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: system_metrics_knative_function_invocation_count - id: system_metrics_knative_function_invocation_count
query_range: 'sum(ceil(rate(istio_requests_total{destination_service_namespace="%{kube_namespace}", destination_service=~"%{function_name}.*"}[1m])*60))' query_range: 'sum(ceil(rate(istio_requests_total{destination_service_namespace="{{kube_namespace}}", destination_service=~"{{function_name}}.*"}[1m])*60))'
label: invocations / minute label: invocations / minute
unit: requests unit: requests
# NGINX Ingress metrics for pre-0.16.0 versions # NGINX Ingress metrics for pre-0.16.0 versions
...@@ -79,7 +79,7 @@ panel_groups: ...@@ -79,7 +79,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_ingress_throughput_status_code - id: response_metrics_nginx_ingress_throughput_status_code
query_range: 'sum(rate(nginx_upstream_responses_total{upstream=~"%{kube_namespace}-%{ci_environment_slug}-.*"}[2m])) by (status_code)' query_range: 'sum(rate(nginx_upstream_responses_total{upstream=~"{{kube_namespace}}-{{ci_environment_slug}}-.*"}[2m])) by (status_code)'
unit: req / sec unit: req / sec
label: Status Code label: Status Code
- title: "Latency" - title: "Latency"
...@@ -90,7 +90,7 @@ panel_groups: ...@@ -90,7 +90,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_ingress_latency_pod_average - id: response_metrics_nginx_ingress_latency_pod_average
query_range: 'avg(nginx_upstream_response_msecs_avg{upstream=~"%{kube_namespace}-%{ci_environment_slug}-.*"})' query_range: 'avg(nginx_upstream_response_msecs_avg{upstream=~"{{kube_namespace}}-{{ci_environment_slug}}-.*"})'
label: Pod average (ms) label: Pod average (ms)
unit: ms unit: ms
- title: "HTTP Error Rate" - title: "HTTP Error Rate"
...@@ -101,7 +101,7 @@ panel_groups: ...@@ -101,7 +101,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_ingress_http_error_rate - id: response_metrics_nginx_ingress_http_error_rate
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' 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'
label: 5xx Errors (%) label: 5xx Errors (%)
unit: "%" unit: "%"
# NGINX Ingress metrics for post-0.16.0 versions # NGINX Ingress metrics for post-0.16.0 versions
...@@ -114,7 +114,7 @@ panel_groups: ...@@ -114,7 +114,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_ingress_16_throughput_status_code - id: response_metrics_nginx_ingress_16_throughput_status_code
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)' 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)'
unit: req / sec unit: req / sec
label: Status Code label: Status Code
- title: "Latency" - title: "Latency"
...@@ -123,7 +123,7 @@ panel_groups: ...@@ -123,7 +123,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_ingress_16_latency_pod_average - id: response_metrics_nginx_ingress_16_latency_pod_average
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' 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'
label: Pod average (ms) label: Pod average (ms)
unit: ms unit: ms
- title: "HTTP Error Rate" - title: "HTTP Error Rate"
...@@ -132,7 +132,7 @@ panel_groups: ...@@ -132,7 +132,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_ingress_16_http_error_rate - id: response_metrics_nginx_ingress_16_http_error_rate
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' 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'
label: 5xx Errors (%) label: 5xx Errors (%)
unit: "%" unit: "%"
- group: Response metrics (HA Proxy) - group: Response metrics (HA Proxy)
...@@ -144,7 +144,7 @@ panel_groups: ...@@ -144,7 +144,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_ha_proxy_throughput_status_code - id: response_metrics_ha_proxy_throughput_status_code
query_range: 'sum(rate(haproxy_frontend_http_requests_total{%{environment_filter}}[2m])) by (code)' query_range: 'sum(rate(haproxy_frontend_http_requests_total{ {{environment_filter}} }[2m])) by (code)'
unit: req / sec unit: req / sec
label: Status Code label: Status Code
- title: "HTTP Error Rate" - title: "HTTP Error Rate"
...@@ -153,7 +153,7 @@ panel_groups: ...@@ -153,7 +153,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_ha_proxy_http_error_rate - id: response_metrics_ha_proxy_http_error_rate
query_range: 'sum(rate(haproxy_frontend_http_responses_total{code="5xx",%{environment_filter}}[2m])) / sum(rate(haproxy_frontend_http_responses_total{%{environment_filter}}[2m]))' query_range: 'sum(rate(haproxy_frontend_http_responses_total{code="5xx",{{environment_filter}} }[2m])) / sum(rate(haproxy_frontend_http_responses_total{ {{environment_filter}} }[2m]))'
label: HTTP Errors (%) label: HTTP Errors (%)
unit: "%" unit: "%"
- group: Response metrics (AWS ELB) - group: Response metrics (AWS ELB)
...@@ -165,7 +165,7 @@ panel_groups: ...@@ -165,7 +165,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_aws_elb_throughput_requests - id: response_metrics_aws_elb_throughput_requests
query_range: 'sum(aws_elb_request_count_sum{%{environment_filter}}) / 60' query_range: 'sum(aws_elb_request_count_sum{ {{environment_filter}} }) / 60'
label: Total (req/sec) label: Total (req/sec)
unit: req / sec unit: req / sec
- title: "Latency" - title: "Latency"
...@@ -174,7 +174,7 @@ panel_groups: ...@@ -174,7 +174,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_aws_elb_latency_average - id: response_metrics_aws_elb_latency_average
query_range: 'avg(aws_elb_latency_average{%{environment_filter}}) * 1000' query_range: 'avg(aws_elb_latency_average{ {{environment_filter}} }) * 1000'
label: Average (ms) label: Average (ms)
unit: ms unit: ms
- title: "HTTP Error Rate" - title: "HTTP Error Rate"
...@@ -183,7 +183,7 @@ panel_groups: ...@@ -183,7 +183,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_aws_elb_http_error_rate - id: response_metrics_aws_elb_http_error_rate
query_range: 'sum(aws_elb_httpcode_backend_5_xx_sum{%{environment_filter}}) / sum(aws_elb_request_count_sum{%{environment_filter}})' query_range: 'sum(aws_elb_httpcode_backend_5_xx_sum{ {{environment_filter}} }) / sum(aws_elb_request_count_sum{ {{environment_filter}} })'
label: HTTP Errors (%) label: HTTP Errors (%)
unit: "%" unit: "%"
- group: Response metrics (NGINX) - group: Response metrics (NGINX)
...@@ -195,7 +195,7 @@ panel_groups: ...@@ -195,7 +195,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_throughput_status_code - id: response_metrics_nginx_throughput_status_code
query_range: 'sum(rate(nginx_server_requests{server_zone!="*", server_zone!="_", %{environment_filter}}[2m])) by (code)' query_range: 'sum(rate(nginx_server_requests{server_zone!="*", server_zone!="_", {{environment_filter}} }[2m])) by (code)'
unit: req / sec unit: req / sec
label: Status Code label: Status Code
- title: "Latency" - title: "Latency"
...@@ -204,7 +204,7 @@ panel_groups: ...@@ -204,7 +204,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_latency - id: response_metrics_nginx_latency
query_range: 'avg(nginx_server_requestMsec{%{environment_filter}})' query_range: 'avg(nginx_server_requestMsec{ {{environment_filter}} })'
label: Upstream (ms) label: Upstream (ms)
unit: ms unit: ms
- title: "HTTP Error Rate (Errors / Sec)" - title: "HTTP Error Rate (Errors / Sec)"
...@@ -215,7 +215,7 @@ panel_groups: ...@@ -215,7 +215,7 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_http_error_rate - id: response_metrics_nginx_http_error_rate
query_range: 'sum(rate(nginx_server_requests{code="5xx", %{environment_filter}}[2m]))' query_range: 'sum(rate(nginx_server_requests{code="5xx", {{environment_filter}} }[2m]))'
label: HTTP Errors label: HTTP Errors
unit: "errors / sec" unit: "errors / sec"
- title: "HTTP Error Rate" - title: "HTTP Error Rate"
...@@ -224,7 +224,6 @@ panel_groups: ...@@ -224,7 +224,6 @@ panel_groups:
weight: 1 weight: 1
metrics: metrics:
- id: response_metrics_nginx_http_error_percentage - id: response_metrics_nginx_http_error_percentage
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' 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'
label: 5xx Errors (%) label: 5xx Errors (%)
unit: "%" unit: "%"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment