Created
June 9, 2023 14:31
-
-
Save k4mrul/57f5865f4335f1e6a841e19064c953f6 to your computer and use it in GitHub Desktop.
Revisions
-
k4mrul created this gist
Jun 9, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2567 @@ { "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "description": "A companion dashboard for https://github.com/hipages/php-fpm_exporter\r\n\r\nThe dashboard caters to Kubernetes & PHP-FPM but can be easily adjusted.", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 68, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "description": "Utilisation of processes based on active/inactive processes", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "max": 100, "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "rgba(50, 172, 45, 0.97)", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 70 }, { "color": "rgba(245, 54, 54, 0.9)", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, "id": 2, "links": [], "maxDataPoints": 100, "options": { "orientation": "horizontal", "reduceOptions": { "calcs": [ "mean" ], "fields": "/^Value$/", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true }, "pluginVersion": "9.2.1", "targets": [ { "alias": "", "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "avg((sum(phpfpm_active_processes{namespace=\"$namespace\"}) by (kubernetes_pod_name) *100) / sum(phpfpm_total_processes{namespace=\"$namespace\"}) by (kubernetes_pod_name))", "format": "time_series", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "interval": "", "intervalFactor": 1, "orderByTime": "ASC", "policy": "default", "rawSql": "SELECT\n UNIX_TIMESTAMP(<time_column>) as time_sec,\n <value column> as value,\n <series name column> as metric\nFROM <table name>\nWHERE $__timeFilter(time_column)\nORDER BY <time_column> ASC\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 1, "tags": [] } ], "timeFrom": "1m", "title": "Total Process Utilisation", "type": "gauge" }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "description": "How many times was the maximum amount of children reached?", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, "id": 7, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Value$/", "values": false }, "textMode": "auto" }, "pluginVersion": "9.2.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "sum(phpfpm_max_children_reached{namespace=\"$namespace\"})", "format": "table", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 2, "metric": "php", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 2, "tags": [] } ], "timeFrom": "1m", "title": "Max Children reached", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, "id": 1, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Value$/", "values": false }, "textMode": "auto" }, "pluginVersion": "9.2.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "delta(phpfpm_accepted_connections{namespace=\"$namespace\"}[2m])", "format": "time_series", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 2, "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 2, "tags": [] } ], "timeFrom": "1m", "title": "Accepted connections (rpm)", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 12, "y": 0 }, "id": 3, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Value$/", "values": false }, "textMode": "auto" }, "pluginVersion": "9.2.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "count(phpfpm_up{namespace=\"$namespace\"} > 0)", "format": "table", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "hide": false, "intervalFactor": 2, "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 2, "tags": [] } ], "timeFrom": "1m", "title": "# of pods", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 16, "y": 0 }, "id": 8, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Value$/", "values": false }, "textMode": "auto" }, "pluginVersion": "9.2.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "sum(phpfpm_listen_queue{namespace=\"$namespace\"})", "format": "table", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 2, "metric": "phpfpm_listen_queue", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 2, "tags": [] } ], "timeFrom": "1m", "title": "Queued Requests", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 4, "x": 20, "y": 0 }, "id": 9, "links": [], "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "/^Value$/", "values": false }, "textMode": "auto" }, "pluginVersion": "9.2.1", "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "sum(phpfpm_scrape_failures{namespace=\"$namespace\"})", "format": "table", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 1, "metric": "phpfpm_scrape_failures", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 1, "tags": [] } ], "timeFrom": "1m", "title": "Scrape failures", "type": "stat" }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 4 }, "hiddenSeries": false, "id": 24, "legend": { "alignAsTable": true, "avg": false, "current": true, "hideEmpty": true, "hideZero": true, "max": false, "min": false, "rightSide": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null as zero", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "sum(phpfpm_process_state{namespace=\"$namespace\"}) by (state)", "format": "time_series", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 1, "legendFormat": "{{state}}", "metric": "", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 1, "tags": [] }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(phpfpm_process_state{namespace=\"$namespace\"})", "format": "time_series", "intervalFactor": 2, "legendFormat": "Total", "refId": "B", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "# of processes by state", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "none", "label": "", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": false } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 4 }, "hiddenSeries": false, "id": 25, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": false, "hideZero": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": "max", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "", "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(phpfpm_process_request_duration{namespace=\"$namespace\"}) by (pid_hash)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{pid_hash}}", "rawSql": "SELECT\n UNIX_TIMESTAMP(<time_column>) as time_sec,\n <value column> as value,\n <series name column> as metric\nFROM <table name>\nWHERE $__timeFilter(time_column)\nORDER BY <time_column> ASC\n", "refId": "A", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "Request Duration by process", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "µs", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 11 }, "hiddenSeries": false, "id": 10, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "sum(phpfpm_listen_queue{namespace=\"$namespace\"})", "format": "time_series", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 2, "legendFormat": "# of requests", "metric": "", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 2, "tags": [] }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(kube_pod_container_status_terminated{pod=~\"$branch-.*\"})", "format": "time_series", "hide": true, "intervalFactor": 2, "legendFormat": "# of pod terminations", "refId": "B", "step": 60 } ], "thresholds": [], "timeRegions": [], "title": "Queued requests", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "none", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": false } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 11 }, "hiddenSeries": false, "id": 14, "legend": { "alignAsTable": false, "avg": false, "current": true, "max": false, "min": false, "rightSide": false, "show": false, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "", "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(phpfpm_process_requests{namespace=\"$namespace\"}) by (pid_hash)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{pid_hash}}", "rawSql": "SELECT\n UNIX_TIMESTAMP(<time_column>) as time_sec,\n <value column> as value,\n <series name column> as metric\nFROM <table name>\nWHERE $__timeFilter(time_column)\nORDER BY <time_column> ASC\n", "refId": "A", "step": 1 } ], "thresholds": [], "timeRegions": [], "title": "Requests per process", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 18 }, "hiddenSeries": false, "id": 11, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "sum(phpfpm_active_processes{namespace=\"$namespace\"})", "format": "time_series", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 1, "legendFormat": "# of active processes", "metric": "phpfpm_active_processes", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 1, "tags": [] }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(phpfpm_idle_processes{namespace=\"$namespace\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "# of idle processes", "metric": "phpfpm_idle_processes", "refId": "B", "step": 1 }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(phpfpm_total_processes{namespace=\"$namespace\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "# of total processes", "metric": "phpfpm_total_processes", "refId": "C", "step": 1 } ], "thresholds": [], "timeRegions": [], "title": "# of Active & Idle processes", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 18 }, "hiddenSeries": false, "id": 4, "legend": { "alignAsTable": false, "avg": false, "current": false, "max": false, "min": false, "rightSide": true, "show": false, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [ { "alias": "# of pod terminations", "yaxis": 2 } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "avg((sum(phpfpm_active_processes{namespace=\"$namespace\"}) by (kubernetes_pod_name) *100) / sum(phpfpm_total_processes{namespace=\"$namespace\"}) by (kubernetes_pod_name))", "format": "time_series", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 2, "legendFormat": "Process utilisation", "metric": "", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 2, "tags": [] }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(kube_pod_container_status_terminated{pod=~\"static-thread-handling-.*\"})", "format": "time_series", "hide": false, "intervalFactor": 2, "legendFormat": "# of pod terminations", "metric": "kube", "refId": "B", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "Total process utilisation & container termination", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [ "total" ] }, "yaxes": [ { "format": "percent", "label": "Process utilisation", "logBase": 1, "max": "100", "min": "0", "show": true }, { "format": "short", "label": "Pod termination", "logBase": 1, "min": "0", "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 25 }, "hiddenSeries": false, "id": 12, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "dsType": "influxdb", "expr": "kube_replicaset_spec_replicas{replicaset=~\"$branch-.*\"}", "format": "time_series", "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 2, "legendFormat": "{{replicaset}}", "metric": "", "orderByTime": "ASC", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "step": 2, "tags": [] } ], "thresholds": [], "timeRegions": [], "title": "# of pods in a ReplicaSet", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "none", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": false } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "editable": true, "error": false, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 25 }, "hiddenSeries": false, "id": 17, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "count(count(container_memory_usage_bytes{namespace=\"$namespace\"}) by (pod_name))", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "pods", "refId": "A", "step": 1 }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "count(count(container_memory_usage_bytes{namespace=\"$namespace\"}) by (kubernetes_io_hostname))", "format": "time_series", "interval": "", "intervalFactor": 2, "legendFormat": "hosts", "refId": "B", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "Number of pods", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "editable": true, "error": false, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 32 }, "hiddenSeries": false, "id": 18, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(irate(container_cpu_usage_seconds_total{container=\"php\",namespace=\"$namespace\"}[30s])) by (namespace, container) / sum(container_spec_cpu_quota{container=\"php\",namespace=\"$namespace\"} / container_spec_cpu_period{container=\"php\",namespace=\"$namespace\"}) by (namespace, container)", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "actual", "metric": "", "refId": "A", "step": 1 } ], "thresholds": [], "timeRegions": [], "title": "Cpu usage (relative to limit)", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "percentunit", "label": "", "logBase": 1, "max": "1", "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "editable": true, "error": false, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 32 }, "hiddenSeries": false, "id": 19, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "alertThreshold": true }, "percentage": false, "pluginVersion": "9.2.1", "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_memory_usage_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace, container) / sum(container_spec_memory_limit_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace, container)", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "actual", "refId": "A", "step": 1 } ], "thresholds": [], "timeRegions": [], "title": "Memory usage (relative to limit)", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "percentunit", "logBase": 1, "max": "1", "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "description": "The metric may not work if there is no quota assigned.", "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 39 }, "id": 16, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "", "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(\n irate(\n container_cpu_usage_seconds_total{container=\"php\",namespace=\"$namespace\"}[2m]\n )\n) by (namespace,container,pod) /\nsum(\n container_spec_cpu_quota{container=\"php\",namespace=\"$namespace\"} /\n container_spec_cpu_period{container=\"php\",namespace=\"$namespace\"}\n) by (namespace,container,pod)", "format": "time_series", "intervalFactor": 1, "rawSql": "SELECT\n UNIX_TIMESTAMP(<time_column>) as time_sec,\n <value column> as value,\n <series name column> as metric\nFROM <table name>\nWHERE $__timeFilter(time_column)\nORDER BY <time_column> ASC\n", "refId": "A", "step": 1 } ], "thresholds": [], "title": "CPU usage per pod (relative to limit)", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ] }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 39 }, "id": 15, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "", "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_memory_usage_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container,pod) / sum(container_spec_memory_limit_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container,pod)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{pod}}", "rawSql": "SELECT\n UNIX_TIMESTAMP(<time_column>) as time_sec,\n <value column> as value,\n <series name column> as metric\nFROM <table name>\nWHERE $__timeFilter(time_column)\nORDER BY <time_column> ASC\n", "refId": "A", "step": 1 } ], "thresholds": [], "title": "Memory usage per pod (relative to limit)", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "percentunit", "logBase": 1, "max": "1", "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ] }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 46 }, "id": 20, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(irate(container_cpu_usage_seconds_total{container=\"php\",namespace=\"$namespace\"}[30s])) by (id,pod)", "format": "time_series", "interval": "", "intervalFactor": 2, "legendFormat": "{{pod}}", "refId": "A", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_spec_cpu_quota{container=\"php\",namespace=\"$namespace\"} / container_spec_cpu_period{container=\"php\",namespace=\"$namespace\"}) by (namespace,container) / count(container_memory_usage_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "limit", "refId": "B", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_spec_cpu_shares{container=\"php\",namespace=\"$namespace\"} / 1024) by (namespace,container) / count(container_spec_cpu_shares{container=\"php\",namespace=\"$namespace\"}) by (namespace,container) ", "format": "time_series", "intervalFactor": 2, "legendFormat": "request", "refId": "C", "step": 2 } ], "thresholds": [], "title": "Cpu usage (per pod)", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "cores", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ] }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "editable": true, "error": false, "fill": 1, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 46 }, "id": 21, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "connected", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_memory_usage_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container) / count(container_memory_usage_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container) ", "format": "time_series", "intervalFactor": 1, "legendFormat": "actual", "metric": "", "refId": "A", "step": 1 }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_spec_memory_limit_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container) / count(container_memory_usage_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container) ", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "limit", "refId": "B", "step": 1 } ], "thresholds": [], "title": "Memory usage (avg per pod)", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "bytes", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ] }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "editable": true, "error": false, "fill": 1, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 53 }, "id": 22, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(irate(container_cpu_usage_seconds_total{container=\"php\",namespace=\"$namespace\"}[30s])) by (namespace,container)", "format": "time_series", "hide": false, "interval": "", "intervalFactor": 1, "legendFormat": "actual", "metric": "", "refId": "A", "step": 1 }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_spec_cpu_quota{container=\"php\",namespace=\"$namespace\"} / container_spec_cpu_period{container=\"php\",namespace=\"$namespace\"}) by (namespace,container)", "format": "time_series", "intervalFactor": 1, "legendFormat": "limit", "refId": "B", "step": 1 }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_spec_cpu_shares{container=\"php\",namespace=\"$namespace\"} / 1024) by (namespace,container) ", "format": "time_series", "intervalFactor": 1, "legendFormat": "request", "refId": "C", "step": 1 } ], "thresholds": [], "title": "Cpu usage (total)", "tooltip": { "msResolution": true, "shared": false, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "none", "label": "cores", "logBase": 1, "min": 0, "show": true }, { "format": "short", "logBase": 1, "show": true } ] }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "editable": true, "error": false, "fill": 1, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 53 }, "id": 23, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": false, "rightSide": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_memory_usage_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container)", "format": "time_series", "interval": "", "intervalFactor": 1, "legendFormat": "actual", "refId": "A", "step": 1 }, { "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "expr": "sum(container_spec_memory_limit_bytes{container=\"php\",namespace=\"$namespace\"}) by (namespace,container)", "format": "time_series", "intervalFactor": 1, "legendFormat": "limit", "refId": "B", "step": 1 } ], "thresholds": [], "title": "Memory usage (total)", "tooltip": { "msResolution": true, "shared": false, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "bytes", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ] } ], "refresh": false, "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": false, "text": "test", "value": "test" }, "datasource": { "type": "prometheus", "uid": "P4169E866C3094E38" }, "definition": "", "hide": 0, "includeAll": false, "label": "Namespace", "multi": false, "name": "namespace", "options": [], "query": { "query": "label_values(phpfpm_up,namespace)", "refId": "Prometheus-namespace-Variable-Query" }, "refresh": 2, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false } ] }, "time": { "from": "now-5m", "to": "now" }, "timepicker": { "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ] }, "timezone": "", "title": "Kubernetes PHP-FPM", "uid": "mqyvlxlVk", "version": 2, "weekStart": "" }