summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorJoshua Lambert <joshua@gitlab.com>2018-12-17 23:48:55 +0000
committerMike Greiling <mike@pixelcog.com>2018-12-17 23:48:55 +0000
commit3b9ab3f50f9286d0aae88f57708f97121597a64b (patch)
tree5386def2747e3fa93ddf03f81dffadcf39a45af9 /config
parent735d24f368ccaa28667e480b3e20a4d555a62955 (diff)
downloadgitlab-ce-3b9ab3f50f9286d0aae88f57708f97121597a64b.tar.gz
Add NGINX 0.16.0 and above metrics
Diffstat (limited to 'config')
-rw-r--r--config/prometheus/common_metrics.yml48
1 files changed, 47 insertions, 1 deletions
diff --git a/config/prometheus/common_metrics.yml b/config/prometheus/common_metrics.yml
index 52023a2e3cb..9bdaf1575e9 100644
--- a/config/prometheus/common_metrics.yml
+++ b/config/prometheus/common_metrics.yml
@@ -1,4 +1,5 @@
-- group: Response metrics (NGINX Ingress)
+ # NGINX Ingress metrics for pre-0.16.0 versions
+- group: Response metrics (NGINX Ingress VTS)
priority: 10
metrics:
- title: "Throughput"
@@ -40,6 +41,51 @@
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
unit: "%"
+# NGINX Ingress metrics for post-0.16.0 versions
+- group: Response metrics (NGINX Ingress)
+ priority: 10
+ metrics:
+ - title: "Throughput"
+ y_label: "Requests / Sec"
+ required_metrics:
+ - nginx_ingress_controller_requests
+ weight: 1
+ queries:
+ - 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)'
+ unit: req / sec
+ label: Status Code
+ series:
+ - label: status_code
+ when:
+ - value: 2xx
+ color: green
+ - value: 3xx
+ color: blue
+ - value: 4xx
+ color: orange
+ - value: 5xx
+ color: red
+ - title: "Latency"
+ y_label: "Latency (ms)"
+ required_metrics:
+ - nginx_ingress_controller_ingress_upstream_latency_seconds_sum
+ weight: 1
+ queries:
+ - 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'
+ label: Pod average
+ unit: ms
+ - title: "HTTP Error Rate"
+ y_label: "HTTP Errors"
+ required_metrics:
+ - nginx_ingress_controller_requests
+ weight: 1
+ queries:
+ - 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'
+ label: 5xx Errors
+ unit: "%"
- group: Response metrics (HA Proxy)
priority: 10
metrics: