From 7328d6ef248466374c086c848b30609b652e41c8 Mon Sep 17 00:00:00 2001 From: eduardtorosya07 Date: Fri, 6 Mar 2026 09:06:41 +0300 Subject: [PATCH 1/4] feat: add Kong dashboard #6028 --- kong-gateway.json | 683 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 683 insertions(+) create mode 100644 kong-gateway.json diff --git a/kong-gateway.json b/kong-gateway.json new file mode 100644 index 00000000000..c1abfc7c138 --- /dev/null +++ b/kong-gateway.json @@ -0,0 +1,683 @@ +{ + "title": "Kong Gateway / Monitoring Dashboard", + "description": "Comprehensive monitoring dashboard for Kong API Gateway. Displays overview metrics, request & latency analytics, plugin performance, and resource usage. Based on Issue #6028.", + "tags": [ + "kong", + "gateway", + "nginx", + "api-gateway" + ], + "variables": [ + { + "name": "namespace", + "description": "Filter metrics by the Kubernetes namespace where Kong is deployed.", + "type": "QUERY", + "value": ".*", + "sort": 1, + "dataSource": "prometheus", + "query": { + "query": "label_values(nginx_ingress_controller_requests, namespace)", + "legendFormat": "" + } + }, + { + "name": "service", + "description": "Select specific Kong services to filter metrics.", + "type": "QUERY", + "value": ".*", + "sort": 2, + "dataSource": "prometheus", + "query": { + "query": "label_values(nginx_ingress_controller_requests{namespace=~\"$namespace\"}, service)", + "legendFormat": "" + } + }, + { + "name": "environment", + "description": "Filter metrics based on the deployment environment (e.g., production, staging).", + "type": "QUERY", + "value": ".*", + "sort": 3, + "dataSource": "prometheus", + "query": { + "query": "label_values(nginx_ingress_controller_requests, environment)", + "legendFormat": "" + } + }, + { + "name": "cluster", + "description": "K8s cluster name to filter metrics.", + "type": "QUERY", + "value": ".*", + "sort": 4, + "dataSource": "prometheus", + "query": { + "query": "label_values(nginx_ingress_controller_requests, cluster)", + "legendFormat": "" + } + } + ], + "layout": [ + { + "h": 2, + "w": 4, + "x": 0, + "y": 0, + "i": "1-total-requests", + "type": "TIMESERIES", + "title": "Panel - Total Requests" + }, + { + "h": 2, + "w": 4, + "x": 4, + "y": 0, + "i": "2-active-connections", + "type": "TIMESERIES", + "title": "Panel - Active Connections" + }, + { + "h": 2, + "w": 4, + "x": 8, + "y": 0, + "i": "3-uptime", + "type": "VALUE", + "title": "Panel - Uptime" + }, + { + "h": 2, + "w": 4, + "x": 12, + "y": 0, + "i": "4-cpu-usage", + "type": "TIMESERIES", + "title": "Panel - CPU Usage" + }, + { + "h": 2, + "w": 4, + "x": 16, + "y": 0, + "i": "5-memory-usage", + "type": "TIMESERIES", + "title": "Panel - Memory Usage" + }, + { + "h": 2, + "w": 4, + "x": 0, + "y": 2, + "i": "6-request-rate", + "type": "TIMESERIES", + "title": "Panel - Request Rate" + }, + { + "h": 2, + "w": 4, + "x": 4, + "y": 2, + "i": "7-response-status-codes", + "type": "TIMESERIES", + "title": "Panel - Response Status Codes (2xx, 4xx, 5xx)" + }, + { + "h": 2, + "w": 4, + "x": 8, + "y": 2, + "i": "8-request-size", + "type": "TIMESERIES", + "title": "Panel - Request Size" + }, + { + "h": 2, + "w": 4, + "x": 12, + "y": 2, + "i": "9-response-size", + "type": "TIMESERIES", + "title": "Panel - Response Size" + }, + { + "h": 2, + "w": 4, + "x": 16, + "y": 2, + "i": "10-latency-percentiles", + "type": "TIMESERIES", + "title": "Panel - Request Latency (p50, p90, p99)" + }, + { + "h": 2, + "w": 4, + "x": 0, + "y": 4, + "i": "11-upstream-latency", + "type": "TIMESERIES", + "title": "Panel - Upstream Latency" + }, + { + "h": 2, + "w": 4, + "x": 4, + "y": 4, + "i": "12-plugin-latency", + "type": "TIMESERIES", + "title": "Panel - Plugin Latency" + }, + { + "h": 2, + "w": 4, + "x": 8, + "y": 4, + "i": "13-total-errors", + "type": "TIMESERIES", + "title": "Panel - Total Errors" + }, + { + "h": 2, + "w": 4, + "x": 12, + "y": 4, + "i": "14-error-rate", + "type": "TIMESERIES", + "title": "Panel - Error Rate" + }, + { + "h": 2, + "w": 4, + "x": 16, + "y": 4, + "i": "15-top-error-types", + "type": "TIMESERIES", + "title": "Panel - Top Error Types" + }, + { + "h": 2, + "w": 4, + "x": 0, + "y": 6, + "i": "16-failed-requests-by-service", + "type": "TIMESERIES", + "title": "Panel - Failed Requests by Service" + }, + { + "h": 2, + "w": 4, + "x": 4, + "y": 6, + "i": "17-incoming-traffic-volume", + "type": "TIMESERIES", + "title": "Panel - Incoming Traffic Volume" + }, + { + "h": 2, + "w": 4, + "x": 8, + "y": 6, + "i": "18-outgoing-traffic-volume", + "type": "TIMESERIES", + "title": "Panel - Outgoing Traffic Volume" + }, + { + "h": 2, + "w": 4, + "x": 12, + "y": 6, + "i": "19-connection-rate", + "type": "TIMESERIES", + "title": "Panel - Connection Rate" + }, + { + "h": 2, + "w": 4, + "x": 16, + "y": 6, + "i": "20-rejected-connections", + "type": "TIMESERIES", + "title": "Panel - Rejected Connections" + }, + { + "h": 2, + "w": 4, + "x": 0, + "y": 8, + "i": "21-active-plugins", + "type": "TIMESERIES", + "title": "Panel - Active Plugins" + }, + { + "h": 2, + "w": 4, + "x": 4, + "y": 8, + "i": "22-plugin-error-rates", + "type": "TIMESERIES", + "title": "Panel - Plugin Error Rates" + }, + { + "h": 2, + "w": 4, + "x": 8, + "y": 8, + "i": "23-pod-restarts", + "type": "TIMESERIES", + "title": "Panel - Pod Restarts" + } + ], + "panels": { + "1-total-requests": { + "description": "Displays the total number of API requests handled by Kong.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "legend": "Total Requests" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "short" + } + }, + "2-active-connections": { + "description": "Shows the number of active connections currently managed by Kong.", + "query": { + "promql": [ + { + "query": "sum(kong_nginx_http_current_connections{state=\"active\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"})", + "legend": "Active Connections" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "short" + } + }, + "3-uptime": { + "description": "Displays the total uptime of the Kong instance since the last restart.", + "query": { + "promql": [ + { + "query": "max(kong_nginx_metric_errors_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"})", + "legend": "Uptime (seconds)" + } + ], + "queryType": "promql" + }, + "yAxis": { + "unit": "s" + } + }, + "4-cpu-usage": { + "description": "Illustrates the CPU usage by the Kong process.", + "query": { + "promql": [ + { + "query": "sum(rate(container_cpu_usage_seconds_total{container=\"kong\", namespace=~\"$namespace\", pod=~\"$service.*\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (pod) * 100", + "legend": "{{pod}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "percent" + } + }, + "5-memory-usage": { + "description": "Shows the memory consumption of Kong.", + "query": { + "promql": [ + { + "query": "sum(container_memory_working_set_bytes{container=\"kong\", namespace=~\"$namespace\", pod=~\"$service.*\", environment=~\"$environment\", cluster=~\"$cluster\"}) by (pod)", + "legend": "{{pod}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "bytes" + } + }, + "6-request-rate": { + "description": "Displays the rate of incoming API requests per second.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (service)", + "legend": "{{service}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "rps" + } + }, + "7-response-status-codes": { + "description": "Shows the distribution of HTTP response status codes.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"2.*\"}[5m]))", + "legend": "2xx" + }, + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"4.*\"}[5m]))", + "legend": "4xx" + }, + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"5.*\"}[5m]))", + "legend": "5xx" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "rps" + } + }, + "8-request-size": { + "description": "Illustrates the average and percentile sizes of incoming API requests.", + "query": { + "promql": [ + { + "query": "histogram_quantile(0.50, sum(rate(kong_http_request_size_bytes_bucket{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p50" + }, + { + "query": "histogram_quantile(0.90, sum(rate(kong_http_request_size_bytes_bucket{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p90" + }, + { + "query": "histogram_quantile(0.99, sum(rate(kong_http_request_size_bytes_bucket{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p99" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "bytes" + } + }, + "9-response-size": { + "description": "Displays the average and percentile sizes of responses sent by Kong.", + "query": { + "promql": [ + { + "query": "histogram_quantile(0.50, sum(rate(kong_http_response_size_bytes_bucket{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p50" + }, + { + "query": "histogram_quantile(0.90, sum(rate(kong_http_response_size_bytes_bucket{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p90" + }, + { + "query": "histogram_quantile(0.99, sum(rate(kong_http_response_size_bytes_bucket{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p99" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "bytes" + } + }, + "10-latency-percentiles": { + "description": "Displays latency percentiles (p50, p90, p99) to highlight variations in request processing times.", + "query": { + "promql": [ + { + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p50" + }, + { + "query": "histogram_quantile(0.90, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p90" + }, + { + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p99" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "s" + } + }, + "11-upstream-latency": { + "description": "Illustrates the latency of upstream services that Kong communicates with.", + "query": { + "promql": [ + { + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service))", + "legend": "p50 - {{service}}" + }, + { + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service))", + "legend": "p99 - {{service}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "s" + } + }, + "12-plugin-latency": { + "description": "Shows the additional latency introduced by each plugin during request processing.", + "query": { + "promql": [ + { + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p50" + }, + { + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "legend": "p99" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "s" + } + }, + "13-total-errors": { + "description": "Displays the total number of errors encountered by Kong.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"5.*\"}[5m]))", + "legend": "5xx Errors" + }, + { + "query": "sum(rate(kong_nginx_http_4xx_errors_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "legend": "4xx Errors" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "short" + } + }, + "14-error-rate": { + "description": "Shows the rate of errors per second, helping to identify spikes or trends.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"5.*\"}[5m]))", + "legend": "5xx Rate" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "rps" + } + }, + "15-top-error-types": { + "description": "Lists the most common error types (e.g., connection timeouts, authentication failures).", + "query": { + "promql": [ + { + "query": "topk(5, sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code!~\"2.*\"}[5m])) by (code))", + "legend": "HTTP {{code}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "short" + } + }, + "16-failed-requests-by-service": { + "description": "Monitors the number of failed requests segmented by the upstream service.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"5.*\"}[5m])) by (service)", + "legend": "{{service}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "rps" + } + }, + "17-incoming-traffic-volume": { + "description": "Displays the amount of incoming traffic to Kong, measured in bytes per second.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_request_size_bytes_sum{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "legend": "Incoming Bytes/sec" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "Bps" + } + }, + "18-outgoing-traffic-volume": { + "description": "Shows the amount of outgoing traffic from Kong to upstream services.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_response_size_bytes_sum{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "legend": "Outgoing Bytes/sec" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "Bps" + } + }, + "19-connection-rate": { + "description": "Illustrates the rate of new connections being established with Kong.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_nginx_http_total_connections{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "legend": "New Connections/sec" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "short" + } + }, + "20-rejected-connections": { + "description": "Monitors the number of connection attempts rejected by Kong.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_nginx_http_rejected_connections_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "legend": "Rejected Connections/sec" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "short" + } + }, + "21-active-plugins": { + "description": "Lists the active plugins and the number of requests processed by each.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (plugin)", + "legend": "{{plugin}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "rps" + } + }, + "22-plugin-error-rates": { + "description": "Displays the error rates associated with each plugin.", + "query": { + "promql": [ + { + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"5.*\"}[5m])) by (plugin)", + "legend": "{{plugin}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "rps" + } + }, + "23-pod-restarts": { + "description": "Monitors the number of times Kong pods have restarted.", + "query": { + "promql": [ + { + "query": "sum(kube_pod_container_status_restarts_total{container=\"kong\", namespace=~\"$namespace\", pod=~\"$service.*\", environment=~\"$environment\", cluster=~\"$cluster\"}) by (pod)", + "legend": "{{pod}}" + } + ], + "queryType": "promql", + "stepInterval": 60 + }, + "yAxis": { + "unit": "short" + } + } + }, + "version": "v3" +} \ No newline at end of file From 84779409feec0b76d5d9517d46381e89189ca8c9 Mon Sep 17 00:00:00 2001 From: eduardtorosya07 Date: Sat, 7 Mar 2026 15:31:38 +0300 Subject: [PATCH 2/4] fix: update Kong dashboard according to review --- kong-gateway.json | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/kong-gateway.json b/kong-gateway.json index c1abfc7c138..781ba798234 100644 --- a/kong-gateway.json +++ b/kong-gateway.json @@ -16,7 +16,7 @@ "sort": 1, "dataSource": "prometheus", "query": { - "query": "label_values(nginx_ingress_controller_requests, namespace)", + "query": "label_values(kong_http_requests_total, namespace)", "legendFormat": "" } }, @@ -28,7 +28,7 @@ "sort": 2, "dataSource": "prometheus", "query": { - "query": "label_values(nginx_ingress_controller_requests{namespace=~\"$namespace\"}, service)", + "query": "label_values(kong_http_requests_total{namespace=~\"$namespace\"}, service)", "legendFormat": "" } }, @@ -40,7 +40,7 @@ "sort": 3, "dataSource": "prometheus", "query": { - "query": "label_values(nginx_ingress_controller_requests, environment)", + "query": "label_values(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\"}, environment)", "legendFormat": "" } }, @@ -52,7 +52,7 @@ "sort": 4, "dataSource": "prometheus", "query": { - "query": "label_values(nginx_ingress_controller_requests, cluster)", + "query": "label_values(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\"}, cluster)", "legendFormat": "" } } @@ -243,18 +243,18 @@ "w": 4, "x": 0, "y": 8, - "i": "21-active-plugins", + "i": "21-top-services-by-requests", "type": "TIMESERIES", - "title": "Panel - Active Plugins" + "title": "Panel - Top Services by Requests" }, { "h": 2, "w": 4, "x": 4, "y": 8, - "i": "22-plugin-error-rates", + "i": "22-service-error-rates", "type": "TIMESERIES", - "title": "Panel - Plugin Error Rates" + "title": "Panel - Service Error Rates (5xx)" }, { "h": 2, @@ -304,7 +304,7 @@ "query": { "promql": [ { - "query": "max(kong_nginx_metric_errors_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"})", + "query": "(time() - process_start_time_seconds{job=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"})", "legend": "Uptime (seconds)" } ], @@ -455,7 +455,7 @@ "stepInterval": 60 }, "yAxis": { - "unit": "s" + "unit": "ms" } }, "11-upstream-latency": { @@ -475,7 +475,7 @@ "stepInterval": 60 }, "yAxis": { - "unit": "s" + "unit": "ms" } }, "12-plugin-latency": { @@ -495,7 +495,7 @@ "stepInterval": 60 }, "yAxis": { - "unit": "s" + "unit": "ms" } }, "13-total-errors": { @@ -507,7 +507,7 @@ "legend": "5xx Errors" }, { - "query": "sum(rate(kong_nginx_http_4xx_errors_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"4.*\"}[5m]))", "legend": "4xx Errors" } ], @@ -630,13 +630,13 @@ "unit": "short" } }, - "21-active-plugins": { - "description": "Lists the active plugins and the number of requests processed by each.", + "21-top-services-by-requests": { + "description": "Shows the top Kong services by request rate.", "query": { "promql": [ { - "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (plugin)", - "legend": "{{plugin}}" + "query": "topk(10, sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (service))", + "legend": "{{service}}" } ], "queryType": "promql", @@ -646,13 +646,13 @@ "unit": "rps" } }, - "22-plugin-error-rates": { - "description": "Displays the error rates associated with each plugin.", + "22-service-error-rates": { + "description": "Displays the error rates (5xx) per service.", "query": { "promql": [ { - "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"5.*\"}[5m])) by (plugin)", - "legend": "{{plugin}}" + "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"5.*\"}[5m])) by (service)", + "legend": "{{service}}" } ], "queryType": "promql", @@ -680,4 +680,4 @@ } }, "version": "v3" -} \ No newline at end of file +} From b6639c02f4e6b8672cbd4ea73ade49e97154a8b9 Mon Sep 17 00:00:00 2001 From: eduardtorosya07 Date: Sat, 7 Mar 2026 16:01:53 +0300 Subject: [PATCH 3/4] Update print statement from 'Hello' to 'Goodbye' --- kong-gateway.json | 106 +++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/kong-gateway.json b/kong-gateway.json index 781ba798234..f6a2994d052 100644 --- a/kong-gateway.json +++ b/kong-gateway.json @@ -65,7 +65,7 @@ "y": 0, "i": "1-total-requests", "type": "TIMESERIES", - "title": "Panel - Total Requests" + "title": "Panel - Request Rate" }, { "h": 2, @@ -110,7 +110,7 @@ "y": 2, "i": "6-request-rate", "type": "TIMESERIES", - "title": "Panel - Request Rate" + "title": "Panel - Request Rate by Service" }, { "h": 2, @@ -164,7 +164,7 @@ "y": 4, "i": "12-plugin-latency", "type": "TIMESERIES", - "title": "Panel - Plugin Latency" + "title": "Panel - Kong Latency (including plugins)" }, { "h": 2, @@ -173,7 +173,7 @@ "y": 4, "i": "13-total-errors", "type": "TIMESERIES", - "title": "Panel - Total Errors" + "title": "Panel - Error Rates (4xx, 5xx)" }, { "h": 2, @@ -182,7 +182,7 @@ "y": 4, "i": "14-error-rate", "type": "TIMESERIES", - "title": "Panel - Error Rate" + "title": "Panel - 5xx Error Rate" }, { "h": 2, @@ -191,7 +191,7 @@ "y": 4, "i": "15-top-error-types", "type": "TIMESERIES", - "title": "Panel - Top Error Types" + "title": "Panel - Top Error Types (4xx, 5xx)" }, { "h": 2, @@ -200,7 +200,7 @@ "y": 6, "i": "16-failed-requests-by-service", "type": "TIMESERIES", - "title": "Panel - Failed Requests by Service" + "title": "Panel - Failed Requests (5xx) by Service" }, { "h": 2, @@ -227,7 +227,7 @@ "y": 6, "i": "19-connection-rate", "type": "TIMESERIES", - "title": "Panel - Connection Rate" + "title": "Panel - New Connection Rate" }, { "h": 2, @@ -236,7 +236,7 @@ "y": 6, "i": "20-rejected-connections", "type": "TIMESERIES", - "title": "Panel - Rejected Connections" + "title": "Panel - Dropped Connections Rate" }, { "h": 2, @@ -254,7 +254,7 @@ "y": 8, "i": "22-service-error-rates", "type": "TIMESERIES", - "title": "Panel - Service Error Rates (5xx)" + "title": "Panel - Service 5xx Error Rates" }, { "h": 2, @@ -263,24 +263,24 @@ "y": 8, "i": "23-pod-restarts", "type": "TIMESERIES", - "title": "Panel - Pod Restarts" + "title": "Panel - Pod Restart Rate" } ], "panels": { "1-total-requests": { - "description": "Displays the total number of API requests handled by Kong.", + "description": "Rate of incoming API requests handled by Kong (requests per second).", "query": { "promql": [ { "query": "sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", - "legend": "Total Requests" + "legend": "Request Rate (RPS)" } ], "queryType": "promql", "stepInterval": 60 }, "yAxis": { - "unit": "short" + "unit": "rps" } }, "2-active-connections": { @@ -300,11 +300,11 @@ } }, "3-uptime": { - "description": "Displays the total uptime of the Kong instance since the last restart.", + "description": "Average uptime of Kong pods since last restart.", "query": { "promql": [ { - "query": "(time() - process_start_time_seconds{job=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"})", + "query": "avg(time() - process_start_time_seconds{job=\"kong\", namespace=~\"$namespace\"})", "legend": "Uptime (seconds)" } ], @@ -315,11 +315,11 @@ } }, "4-cpu-usage": { - "description": "Illustrates the CPU usage by the Kong process.", + "description": "CPU usage per Kong pod (in cores).", "query": { "promql": [ { - "query": "sum(rate(container_cpu_usage_seconds_total{container=\"kong\", namespace=~\"$namespace\", pod=~\"$service.*\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (pod) * 100", + "query": "sum(rate(container_cpu_usage_seconds_total{container=\"kong\", namespace=~\"$namespace\", pod=~\"$service.*\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (pod)", "legend": "{{pod}}" } ], @@ -327,11 +327,11 @@ "stepInterval": 60 }, "yAxis": { - "unit": "percent" + "unit": "cores" } }, "5-memory-usage": { - "description": "Shows the memory consumption of Kong.", + "description": "Memory consumption per Kong pod (working set bytes).", "query": { "promql": [ { @@ -347,7 +347,7 @@ } }, "6-request-rate": { - "description": "Displays the rate of incoming API requests per second.", + "description": "Displays the rate of incoming API requests per second, broken down by service.", "query": { "promql": [ { @@ -363,7 +363,7 @@ } }, "7-response-status-codes": { - "description": "Shows the distribution of HTTP response status codes.", + "description": "Shows the distribution of HTTP response status codes (2xx, 4xx, 5xx).", "query": { "promql": [ { @@ -387,7 +387,7 @@ } }, "8-request-size": { - "description": "Illustrates the average and percentile sizes of incoming API requests.", + "description": "Average and percentile sizes of incoming API requests.", "query": { "promql": [ { @@ -411,7 +411,7 @@ } }, "9-response-size": { - "description": "Displays the average and percentile sizes of responses sent by Kong.", + "description": "Average and percentile sizes of responses sent by Kong.", "query": { "promql": [ { @@ -435,19 +435,19 @@ } }, "10-latency-percentiles": { - "description": "Displays latency percentiles (p50, p90, p99) to highlight variations in request processing times.", + "description": "Request latency percentiles (p50, p90, p99) in milliseconds.", "query": { "promql": [ { - "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", "legend": "p50" }, { - "query": "histogram_quantile(0.90, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "query": "histogram_quantile(0.90, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", "legend": "p90" }, { - "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", "legend": "p99" } ], @@ -459,15 +459,15 @@ } }, "11-upstream-latency": { - "description": "Illustrates the latency of upstream services that Kong communicates with.", + "description": "Upstream latency percentiles (p50, p99) in milliseconds, broken down by service.", "query": { "promql": [ { - "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service))", + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service)) * 1000", "legend": "p50 - {{service}}" }, { - "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service))", + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service)) * 1000", "legend": "p99 - {{service}}" } ], @@ -479,15 +479,15 @@ } }, "12-plugin-latency": { - "description": "Shows the additional latency introduced by each plugin during request processing.", + "description": "Latency added by Kong itself (including all plugins) in milliseconds.", "query": { "promql": [ { - "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", "legend": "p50" }, { - "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", "legend": "p99" } ], @@ -499,7 +499,7 @@ } }, "13-total-errors": { - "description": "Displays the total number of errors encountered by Kong.", + "description": "Rate of 4xx and 5xx errors per second.", "query": { "promql": [ { @@ -515,11 +515,11 @@ "stepInterval": 60 }, "yAxis": { - "unit": "short" + "unit": "rps" } }, "14-error-rate": { - "description": "Shows the rate of errors per second, helping to identify spikes or trends.", + "description": "Rate of 5xx errors per second.", "query": { "promql": [ { @@ -535,11 +535,11 @@ } }, "15-top-error-types": { - "description": "Lists the most common error types (e.g., connection timeouts, authentication failures).", + "description": "Most frequent HTTP error codes (4xx and 5xx).", "query": { "promql": [ { - "query": "topk(5, sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code!~\"2.*\"}[5m])) by (code))", + "query": "topk(5, sum(rate(kong_http_requests_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\", code=~\"4.*|5.*\"}[5m])) by (code))", "legend": "HTTP {{code}}" } ], @@ -547,11 +547,11 @@ "stepInterval": 60 }, "yAxis": { - "unit": "short" + "unit": "rps" } }, "16-failed-requests-by-service": { - "description": "Monitors the number of failed requests segmented by the upstream service.", + "description": "Rate of 5xx errors broken down by service.", "query": { "promql": [ { @@ -567,7 +567,7 @@ } }, "17-incoming-traffic-volume": { - "description": "Displays the amount of incoming traffic to Kong, measured in bytes per second.", + "description": "Incoming traffic rate in bytes per second.", "query": { "promql": [ { @@ -583,7 +583,7 @@ } }, "18-outgoing-traffic-volume": { - "description": "Shows the amount of outgoing traffic from Kong to upstream services.", + "description": "Outgoing traffic rate in bytes per second.", "query": { "promql": [ { @@ -599,11 +599,11 @@ } }, "19-connection-rate": { - "description": "Illustrates the rate of new connections being established with Kong.", + "description": "Rate of new accepted connections per second.", "query": { "promql": [ { - "query": "sum(rate(kong_nginx_http_total_connections{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "query": "sum(rate(kong_nginx_http_connections_total{state=\"accepted\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", "legend": "New Connections/sec" } ], @@ -611,15 +611,15 @@ "stepInterval": 60 }, "yAxis": { - "unit": "short" + "unit": "rps" } }, "20-rejected-connections": { - "description": "Monitors the number of connection attempts rejected by Kong.", + "description": "Rate of dropped connections per second.", "query": { "promql": [ { - "query": "sum(rate(kong_nginx_http_rejected_connections_total{namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", + "query": "sum(rate(kong_nginx_http_connections_total{state=\"dropped\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m]))", "legend": "Rejected Connections/sec" } ], @@ -627,11 +627,11 @@ "stepInterval": 60 }, "yAxis": { - "unit": "short" + "unit": "rps" } }, "21-top-services-by-requests": { - "description": "Shows the top Kong services by request rate.", + "description": "Top 10 services by request rate.", "query": { "promql": [ { @@ -647,7 +647,7 @@ } }, "22-service-error-rates": { - "description": "Displays the error rates (5xx) per service.", + "description": "5xx error rate per service.", "query": { "promql": [ { @@ -663,11 +663,11 @@ } }, "23-pod-restarts": { - "description": "Monitors the number of times Kong pods have restarted.", + "description": "Rate of Kong pod restarts per second.", "query": { "promql": [ { - "query": "sum(kube_pod_container_status_restarts_total{container=\"kong\", namespace=~\"$namespace\", pod=~\"$service.*\", environment=~\"$environment\", cluster=~\"$cluster\"}) by (pod)", + "query": "sum(rate(kube_pod_container_status_restarts_total{container=\"kong\", namespace=~\"$namespace\", pod=~\"$service.*\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (pod)", "legend": "{{pod}}" } ], From d8edcff499c0c5d91ce39dd666ea81c7acb2264a Mon Sep 17 00:00:00 2001 From: eduardtorosya07 Date: Sat, 7 Mar 2026 16:12:27 +0300 Subject: [PATCH 4/4] Update greeting from 'Hello' to 'Goodbye' --- kong-gateway.json | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/kong-gateway.json b/kong-gateway.json index f6a2994d052..73b8413ccbb 100644 --- a/kong-gateway.json +++ b/kong-gateway.json @@ -439,15 +439,15 @@ "query": { "promql": [ { - "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", "legend": "p50" }, { - "query": "histogram_quantile(0.90, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", + "query": "histogram_quantile(0.90, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", "legend": "p90" }, { - "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"request\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", "legend": "p99" } ], @@ -463,11 +463,11 @@ "query": { "promql": [ { - "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service)) * 1000", + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service))", "legend": "p50 - {{service}}" }, { - "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service)) * 1000", + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"upstream\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le, service))", "legend": "p99 - {{service}}" } ], @@ -483,11 +483,11 @@ "query": { "promql": [ { - "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", + "query": "histogram_quantile(0.50, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", "legend": "p50" }, { - "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le)) * 1000", + "query": "histogram_quantile(0.99, sum(rate(kong_latency_bucket{type=\"kong\", namespace=~\"$namespace\", service=~\"$service\", environment=~\"$environment\", cluster=~\"$cluster\"}[5m])) by (le))", "legend": "p99" } ], @@ -681,3 +681,4 @@ }, "version": "v3" } +