From 5e258f39925b8b2a3154d46689b837bb5d51818a Mon Sep 17 00:00:00 2001 From: Tapajit Chandra Paul Date: Thu, 22 Feb 2024 17:53:18 +0600 Subject: [PATCH] Add druid kubedb-metric template Signed-off-by: Tapajit Chandra Paul --- charts/kubedb-grafana-dashboards/README.md | 38 +- .../dashboards/druid/druid-database.json | 1377 ++++++++ .../dashboards/druid/druid-pod.json | 883 +++++ .../dashboards/druid/druid-summary.json | 2975 +++++++++++++++++ .../data/resources.yaml | 3 + charts/kubedb-grafana-dashboards/values.yaml | 1 + .../catalog-kubedb-com-druidversion.yaml | 28 + .../templates/druid/kubedb-com-druid.yaml | 294 ++ 8 files changed, 5580 insertions(+), 19 deletions(-) create mode 100644 charts/kubedb-grafana-dashboards/dashboards/druid/druid-database.json create mode 100644 charts/kubedb-grafana-dashboards/dashboards/druid/druid-pod.json create mode 100644 charts/kubedb-grafana-dashboards/dashboards/druid/druid-summary.json create mode 100644 charts/kubedb-metrics/templates/druid/catalog-kubedb-com-druidversion.yaml create mode 100644 charts/kubedb-metrics/templates/druid/kubedb-com-druid.yaml diff --git a/charts/kubedb-grafana-dashboards/README.md b/charts/kubedb-grafana-dashboards/README.md index 89eac1bbf..ed2b2bced 100644 --- a/charts/kubedb-grafana-dashboards/README.md +++ b/charts/kubedb-grafana-dashboards/README.md @@ -45,30 +45,30 @@ The command removes all the Kubernetes components associated with the chart and The following table lists the configurable parameters of the `kubedb-grafana-dashboards` chart and their default values. -| Parameter | Description | Default | -|---------------------------------|--------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| -| nameOverride | Overrides name template | "" | -| fullnameOverride | Overrides fullname template | "" | -| resources | List of resources for which dashboards will be applied | ["connectcluster","elasticsearch","kafka","mariadb","mongodb","mysql","perconaxtradb","postgres","proxysql","redis","zookeeper","singlestore"] | -| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | 0 | -| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | -| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | -| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | -| dashboard.alerts | | false | -| dashboard.replacements | | | -| grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | -| grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | -| grafana.version | | 8.0.7 | -| grafana.url | | "" | -| grafana.apikey | | "" | -| app.name | | "" | -| app.namespace | | "" | +| Parameter | Description | Default | +|---------------------------------|--------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| nameOverride | Overrides name template | "" | +| fullnameOverride | Overrides fullname template | "" | +| resources | List of resources for which dashboards will be applied | ["connectcluster","druid","elasticsearch","kafka","mariadb","mongodb","mysql","perconaxtradb","postgres","proxysql","redis","zookeeper","singlestore"] | +| dashboard.folderID | ID of Grafana folder where these dashboards will be applied | 0 | +| dashboard.overwrite | If true, dashboard with matching uid will be overwritten | true | +| dashboard.templatize.title | If true, datasource will be prefixed to dashboard name | false | +| dashboard.templatize.datasource | If true, datasource will be hardcoded in the dashboard | false | +| dashboard.alerts | | false | +| dashboard.replacements | | | +| grafana.name | Name of Grafana Appbinding where these dashboards are applied | "" | +| grafana.namespace | Namespace of Grafana Appbinding where these dashboards are applied | "" | +| grafana.version | | 8.0.7 | +| grafana.url | | "" | +| grafana.apikey | | "" | +| app.name | | "" | +| app.namespace | | "" | Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example: ```bash -$ helm upgrade -i kubedb-grafana-dashboards appscode/kubedb-grafana-dashboards -n kubeops --create-namespace --version=v2024.3.16 --set resources=["connectcluster","elasticsearch","kafka","mariadb","mongodb","mysql","perconaxtradb","postgres","proxysql","redis","zookeeper","singlestore"] +$ helm upgrade -i kubedb-grafana-dashboards appscode/kubedb-grafana-dashboards -n kubeops --create-namespace --version=v2024.3.16 --set resources=["connectcluster","druid","elasticsearch","kafka","mariadb","mongodb","mysql","perconaxtradb","postgres","proxysql","redis","zookeeper","singlestore"] ``` Alternatively, a YAML file that specifies the values for the parameters can be provided while diff --git a/charts/kubedb-grafana-dashboards/dashboards/druid/druid-database.json b/charts/kubedb-grafana-dashboards/dashboards/druid/druid-database.json new file mode 100644 index 000000000..ac302da8b --- /dev/null +++ b/charts/kubedb-grafana-dashboards/dashboards/druid/druid-database.json @@ -0,0 +1,1377 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} +{{- $alerts := (eq $.Values.dashboard.alerts true) -}} +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "${datasource}", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "KubeDB Managed Druid Grafana Dashboard that captures metrics emitted by Druid builtin prometheus exporter.", + "editable": true, + "gnetId": 12155, + "graphTooltip": 0, + "id": 31, + "iteration": 1711021226071, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 24, + "panels": [], + "title": "Druid Overview", + "type": "row" + }, + { + "datasource": "${datasource}", + "description": "Metric indicating the druid service is up.", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "from": "", + "id": 0, + "text": "UP", + "to": "", + "type": 1, + "value": "1" + }, + { + "from": "", + "id": 1, + "text": "Down", + "to": "", + "type": 1, + "value": "0" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + }, + { + "color": "dark-green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 48, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "min(druid_service_heartbeat{job=\"$app-stats\", namespace=\"$namespace\"})", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Druid Status", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Indicator of connection status. 1 for connected, 0 for disconnected. Emitted once per monitor period.", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "from": "", + "id": 0, + "text": "Connected", + "to": "", + "type": 1, + "value": "1" + }, + { + "from": "", + "id": 1, + "text": "Disconnected", + "to": "", + "type": 1, + "value": "0" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + }, + { + "color": "dark-green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 7, + "x": 6, + "y": 1 + }, + "id": 50, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "min(druid_zk_connected{job=\"$app-stats\", namespace=\"$namespace\"})", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }} , + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "ZooKeeper Connection", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Number of total datasources", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "white", + "value": null + }, + { + "color": "white", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 13, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "floor(count(count_values(\"dataSource\", druid_segment_size{job=\"$app-stats\", namespace=\"$namespace\"})))", + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Total Datasources", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Number of segments to load.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "white", + "value": null + }, + { + "color": "white", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 5, + "x": 19, + "y": 1 + }, + "id": 28, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "ceil(sum(druid_segment_loadqueue_count{job=\"$app-stats\", namespace=\"$namespace\"}))", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Unloaded Segments", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Number of task actions that were executed successfully during the emission period.", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "from": "", + "id": 0, + "text": "", + "to": "", + "type": 1, + "value": "" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "white", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 7, + "x": 0, + "y": 5 + }, + "id": 42, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "count_over_time(druid_task_success_count_created{job=\"$app-stats\", namespace=\"$namespace\"}[$__range])", + "interval": "", + "legendFormat": {{ `"{{task_status}}"` }}, + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Sucess Tasks", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Total size of used segments in all the data sources.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "white", + "value": null + }, + { + "color": "white", + "value": 80 + } + ] + }, + "unit": "MiB" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 9, + "x": 7, + "y": 5 + }, + "id": 5, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "sum(druid_segment_size{job=\"$app-stats\", namespace=\"$namespace\"}) / (1024 * 1024)", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Total Segment Size", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Size in bytes of segments to load.", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "from": "", + "id": 0, + "text": "test", + "to": "", + "type": 1, + "value": "#A" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "white", + "value": null + }, + { + "color": "white", + "value": 80 + } + ] + }, + "unit": "MiB" + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 5 + }, + "id": 30, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "sum(druid_segment_loadqueue_size{job=\"$app-stats\", namespace=\"$namespace\"}) / (1024 * 1024)", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Unloaded Segments Size", + "type": "stat" + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 35, + "panels": [], + "title": "JVM Overview", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "Used memory", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 10 + }, + "hiddenSeries": false, + "id": 32, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg(increase(druid_jvm_mem_used{job=\"$app-stats\", namespace=\"$namespace\"}[$__range])) by (pod)", + "interval": "", + "intervalFactor": 1, + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "JVM Memory Used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "Pool used", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 10 + }, + "hiddenSeries": false, + "id": 33, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg(increase(druid_jvm_pool_used{job=\"$app-stats\", namespace=\"$namespace\"}[$__range])) by (pod)", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "JVM Memory Pool", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "${datasource}", + "description": "Bufferpool count", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 19 + }, + "id": 46, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + }, + "tooltipOptions": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheusdata" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "druid_jvm_bufferpool_count{bufferpoolName=\"direct\", job=\"$app-stats\", namespace=\"$namespace\"}", + "hide": false, + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "range": true, + "refId": "E" + } + ], + "title": "JVM Bufferpool Count", + "type": "timeseries" + }, + { + "datasource": "${datasource}", + "description": "Count of CPU time in Nanoseconds spent on garbage collection.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 2750 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 52, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheusdata" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "druid_jvm_gc_cpu_total{job=\"$app-stats\", namespace=\"$namespace\"}", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "range": true, + "refId": "A" + } + ], + "title": "JVM GC Cpu Total", + "type": "gauge" + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 20, + "panels": [], + "title": "Druid Datasource Overview", + "type": "row" + }, + { + "datasource": "${datasource}", + "description": "Total size of used segments.", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "from": "", + "id": 0, + "text": "test", + "to": "", + "type": 1, + "value": "#A" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-blue", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 9, + "x": 0, + "y": 28 + }, + "id": 44, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "sum(druid_segment_size{job=\"$app-stats\", namespace=\"$namespace\"})", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Datasource Size", + "type": "stat" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 15, + "x": 9, + "y": 28 + }, + "hiddenSeries": false, + "id": 9, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(increase(druid_segment_size{job=\"$app-stats\", namespace=\"$namespace\"}[$__range])) by (dataSource)", + "interval": "", + "legendFormat": {{ `"{{dataSource}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Datasource Size", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "decbytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 40, + "panels": [], + "title": "Ingestion Overview", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "Number of events processed per emission period.", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 36 + }, + "hiddenSeries": false, + "id": 37, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 10, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(increase(druid_ingest_events_processed_total{job=\"$app-stats\", namespace=\"$namespace\"}[$__range])) by (dataSource)", + "interval": "", + "legendFormat": {{ `"{{host}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Ingestion Events", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "Total lag between the offsets consumed by the Kafka indexing tasks and latest offsets in Kafka brokers across all partitions. ", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 10, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 36 + }, + "hiddenSeries": false, + "id": 38, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 10, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(increase(druid_ingest_kafka_lag{job=\"$app-stats\", namespace=\"$namespace\"}[$__range]))", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Ingestion Lag", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": false, + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + } + {{- if not $alerts }} + , + { + "allValue": null, + "current": { + "selected": false, + "text": "druid", + "value": "druid" + }, + "datasource": "${datasource}", + "definition": "label_values(kube_namespace_created,namespace)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "", + "multi": false, + "name": "namespace", + "options": [], + {{- if $shared }} + "query": { + "query": "label_values(kube_namespace_created,namespace)", + "refId": "Prometheus-namespace-Variable-Query" + }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "druid-sample-stats", + "value": "druid-sample-stats" + }, + "datasource": "${datasource}", + "definition": "label_values(kubedb_com_druid_created{druid=~\".+\",namespace=~\"$namespace\"},app)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "app", + "options": [], + {{- if $shared }} + "query": { + "query": "label_values(kubedb_com_druid_created{druid=~\".+\",namespace=~\"$namespace\"},app)", + "refId": "StandardVariableQuery" + }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "useTags": false + } + {{- end }} + ] + }, + "time": { + "from": "now-5m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "", + {{- if $shared }} + "title": "KubeDB / Druid / Database", + {{- else }} + "title": {{ printf "KubeDB / Druid / Database / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} + "uid": "druidDatabase", + "version": 21 +} \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/druid/druid-pod.json b/charts/kubedb-grafana-dashboards/dashboards/druid/druid-pod.json new file mode 100644 index 000000000..e9291f9b8 --- /dev/null +++ b/charts/kubedb-grafana-dashboards/dashboards/druid/druid-pod.json @@ -0,0 +1,883 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "${datasource}", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": 30, + "iteration": 1711021229523, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "panels": [], + "title": "Druid Overview", + "type": "row" + }, + { + "datasource": "${datasource}", + "description": "Metric indicating the druid pod is up.", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "from": "", + "id": 0, + "text": "UP", + "to": "", + "type": 1, + "value": "1" + }, + { + "from": "", + "id": 1, + "text": "Down", + "to": "", + "type": 1, + "value": "0" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + }, + { + "color": "dark-green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 4, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "druid_service_heartbeat{job=\"$app-stats\", namespace=\"$namespace\", pod=\"$pod\", namespace=\"$namespace\"}", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "$pod - Status", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Indicator of connection status. 1 for connected, 0 for disconnected. Emitted once per monitor period.", + "fieldConfig": { + "defaults": { + "mappings": [ + { + "from": "", + "id": 0, + "text": "Connected", + "to": "", + "type": 1, + "value": "1" + }, + { + "from": "", + "id": 1, + "text": "Disconnected", + "to": "", + "type": 1, + "value": "0" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + }, + { + "color": "dark-green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "druid_zk_connected{job=\"$app-stats\", pod=\"$pod\", namespace=\"$namespace\"}", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "$pod - ZooKeeper Connection", + "type": "stat" + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 5 + }, + "id": 12, + "panels": [], + "title": "JVM Overview", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "Used memory", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 6 + }, + "hiddenSeries": false, + "id": 10, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg(increase(druid_jvm_mem_used{job=\"$app-stats\", pod=\"$pod\", namespace=\"$namespace\"}[$__range])) by (pod)", + "interval": "", + "intervalFactor": 1, + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "JVM Memory Used", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "Pool used", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 6 + }, + "hiddenSeries": false, + "id": 14, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg(increase(druid_jvm_pool_used{job=\"$app-stats\", pod=\"$pod\", namespace=\"$namespace\"}[$__range])) by (pod)", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "JVM Memory Pool", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "${datasource}", + "description": "Bufferpool count", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 15 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + }, + "tooltipOptions": { + "mode": "single" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheusdata" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "druid_jvm_bufferpool_count{bufferpoolName=\"direct\", job=\"$app-stats\", pod=\"$pod\", namespace=\"$namespace\"}", + "hide": false, + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "range": true, + "refId": "E" + } + ], + "title": "JVM Bufferpool Count", + "type": "timeseries" + }, + { + "datasource": "${datasource}", + "description": "Count of CPU time in Nanoseconds spent on garbage collection.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 2750 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 15 + }, + "id": 18, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true, + "text": {} + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheusdata" + }, + "editorMode": "builder", + "exemplar": true, + "expr": "druid_jvm_gc_cpu_total{job=\"$app-stats\", pod=\"$pod\", namespace=\"$namespace\"}", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "range": true, + "refId": "A" + } + ], + "title": "JVM GC Cpu Total", + "type": "gauge" + }, + { + "datasource": "${datasource}", + "description": "Initial nonHeap memory", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "white", + "value": null + }, + { + "color": "white", + "value": 80 + } + ] + }, + "unit": "MiB" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 23 + }, + "id": 22, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "druid_jvm_mem_init{job=\"$app-stats\", pod=\"$pod\", memKind=\"nonheap\", namespace=\"$namespace\"}/ (1024 * 1024)", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Initial Memory (nonHeap)", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Initial Heap memory", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "white", + "value": null + }, + { + "color": "white", + "value": 80 + } + ] + }, + "unit": "MiB" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 7, + "x": 8, + "y": 23 + }, + "id": 20, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "druid_jvm_mem_init{job=\"$app-stats\", pod=\"$pod\", memKind=\"heap\", namespace=\"$namespace\"}/ (1024 * 1024)", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Initial Memory (Heap)", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Max memory", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "white", + "value": null + }, + { + "color": "white", + "value": 80 + } + ] + }, + "unit": "MiB" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 9, + "x": 15, + "y": 23 + }, + "id": 24, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "druid_jvm_mem_max{job=\"$app-stats\", pod=\"$pod\", memKind=\"heap\", namespace=\"$namespace\"}/ (1024 * 1024)", + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Max Memory (Heap)", + "type": "stat" + } + ], + "refresh": false, + "schemaVersion": 27, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "druid", + "value": "druid" + }, + "datasource": "${datasource}", + "definition": "label_values(kube_namespace_created,namespace)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "", + "multi": false, + "name": "namespace", + "options": [], + {{- if $shared }} + "query": { + "query": "label_values(kube_namespace_created,namespace)", + "refId": "Prometheus-namespace-Variable-Query" + }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "druid-sample-stats", + "value": "druid-sample-stats" + }, + "datasource": "${datasource}", + "definition": "label_values(kubedb_com_druid_status_phase{namespace=~\"$namespace\"},app)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": null, + "multi": false, + "name": "app", + "options": [], + {{- if $shared }} + "query": { + "query": "label_values(kubedb_com_druid_status_phase{namespace=~\"$namespace\"},app)", + "refId": "StandardVariableQuery" + }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "druid-sample-coordinators-0", + "value": "druid-sample-coordinators-0" + }, + "datasource": "${datasource}", + "definition": "label_values(druid_service_heartbeat{namespace=~\"$namespace\",job=~\"${app}.*\"},pod)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "pod", + "multi": false, + "name": "pod", + "options": [], + "query": { + "query": "label_values(druid_service_heartbeat{namespace=~\"$namespace\",job=~\"${app}.*\"},pod)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + {{- if $shared }} + "title": "KubeDB / Druid / Pod", + {{- else }} + "title": {{ printf "KubeDB / Druid / Pod / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} + "uid": "5WZ_XCASk", + "version": 38 +} \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/dashboards/druid/druid-summary.json b/charts/kubedb-grafana-dashboards/dashboards/druid/druid-summary.json new file mode 100644 index 000000000..e20c70641 --- /dev/null +++ b/charts/kubedb-grafana-dashboards/dashboards/druid/druid-summary.json @@ -0,0 +1,2975 @@ +{{- $shared := and (eq .Values.app.name "") (eq .Values.app.namespace "") -}} +{{- $alerts := (eq $.Values.dashboard.alerts true) -}} +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "${datasource}", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "description": "The dashboard is designed for KubeDB managed Druid", + "editable": true, + "gnetId": 9628, + "graphTooltip": 0, + "id": 33, + "iteration": 1711100483854, + "links": [], + "panels": [ + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 136, + "panels": [], + "title": "General Info", + "type": "row" + }, + { + "datasource": "${datasource}", + "description": "Represent database status", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [ + { + "options": { + "Critical": { + "color": "dark-yellow", + "index": 1 + }, + "DataRestoring": { + "color": "dark-red", + "index": 4 + }, + "Halted": { + "color": "dark-red", + "index": 5 + }, + "NotReady": { + "color": "dark-red", + "index": 2 + }, + "Provisioning": { + "color": "text", + "index": 3 + }, + "Ready": { + "color": "semi-dark-green", + "index": 0 + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 0, + "y": 1 + }, + "id": 78, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^phase$/", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_status_phase{namespace=\"$namespace\", app=\"$app\"} == 1\n", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": {{ `"{{phase}}"` }}, + "refId": "A" + } + ], + "title": "Database Status", + "type": "stat" + }, + { + "cacheTimeout": null, + "datasource": "${datasource}", + "description": "Druid CR Name", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "palette-classic" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "index": 0, + "text": "N/A" + } + }, + "type": "special" + } + ], + "noValue": "N/A", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 8, + "y": 1 + }, + "id": 36, + "interval": null, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "text": { + "valueSize": 50 + }, + "textMode": "name" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_info{namespace=\"$namespace\", app=\"$app\"}", + "format": "time_series", + "instant": true, + "interval": "", + "intervalFactor": 1, + "legendFormat": {{ `"{{version}}"` }}, + "refId": "A" + } + ], + "title": "Version", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "When this option is enabled, connections attempted using insecure transport will be rejected.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "from": "", + "id": 1, + "text": "True", + "to": "", + "type": 1, + "value": "1" + }, + { + "from": "", + "id": 2, + "text": "False", + "to": "", + "type": 1, + "value": "0" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 1 + }, + "id": 82, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_info{namespace=\"$namespace\", app=\"$app\"}", + "format": "time_series", + "instant": true, + "interval": "", + "legendFormat": {{ `"{{requireSSL}}"` }}, + "refId": "A" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Require Secure Transport", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "KubeDB Database Resource terminationPolicy", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [ + { + "options": { + "Delete": { + "color": "yellow", + "index": 1 + }, + "DoNotTerminate": { + "color": "green", + "index": 2 + }, + "Halt": { + "color": "blue", + "index": 3 + }, + "WipeOut": { + "color": "dark-red", + "index": 0 + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 1 + }, + "id": 84, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^terminationPolicy$/", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_info{namespace=\"$namespace\", app=\"$app\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": {{ `"{{terminationPolicy}}"` }}, + "refId": "A" + } + ], + "title": "Termination Policy", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Total node count of Druid cluster", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 4 + }, + "id": 76, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_replicas{namespace=\"$namespace\",app=\"$app\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total Nodes", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Initial Requested CPU amount by Druid Instance", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 4 + }, + "id": 92, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_resource_request_cpu{namespace=\"$namespace\", app=\"$app\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Request (Core)", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "CPU Limit in core by Druid instance", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 4 + }, + "id": 114, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_resource_limit_cpu{namespace=\"$namespace\", app=\"$app\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Limit (Core)", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Initial Requested Memory amount by Druid Instance", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 4 + }, + "id": 94, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_resource_request_memory{namespace=\"$namespace\", app=\"$app\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Memory Request", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "KubeDB Druid Total Memory Limit", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 4 + }, + "id": 116, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_resource_limit_memory{namespace=\"$namespace\", app=\"$app\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Memory Limit", + "type": "stat" + }, + { + "datasource": "${datasource}", + "description": "Total storage request by Druid nodes", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 4 + }, + "id": 96, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubedb_com_druid_resource_request_storage{namespace=\"$namespace\", app=\"$app\"}", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Storage Request", + "type": "stat" + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 7 + }, + "id": 138, + "panels": [], + "title": "CPU Info", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "CPU Usage by Druid pods", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 8 + }, + "hiddenSeries": false, + "id": 98, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(sum by (namespace, pod, container) (irate(container_cpu_usage_seconds_total{image!=\"\",job=\"kubelet\",metrics_path=\"/metrics/cadvisor\",namespace=\"$namespace\", pod=~\"$app-.+$\"}[5m])) * on (namespace, pod) group_left (node) topk by (namespace, pod) (1, max by (namespace, pod, node) (kube_pod_info{node!=\"\",namespace=\"$namespace\", pod=~\"$app-.+$\"}))) by (pod)", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "CPU Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "${datasource}", + "description": "CPU Quote information in details", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "decimals": 2, + "displayName": "", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "displayName", + "value": "Time" + }, + { + "id": "custom.align", + "value": null + }, + { + "id": "custom.width", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #A" + }, + "properties": [ + { + "id": "displayName", + "value": "CPU Usage" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #B" + }, + "properties": [ + { + "id": "displayName", + "value": "CPU Requests" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #C" + }, + "properties": [ + { + "id": "displayName", + "value": "CPU Requests %" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #D" + }, + "properties": [ + { + "id": "displayName", + "value": "CPU Limits" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #E" + }, + "properties": [ + { + "id": "displayName", + "value": "CPU Limits %" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "pod" + }, + "properties": [ + { + "id": "displayName", + "value": "Pod" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": false, + "title": "Drill down", + "url": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell" + } + ] + }, + { + "id": "custom.align", + "value": null + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 15 + }, + "id": 122, + "links": [], + "options": { + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "sum(sum by (namespace, pod, container) (irate(container_cpu_usage_seconds_total{image!=\"\",job=\"kubelet\",metrics_path=\"/metrics/cadvisor\",namespace=\"$namespace\", pod=~\"$app-.+$\"}[5m])) * on (namespace, pod) group_left (node) topk by (namespace, pod) (1, max by (namespace, pod, node) (kube_pod_info{node!=\"\",namespace=\"$namespace\", pod=~\"$app-.+$\"}))) by (pod) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\",resource=\"cpu\",namespace=\"$namespace\", pod=~\"$app-.+$\"} * on (namespace,pod) group_left () max by (namespace,pod) ((kube_pod_status_phase{phase=~\"Pending|Running\"} == 1))) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\",resource=\"cpu\",namespace=\"$namespace\", pod=~\"$app-.+$\"} * on (namespace,pod) group_left () max by (namespace,pod) ((kube_pod_status_phase{phase=~\"Pending|Running\"} == 1))) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(sum by (namespace, pod, container) (irate(container_cpu_usage_seconds_total{image!=\"\",job=\"kubelet\",metrics_path=\"/metrics/cadvisor\",namespace=\"$namespace\", pod=~\"$app-.+$\"}[5m])) * on (namespace, pod) group_left (node) topk by (namespace, pod) (1, max by (namespace, pod, node) (kube_pod_info{node!=\"\",namespace=\"$namespace\", pod=~\"$app-.+$\"}))) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\",resource=\"cpu\",namespace=\"$namespace\", pod=~\"$app-.+$\"} * on (namespace,pod) group_left() max by (namespace, pod) ((kube_pod_status_phase{phase=~\"Pending|Running\"} == 1))) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(sum by (namespace, pod, container) (irate(container_cpu_usage_seconds_total{image!=\"\",job=\"kubelet\",metrics_path=\"/metrics/cadvisor\",namespace=\"$namespace\", pod=~\"$app-.+$\"}[5m])) * on (namespace, pod) group_left (node) topk by (namespace, pod) (1, max by (namespace, pod, node) (kube_pod_info{node!=\"\",namespace=\"$namespace\", pod=~\"$app-.+$\"}))) by (pod) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\",resource=\"cpu\",namespace=\"$namespace\", pod=~\"$app-.+$\"} * on (namespace,pod) group_left() max by (namespace, pod) ((kube_pod_status_phase{phase=~\"Pending|Running\"} == 1))) by (pod)", + "format": "table", + "hide": false, + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "CPU Quota", + "transformations": [ + { + "id": "merge", + "options": { + "reducers": [] + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 140, + "panels": [], + "title": "Memory Info", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "Memory Usage by Druid pods", + "fieldConfig": { + "defaults": { + "unit": "bytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 22 + }, + "hiddenSeries": false, + "id": 100, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{image!=\"\",job=\"kubelet\",metrics_path=\"/metrics/cadvisor\",namespace=\"$namespace\", pod=~\"$app-.+$\",container!=\"\"} * on (namespace, pod) group_left (node) topk by (namespace, pod) (1, max by (namespace, pod, node) (kube_pod_info{node!=\"\"}))) by (pod)", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Memory Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "decimals": 2, + "displayName": "", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "displayName", + "value": "Time" + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #A" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory Usage" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #B" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory Requests" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #C" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory Requests %" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #D" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory Limits" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #E" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory Limits %" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #F" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory Usage (RSS)" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #G" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory Usage (Cache)" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #H" + }, + "properties": [ + { + "id": "displayName", + "value": "Memory Usage (Swap)" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "pod" + }, + "properties": [ + { + "id": "displayName", + "value": "Pod" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": false, + "title": "Drill down", + "url": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell" + } + ] + }, + { + "id": "custom.align", + "value": null + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 124, + "links": [], + "options": { + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Memory Usage" + } + ] + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\",container!=\"\", image!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum (kube_pod_container_resource_requests{job=\"kube-state-metrics\",resource=\"memory\",namespace=\"$namespace\",pod=~\"$app-.+$\"} * on (namespace, pod, cluster) group_left () max by (namespace, pod, cluster) ((kube_pod_status_phase{phase=~\"Pending|Running\"} == 1))) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",pod=~\"$app-.+$\",container!=\"\", image!=\"\"}) by (pod) / sum(kube_pod_container_resource_requests{job=\"kube-state-metrics\",resource=\"memory\",namespace=\"$namespace\",pod=~\"$app-.+$\"} * on (namespace, pod, cluster) group_left () max by (namespace, pod, cluster) ((kube_pod_status_phase{phase=~\"Pending|Running\"} == 1))) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\",resource=\"memory\",namespace=\"$namespace\",pod=~\"$app-.+$\"} * on (namespace, pod, cluster) group_left () max by (namespace, pod, cluster) ((kube_pod_status_phase{phase=~\"Pending|Running\"} == 1))) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(container_memory_working_set_bytes{namespace=\"$namespace\",pod=~\"$app-.+$\",container!=\"\", image!=\"\"}) by (pod) / sum(kube_pod_container_resource_limits{job=\"kube-state-metrics\",resource=\"memory\",namespace=\"$namespace\",pod=~\"$app-.+$\"} * on (namespace, pod, cluster) group_left () max by (namespace, pod, cluster) ((kube_pod_status_phase{phase=~\"Pending|Running\"} == 1))) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(container_memory_rss{namespace=\"$namespace\",pod=~\"$app-.+$\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(container_memory_cache{namespace=\"$namespace\",pod=~\"$app-.+$\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "G", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum(container_memory_swap{namespace=\"$namespace\",pod=~\"$app-.+$\",container!=\"\"}) by (pod)", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "H", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Memory Quota", + "transformations": [ + { + "id": "merge", + "options": { + "reducers": [] + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 142, + "panels": [], + "title": "Storage Info", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "Disk usage by Druid pods", + "fieldConfig": { + "defaults": { + "unit": "bytes" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 35 + }, + "hiddenSeries": false, + "id": 112, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "avg(container_blkio_device_usage_total{namespace=\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}) by (pod)", + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk Usage", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "bytes", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "description": "System Disk Usage Information", + "fieldConfig": { + "defaults": { + "unit": "none" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 35 + }, + "hiddenSeries": false, + "id": 108, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "alertThreshold": true + }, + "percentage": false, + "pluginVersion": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(rate(container_fs_writes_total{namespace=\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}[5m]))by(pod)", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": {{ `"{{pod}}-disk-write"` }}, + "refId": "A" + }, + { + "exemplar": true, + "expr": "sum(rate(container_fs_reads_total{namespace=\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}[5m]))by(pod)", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": {{ `"{{pod}}-disk-write"` }}, + "refId": "B" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Disk R/W Info", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "none", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "unit": "short" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 44 + }, + "hiddenSeries": false, + "id": 126, + "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": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "ceil(sum by(pod) (rate(container_fs_reads_total{container!=\"\", namespace=~\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}[5m]) + rate(container_fs_writes_total{container!=\"\" ,namespace=~\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}[5m])))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": {{ `"{{pod}}"` }}, + "legendLink": null, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "IOPS (Reads+Writes)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "unit": "Bps" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 44 + }, + "hiddenSeries": false, + "id": 128, + "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": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", namespace=~\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\" ,namespace=~\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}[5m]))", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": {{ `"{{pod}}"` }}, + "legendLink": null, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "ThroughPut (Read+Write)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": null, + "displayMode": "auto", + "filterable": false + }, + "decimals": 2, + "displayName": "", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "displayName", + "value": "Time" + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #A" + }, + "properties": [ + { + "id": "displayName", + "value": "IOPS(Reads)" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": -1 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #B" + }, + "properties": [ + { + "id": "displayName", + "value": "IOPS(Writes)" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": -1 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #C" + }, + "properties": [ + { + "id": "displayName", + "value": "IOPS(Reads + Writes)" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": -1 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #D" + }, + "properties": [ + { + "id": "displayName", + "value": "Throughput(Read)" + }, + { + "id": "unit", + "value": "Bps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #E" + }, + "properties": [ + { + "id": "displayName", + "value": "Throughput(Write)" + }, + { + "id": "unit", + "value": "Bps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value #F" + }, + "properties": [ + { + "id": "displayName", + "value": "Throughput(Read + Write)" + }, + { + "id": "unit", + "value": "Bps" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "custom.align", + "value": null + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "pod" + }, + "properties": [ + { + "id": "displayName", + "value": "Pod" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "links", + "value": [ + { + "targetBlank": false, + "title": "Drill down to pods", + "url": "./d/6581e46e4e5c7ba40a07646395ef7b23/k8s-resources-pod?var-datasource=$datasource&var-cluster=$cluster&var-namespace=$namespace&var-pod=$__cell" + } + ] + }, + { + "id": "custom.align", + "value": null + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 51 + }, + "id": 130, + "links": [], + "options": { + "showHeader": true + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\",namespace=~\"$namespace\"}[5m]))", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "A", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum by(pod) (rate(container_fs_writes_total{container!=\"\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\",namespace=~\"$namespace\"}[5m]))", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "B", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum by(pod) (rate(container_fs_reads_total{container!=\"\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_total{container!=\"\",pod=~\"$app-\\\\d+$\",namespace=~\"$namespace\"}[5m]))", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "C", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\",namespace=~\"$namespace\"}[5m]))", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "D", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum by(pod) (rate(container_fs_writes_bytes_total{container!=\"\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\",namespace=~\"$namespace\"}[5m]))", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "E", + "step": 10 + }, + { + "exemplar": true, + "expr": "sum by(pod) (rate(container_fs_reads_bytes_total{container!=\"\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\",namespace=~\"$namespace\"}[5m]) + rate(container_fs_writes_bytes_total{container!=\"\",pod=~\"$app-\\\\d+$\",namespace=~\"$namespace\"}[5m]))", + "format": "table", + "instant": true, + "interval": "", + "intervalFactor": 2, + "legendFormat": "", + "refId": "F", + "step": 10 + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Current Storage IO", + "transformations": [ + { + "id": "merge", + "options": { + "reducers": [] + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 58 + }, + "id": 152, + "panels": [], + "title": "Persistent Storage Insight", + "type": "row" + }, + { + "datasource": "${datasource}", + "description": "This panel describes allocated persistent storage in a table format\n", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "light-blue", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 59 + }, + "id": 148, + "options": { + "showHeader": true + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}", + "format": "table", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Allocated Storage", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "endpoint": true, + "instance": true, + "job": true, + "metrics_path": true, + "namespace": true, + "node": true, + "persistentvolumeclaim": true, + "service": true + }, + "indexByName": {}, + "renameByName": { + "Value": "Volume", + "pod": "Pod" + } + } + } + ], + "type": "table" + }, + { + "datasource": "${datasource}", + "description": "This panel shows the persistent volume usage in percentage. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 59 + }, + "id": 146, + "options": { + "displayMode": "gradient", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "(kubelet_volume_stats_used_bytes / on(persistentvolumeclaim) group_left(pod) (kubelet_volume_stats_capacity_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) )* 100", + "instant": true, + "interval": "", + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "title": "Persistent Volume Usage", + "transformations": [], + "type": "bargauge" + }, + { + "datasource": "${datasource}", + "description": "This panel describes the persistent volume usage in a time series. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMax": 5000, + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "opacity", + "hideFrom": { + "graph": false, + "legend": false, + "tooltip": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 65 + }, + "id": 150, + "options": { + "graph": {}, + "legend": { + "calcs": [ + "max", + "lastNotNull" + ], + "displayMode": "table", + "placement": "right" + }, + "tooltipOptions": { + "mode": "single" + } + }, + "pluginVersion": "7.5.5", + "targets": [ + { + "exemplar": true, + "expr": "(kubelet_volume_stats_used_bytes + on(persistentvolumeclaim) group_left(pod) kube_pod_spec_volumes_persistentvolumeclaims_info{pod=~\"^$app.*\",namespace=~\"$namespace\"}) ", + "interval": "", + "intervalFactor": 1, + "legendFormat": {{ `"{{pod}}"` }}, + "refId": "A" + } + ], + "title": "Persistent Volume Usage History", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": "${datasource}", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 73 + }, + "id": 144, + "panels": [], + "title": "Network Info", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 74 + }, + "hiddenSeries": false, + "id": 132, + "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": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(irate(container_network_receive_bytes_total{namespace=~\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": {{ `"{{pod}}"` }}, + "legendLink": null, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Receive Bandwidth", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "${datasource}", + "fieldConfig": { + "defaults": { + "unit": "Bps" + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 74 + }, + "hiddenSeries": false, + "id": 134, + "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": "7.5.5", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "exemplar": true, + "expr": "sum(irate(container_network_transmit_bytes_total{namespace=~\"$namespace\", pod=~\"$app-brokers-\\\\d+$|$app-coordinators-\\\\d+$|$app-historicals-\\\\d+$|$app-middlemanagers-\\\\d+$|$app-routers-\\\\d+$|$app-overlords-\\\\d+$\"}[$__rate_interval])) by (pod)", + "format": "time_series", + "interval": "", + "intervalFactor": 2, + "legendFormat": {{ `"{{pod}}"` }}, + "legendLink": null, + "refId": "A", + "step": 10 + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Transmit Bandwidth", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "Bps", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "10s", + "schemaVersion": 27, + "style": "dark", + "tags": [ + "db", + "stats", + "kubedb", + "druid" + ], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": "\".+\"", + "current": { + "selected": false, + "text": "druid", + "value": "druid" + }, + "datasource": "${datasource}", + "definition": "label_values(kube_namespace_created,namespace)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Namespace", + "multi": false, + "name": "namespace", + "options": [], + {{- if $shared }} + "query": { + "query": "label_values(kube_namespace_created,namespace)", + "refId": "Prometheus-namespace-Variable-Query" + }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.namespace | quote }}, + "type": "constant", + {{- end }} + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "useTags": false + }, + { + "allValue": null, + "current": { + "selected": false, + "text": "druid-sample", + "value": "druid-sample" + }, + "datasource": "${datasource}", + "definition": "label_values(kubedb_com_druid_status_phase{namespace=~\"$namespace\"},app)", + "description": null, + "error": null, + "hide": 0, + "includeAll": false, + "label": "Druid", + "multi": false, + "name": "app", + "options": [], + {{- if $shared }} + "query": { + "query": "label_values(kubedb_com_druid_status_phase{namespace=~\"$namespace\"},app)", + "refId": "Prometheus-app-Variable-Query" + }, + "type": "query", + {{- else }} + "query": {{ $.Values.app.name | quote }}, + "type": "constant", + {{- end }} + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "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": "", + {{- if $shared }} + "title": "KubeDB / Druid / Summary", + {{- else }} + "title": {{ printf "KubeDB / Druid / Summary / %s / %s" $.Values.app.namespace $.Values.app.name | quote }}, + {{- end }} + "uid": "druidSummary", + "version": 7 +} \ No newline at end of file diff --git a/charts/kubedb-grafana-dashboards/data/resources.yaml b/charts/kubedb-grafana-dashboards/data/resources.yaml index 8460aa70a..080920acb 100644 --- a/charts/kubedb-grafana-dashboards/data/resources.yaml +++ b/charts/kubedb-grafana-dashboards/data/resources.yaml @@ -1,6 +1,9 @@ connectcluster: kind: ConnectCluster resource: connectclusters +druid: + kind: Druid + resource: druids elasticsearch: kind: Elasticsearch resource: elasticsearches diff --git a/charts/kubedb-grafana-dashboards/values.yaml b/charts/kubedb-grafana-dashboards/values.yaml index cc3356bbe..cf643d045 100644 --- a/charts/kubedb-grafana-dashboards/values.yaml +++ b/charts/kubedb-grafana-dashboards/values.yaml @@ -10,6 +10,7 @@ fullnameOverride: "" # List of resources for which dashboards will be applied resources: # +doc-gen:break - connectcluster + - druid - elasticsearch - kafka - mariadb diff --git a/charts/kubedb-metrics/templates/druid/catalog-kubedb-com-druidversion.yaml b/charts/kubedb-metrics/templates/druid/catalog-kubedb-com-druidversion.yaml new file mode 100644 index 000000000..5f5f14479 --- /dev/null +++ b/charts/kubedb-metrics/templates/druid/catalog-kubedb-com-druidversion.yaml @@ -0,0 +1,28 @@ +apiVersion: metrics.appscode.com/v1alpha1 +kind: MetricsConfiguration +metadata: + name: catalog-kubedb-com-druidversion +spec: + targetRef: + apiVersion: catalog.kubedb.com/v1alpha1 + kind: DruidVersion + metrics: + - name: created + help: "Unix creation timestamp" + type: gauge + field: + path: .metadata.creationTimestamp + type: DateTime + metricValue: + valueFromPath: .metadata.creationTimestamp + + - name: info + help: "Druid versions info" + type: gauge + labels: + - key: db_image + valuePath: .spec.db.image + - key: deprecated + valuePath: .spec.deprecated + metricValue: + value: 1 diff --git a/charts/kubedb-metrics/templates/druid/kubedb-com-druid.yaml b/charts/kubedb-metrics/templates/druid/kubedb-com-druid.yaml new file mode 100644 index 000000000..e48b61edd --- /dev/null +++ b/charts/kubedb-metrics/templates/druid/kubedb-com-druid.yaml @@ -0,0 +1,294 @@ +apiVersion: metrics.appscode.com/v1alpha1 +kind: MetricsConfiguration +metadata: + name: kubedb-com-druid +spec: + targetRef: + apiVersion: kubedb.com/v1alpha2 + kind: Druid + commonLabels: + - key: app + valuePath: .metadata.name + - key: app_namespace + valuePath: .metadata.namespace + metrics: + - name: created + help: "Unix creation time stamp" + type: gauge + field: + path: .metadata.creationTimestamp + type: DateTime + metricValue: + valueFromPath: .metadata.creationTimestamp + + - name: replicas + help: "Number of replicas of druid instance" + type: gauge + params: + - key: obj + valuePath: . + metricValue: + valueFromExpression: resource_replicas(obj) + + - name: status_phase + help: "Druid instance current phase" + type: gauge + field: + path: .status.phase + type: String + params: + - key: phase + valuePath: .status.phase + states: + labelKey: phase + values: + - labelValue: Ready + metricValue: + valueFromExpression: "int(phase == 'Ready')" + - labelValue: Halted + metricValue: + valueFromExpression: "int(phase == 'Halted')" + - labelValue: Provisioning + metricValue: + valueFromExpression: "int(phase == 'Provisioning')" + - labelValue: Critical + metricValue: + valueFromExpression: "int(phase == 'Critical')" + - labelValue: NotReady + metricValue: + valueFromExpression: "int(phase == 'NotReady')" + - labelValue: DataRestoring + metricValue: + valueFromExpression: "int(phase == 'DataRestoring')" + + - name: info + help: "Druid instance information" + type: gauge + labels: + - key: version + valuePath: .spec.version + - key: storageType + valuePath: .spec.storageType + - key: terminationPolicy + valuePath: .spec.terminationPolicy + metricValue: + value: 1 + + - name: status_conditions + help: "Druid instance status condition" + type: gauge + field: + path: .status.conditions + type: Array + labels: + - key: type + valuePath: .status.conditions[*].type + - key: status + valuePath: .status.conditions[*].status + metricValue: + value: 1 + + - name: resource_request_cpu + help: "Requested CPU by Druid in core" + type: gauge + labels: + - key: unit + value: core + params: + - key: obj + valuePath: . + - key: resourceType + value: cpu + metricValue: + valueFromExpression: total_resource_requests(obj, resourceType) + + - name: resource_request_memory + help: "Requested memory by Druid in byte" + type: gauge + labels: + - key: unit + value: byte + params: + - key: obj + valuePath: . + - key: resourceType + value: memory + metricValue: + valueFromExpression: total_resource_requests(obj, resourceType) + + - name: resource_request_storage + help: "Requested storage by Druid in byte" + type: gauge + labels: + - key: unit + value: byte + params: + - key: obj + valuePath: . + - key: resourceType + value: storage + metricValue: + valueFromExpression: total_resource_requests(obj, resourceType) + + - name: resource_limit_cpu + help: "CPU limit for Druid in core" + type: gauge + labels: + - key: unit + value: core + params: + - key: obj + valuePath: . + - key: resourceType + value: cpu + metricValue: + valueFromExpression: total_resource_limits(obj, resourceType) + + - name: resource_limit_memory + help: "Memory limit for Druid in byte" + type: gauge + labels: + - key: unit + value: byte + params: + - key: obj + valuePath: . + - key: resourceType + value: memory + metricValue: + valueFromExpression: total_resource_limits(obj, resourceType) + + - name: resource_limit_storage + help: "Storage limit for Druid in byte" + type: gauge + labels: + - key: unit + value: byte + params: + - key: obj + valuePath: . + - key: resourceType + value: storage + metricValue: + valueFromExpression: total_resource_limits(obj, resourceType) + + ### Metrics for coordinators topology ### + + - name: coordinators_node_replicas + help: "Number of replicas for druid coordinators node" + type: gauge + field: + path: .spec.topology.coordinators.replicas + type: Integer + metricValue: + valueFromPath: .spec.topology.coordinators.replicas + + - name: coordinators_node_storage_class_info + help: "Solr overseer node storage class information" + type: gauge + labels: + - key: storage_className + valuePath: .spec.topology.coordinators.storage.storageClassName + metricValue: + value: 1 + + ### Metrics for overlords topology ### + + - name: overlords_node_replicas + help: "Number of replicas for druid overlords node" + type: gauge + field: + path: .spec.topology.overlords.replicas + type: Integer + metricValue: + valueFromPath: .spec.topology.overlords.replicas + + - name: overlords_node_storage_class_info + help: "Solr overseer node storage class information" + type: gauge + labels: + - key: storage_className + valuePath: .spec.topology.overlords.storage.storageClassName + metricValue: + value: 1 + + ### Metrics for historicals topology ### + + - name: historicals_node_replicas + help: "Number of replicas for druid historicals node" + type: gauge + field: + path: .spec.topology.historicals.replicas + type: Integer + metricValue: + valueFromPath: .spec.topology.historicals.replicas + + - name: historicals_node_storage_class_info + help: "Solr overseer node storage class information" + type: gauge + labels: + - key: storage_className + valuePath: .spec.topology.historicals.storage.storageClassName + metricValue: + value: 1 + + ### Metrics for middleManagers topology ### + + - name: middlemanagers_node_replicas + help: "Number of replicas for druid middleManagers node" + type: gauge + field: + path: .spec.topology.middleManagers.replicas + type: Integer + metricValue: + valueFromPath: .spec.topology.middleManagers.replicas + + - name: middleManagers_node_storage_class_info + help: "Solr overseer node storage class information" + type: gauge + labels: + - key: storage_className + valuePath: .spec.topology.middleManagers.storage.storageClassName + metricValue: + value: 1 + + ### Metrics for brokers topology ### + + - name: brokers_node_replicas + help: "Number of replicas for druid brokers node" + type: gauge + field: + path: .spec.topology.brokers.replicas + type: Integer + metricValue: + valueFromPath: .spec.topology.brokers.replicas + + - name: brokers_node_storage_class_info + help: "Solr overseer node storage class information" + type: gauge + labels: + - key: storage_className + valuePath: .spec.topology.brokers.storage.storageClassName + metricValue: + value: 1 + + ### Metrics for routers topology ### + + - name: routers_node_replicas + help: "Number of replicas for druid routers node" + type: gauge + field: + path: .spec.topology.routers.replicas + type: Integer + metricValue: + valueFromPath: .spec.topology.routers.replicas + + - name: routers_node_storage_class_info + help: "Solr overseer node storage class information" + type: gauge + labels: + - key: storage_className + valuePath: .spec.topology.routers.storage.storageClassName + metricValue: + value: 1 +