2019-02-15 15:39:39 +05:30
# NGINX Ingress metrics for pre-0.16.0 versions
- group : Response metrics (NGINX Ingress VTS)
2017-09-10 17:25:29 +05:30
priority : 10
metrics :
- title : "Throughput"
y_label : "Requests / Sec"
required_metrics :
2018-03-17 18:26:18 +05:30
- nginx_upstream_responses_total
2017-09-10 17:25:29 +05:30
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- 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)'
2017-09-10 17:25:29 +05:30
unit : req / sec
2018-03-17 18:26:18 +05:30
label : Status Code
series :
- label : status_code
when :
- value : 2xx
color : green
- value : 4xx
color : orange
- value : 5xx
color : red
2017-09-10 17:25:29 +05:30
- title : "Latency"
y_label : "Latency (ms)"
required_metrics :
- nginx_upstream_response_msecs_avg
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- id : response_metrics_nginx_ingress_latency_pod_average
query_range : 'avg(nginx_upstream_response_msecs_avg{upstream=~"%{kube_namespace}-%{ci_environment_slug}-.*"})'
2018-05-09 12:01:36 +05:30
label : Pod average
2017-09-10 17:25:29 +05:30
unit : ms
- title : "HTTP Error Rate"
2018-11-08 19:23:39 +05:30
y_label : "HTTP Errors"
2017-09-10 17:25:29 +05:30
required_metrics :
- nginx_upstream_responses_total
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- 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'
2018-11-08 19:23:39 +05:30
label : 5xx Errors
unit : "%"
2019-02-15 15:39:39 +05:30
# 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 : "%"
2017-09-10 17:25:29 +05:30
- group : Response metrics (HA Proxy)
priority : 10
metrics :
- title : "Throughput"
y_label : "Requests / Sec"
required_metrics :
- haproxy_frontend_http_requests_total
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- id : response_metrics_ha_proxy_throughput_status_code
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
2018-03-17 18:26:18 +05:30
series :
2018-11-20 20:47:30 +05:30
- label : status_code
2018-03-17 18:26:18 +05:30
when :
- value : 2xx
color : green
- value : 4xx
color : yellow
- value : 5xx
color : red
2017-09-10 17:25:29 +05:30
- title : "HTTP Error Rate"
y_label : "Error Rate (%)"
required_metrics :
- haproxy_frontend_http_responses_total
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- 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]))'
2017-09-10 17:25:29 +05:30
label : HTTP Errors
unit : "%"
- group : Response metrics (AWS ELB)
priority : 10
metrics :
- title : "Throughput"
y_label : "Requests / Sec"
required_metrics :
- aws_elb_request_count_sum
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- id : response_metrics_aws_elb_throughput_requests
query_range : 'sum(aws_elb_request_count_sum{%{environment_filter}}) / 60'
2017-09-10 17:25:29 +05:30
label : Total
unit : req / sec
- title : "Latency"
y_label : "Latency (ms)"
required_metrics :
- aws_elb_latency_average
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- id : response_metrics_aws_elb_latency_average
query_range : 'avg(aws_elb_latency_average{%{environment_filter}}) * 1000'
2017-09-10 17:25:29 +05:30
label : Average
unit : ms
- title : "HTTP Error Rate"
y_label : "Error Rate (%)"
required_metrics :
- aws_elb_request_count_sum
- aws_elb_httpcode_backend_5_xx_sum
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- 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}})'
2017-09-10 17:25:29 +05:30
label : HTTP Errors
unit : "%"
- group : Response metrics (NGINX)
priority : 10
metrics :
- title : "Throughput"
y_label : "Requests / Sec"
required_metrics :
2018-10-15 14:42:47 +05:30
- nginx_server_requests
2017-09-10 17:25:29 +05:30
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- id : response_metrics_nginx_throughput_status_code
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
series :
- label : status_code
when :
- value : 2xx
color : green
- value : 4xx
color : orange
- value : 5xx
color : red
2017-09-10 17:25:29 +05:30
- title : "Latency"
y_label : "Latency (ms)"
required_metrics :
2018-10-15 14:42:47 +05:30
- nginx_server_requestMsec
2017-09-10 17:25:29 +05:30
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- id : response_metrics_nginx_latency
query_range : 'avg(nginx_server_requestMsec{%{environment_filter}})'
2017-09-10 17:25:29 +05:30
label : Upstream
unit : ms
- title : "HTTP Error Rate"
y_label : "HTTP 500 Errors / Sec"
required_metrics :
2018-10-15 14:42:47 +05:30
- nginx_server_requests
2017-09-10 17:25:29 +05:30
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- id : response_metrics_nginx_http_error_rate
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"
- group : System metrics (Kubernetes)
priority : 5
metrics :
2018-05-09 12:01:36 +05:30
- title : "Memory Usage (Total)"
y_label : "Total Memory Used"
required_metrics :
- container_memory_usage_bytes
weight : 4
queries :
2018-11-20 20:47:30 +05:30
- 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'
2018-05-09 12:01:36 +05:30
label : Total
unit : GB
- title : "Core Usage (Total)"
y_label : "Total Cores"
required_metrics :
- container_cpu_usage_seconds_total
weight : 3
queries :
2018-11-20 20:47:30 +05:30
- 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)'
2018-05-09 12:01:36 +05:30
label : Total
unit : "cores"
- title : "Memory Usage (Pod average)"
2018-03-27 19:54:05 +05:30
y_label : "Memory Used per Pod"
2017-09-10 17:25:29 +05:30
required_metrics :
- container_memory_usage_bytes
2018-05-09 12:01:36 +05:30
weight : 2
2017-09-10 17:25:29 +05:30
queries :
2018-11-20 20:47:30 +05:30
- id : system_metrics_kubernetes_container_memory_average
query_range : 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024'
label : Pod average
unit : MB
- title : "Canary: Memory Usage (Pod Average)"
y_label : "Memory Used per Pod"
required_metrics :
- container_memory_usage_bytes
weight : 2
queries :
- 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'
2018-05-09 12:01:36 +05:30
label : Pod average
2017-09-10 17:25:29 +05:30
unit : MB
2018-11-20 20:47:30 +05:30
track : canary
- title : "Core Usage (Pod Average)"
2018-03-27 19:54:05 +05:30
y_label : "Cores per Pod"
2017-09-10 17:25:29 +05:30
required_metrics :
- container_cpu_usage_seconds_total
weight : 1
queries :
2018-11-20 20:47:30 +05:30
- 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}-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))'
2018-05-09 12:01:36 +05:30
label : Pod average
2018-11-20 20:47:30 +05:30
unit : "cores"
- title : "Canary: Core Usage (Pod Average)"
y_label : "Cores per Pod"
required_metrics :
- container_cpu_usage_seconds_total
weight : 1
queries :
- 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))'
label : Pod average
unit : "cores"
track : canary
2019-05-18 00:54:41 +05:30
- title : "Knative function invocations"
y_label : "Invocations"
required_metrics :
- istio_revision_request_count
weight : 1
queries :
- id : system_metrics_knative_function_invocation_count
2019-06-05 12:25:43 +05:30
query_range : 'floor(sum(rate(istio_revision_request_count{destination_configuration="%{function_name}", destination_namespace="%{kube_namespace}"}[1m])/3))'
2019-05-18 00:54:41 +05:30
label : invocations / minute
unit : requests