diff --git a/assets/grafana/grafana-datasource.yaml b/assets/grafana/grafana-datasource.yaml index 472fb4f3..21487b4a 100644 --- a/assets/grafana/grafana-datasource.yaml +++ b/assets/grafana/grafana-datasource.yaml @@ -46,3 +46,44 @@ version: 1 # allow users to edit datasources from the UI. editable: true + # name of the datasource. Required + - name: pxb-prometheus + # datasource type. Required + type: prometheus + # access mode. direct or proxy. Required + access: proxy + # org id. will default to orgId 1 if not specified + orgId: 1 + # url + url: http://px-backup-dashboard-prometheus.central.svc.cluster.local:9090 + # database password, if used + password: + # database user, if used + user: + # database name, if used + database: + # enable/disable basic auth + basicAuth: true + # basic auth username + basicAuthUser: admin + # basic auth password + basicAuthPassword: foobar + # enable/disable with credentials headers + withCredentials: + # mark as default datasource. Max one per org + isDefault: + # fields that will be converted to json and stored in json_data + jsonData: + graphiteVersion: "1.1" + tlsAuth: false + tlsAuthWithCACert: false + # json object of data that will be encrypted. + secureJsonData: + basicAuthPassword: "" + tlsCACert: "..." + tlsClientCert: "..." + tlsClientKey: "..." + version: 1 + # allow users to edit datasources from the UI. + editable: true + diff --git a/assets/grafana/grafana-ocp.yaml b/assets/grafana/grafana-ocp.yaml index e48cec50..4358baa5 100644 --- a/assets/grafana/grafana-ocp.yaml +++ b/assets/grafana/grafana-ocp.yaml @@ -49,6 +49,12 @@ spec: mountPath: /var/lib/grafana/dashboards - name: grafana-source-config mountPath: /etc/grafana/provisioning/datasources + env: + - name: GF_SECURITY_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: grafana-admin-secret + key: admin-password serviceAccountName: grafana volumes: - name: grafana-source-config diff --git a/assets/grafana/grafana.yaml b/assets/grafana/grafana.yaml index 6f5aefb3..37ef3b27 100644 --- a/assets/grafana/grafana.yaml +++ b/assets/grafana/grafana.yaml @@ -49,6 +49,12 @@ spec: mountPath: /var/lib/grafana/dashboards - name: grafana-source-config mountPath: /etc/grafana/provisioning/datasources + env: + - name: GF_SECURITY_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: grafana-admin-secret + key: admin-password volumes: - name: grafana-source-config configMap: diff --git a/assets/helm-backup/grafana-global-operations.json b/assets/helm-backup/grafana-global-operations.json new file mode 100644 index 00000000..6a61529b --- /dev/null +++ b/assets/helm-backup/grafana-global-operations.json @@ -0,0 +1,638 @@ +{ + "__inputs": [ + { + "name": "DS_PX-BACKUP", + "label": "px-backup", + "description": "Prometheus data source scraping Portworx Backup metrics", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "11.6.0" }, + { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" }, + { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, + { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" }, + { "type": "panel", "id": "table", "name": "Table", "version": "" }, + { "type": "panel", "id": "piechart", "name": "Pie chart", "version": "" }, + { "type": "panel", "id": "text", "name": "Text", "version": "" } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "datasource", "uid": "grafana" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Portworx Backup fleet and control-plane health: clusters, backup locations, operation trends, current backup/restore states, schedules, policies, rules and credentials.", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, + "id": 1, + "panels": [], + "title": "Cluster Health", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [ { "color": "blue" } ] }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 }, + "id": 100, + "options": { + "colorMode": "background", "graphMode": "none", "justifyMode": "auto", + "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, + "showPercentChange": false, "textMode": "auto", "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "expr": "count(pxbackup_cluster_status{user_id=~\"$UserID\"}) OR vector(0)", + "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Total Clusters", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 4, "y": 1 }, + "id": 101, + "options": { + "colorMode": "background", "graphMode": "none", "justifyMode": "auto", + "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, + "showPercentChange": false, "textMode": "auto", "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "expr": "count(pxbackup_cluster_status{user_id=~\"$UserID\"}==1) OR vector(0)", + "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Online", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 1 } ] }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 8, "y": 1 }, + "id": 102, + "options": { + "colorMode": "background", "graphMode": "none", "justifyMode": "auto", + "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, + "showPercentChange": false, "textMode": "auto", "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "expr": "count(pxbackup_cluster_status{user_id=~\"$UserID\"}==2) OR vector(0)", + "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Offline", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 1 } ] }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 12, "y": 1 }, + "id": 103, + "options": { + "colorMode": "background", "graphMode": "none", "justifyMode": "auto", + "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, + "showPercentChange": false, "textMode": "auto", "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "expr": "count(pxbackup_cluster_status{user_id=~\"$UserID\"}==5) OR vector(0)", + "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Failed", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "yellow", "value": 1 } ] }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 16, "y": 1 }, + "id": 104, + "options": { + "colorMode": "background", "graphMode": "none", "justifyMode": "auto", + "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, + "showPercentChange": false, "textMode": "auto", "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "expr": "count(pxbackup_cluster_status{user_id=~\"$UserID\"}==0) OR vector(0)", + "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Invalid", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Clusters not in the Online (1) state, with the reason reported by Portworx Backup.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { + "matcher": { "id": "byName", "options": "Status" }, + "properties": [ + { "id": "mappings", "value": [ + { "type": "value", "options": { + "0": { "text": "Invalid", "color": "red", "index": 0 }, + "2": { "text": "Offline", "color": "red", "index": 1 }, + "3": { "text": "DeletePending", "color": "orange", "index": 2 }, + "4": { "text": "Pending", "color": "yellow", "index": 3 }, + "5": { "text": "Failed", "color": "red", "index": 4 }, + "6": { "text": "Success", "color": "green", "index": 5 } + } } + ] }, + { "id": "custom.cellOptions", "value": { "type": "color-text" } } + ] + } + ] + }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 5 }, + "id": 105, + "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "expr": "pxbackup_cluster_status{user_id=~\"$UserID\"} != 1", + "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Unhealthy Clusters", + "transformations": [ + { "id": "organize", "options": { + "excludeByName": { "Time": true, "__name__": true, "org_id": true, "cluster_uid": true, "backfill": true, "timestamp_in_secs": true, "instance": true, "job": true }, + "renameByName": { "name": "Cluster", "user_id": "User", "error_reason": "Reason", "Value": "Status" } + } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 13 }, + "id": 2, + "panels": [], + "title": "Backup Location Health", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "blue" } ] }, "unit": "none" }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 0, "y": 14 }, + "id": 110, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_location_status{user_id=~\"$UserID\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Total Locations", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "none" }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 4, "y": 14 }, + "id": 111, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_location_status{user_id=~\"$UserID\"}==1) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Valid", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 1 } ] }, "unit": "none" }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 8, "y": 14 }, + "id": 112, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_location_status{user_id=~\"$UserID\"}==4) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Validation Failed", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { + "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "yellow", "value": 1 } ] }, "unit": "none" }, + "overrides": [] + }, + "gridPos": { "h": 4, "w": 4, "x": 12, "y": 14 }, + "id": 113, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_location_status{user_id=~\"$UserID\"}==5) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Limited Availability", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Backup locations not in the Valid (1) state.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { + "matcher": { "id": "byName", "options": "Status" }, + "properties": [ + { "id": "mappings", "value": [ + { "type": "value", "options": { + "0": { "text": "Invalid", "color": "red", "index": 0 }, + "2": { "text": "DeletePending", "color": "orange", "index": 1 }, + "3": { "text": "ValidationInProgress", "color": "yellow", "index": 2 }, + "4": { "text": "ValidationFailed", "color": "red", "index": 3 }, + "5": { "text": "LimitedAvailability", "color": "yellow", "index": 4 } + } } + ] }, + { "id": "custom.cellOptions", "value": { "type": "color-text" } } + ] + } + ] + }, + "gridPos": { "h": 7, "w": 24, "x": 0, "y": 18 }, + "id": 114, + "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_location_status{user_id=~\"$UserID\"} != 1", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Backup Locations Needing Attention", + "transformations": [ + { "id": "organize", "options": { + "excludeByName": { "Time": true, "__name__": true, "org_id": true, "backfill": true, "timestamp_in_secs": true, "instance": true, "job": true }, + "renameByName": { "name": "Location", "user_id": "User", "error_reason": "Reason", "Value": "Status" } + } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 25 }, + "id": 3, + "panels": [], + "title": "Operations Trends", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Rate of backup operations over time, by status (derived from the pxbackup_backup_count counter).", + "fieldConfig": { + "defaults": { + "color": { "mode": "palette-classic" }, + "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, + "mappings": [], "min": 0, + "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "short" + }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 26 }, + "id": 120, + "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "multi", "sort": "desc" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "sum by (status) (increase(pxbackup_backup_count{user_id=~\"$UserID\", cluster_name=~\"$Cluster\"}[$__rate_interval]))", "format": "time_series", "legendFormat": "{{status}}", "refId": "A" } + ], + "title": "Backup Operations Trend", + "type": "timeseries" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Rate of restore operations over time, by status (derived from the pxbackup_restore_count counter).", + "fieldConfig": { + "defaults": { + "color": { "mode": "palette-classic" }, + "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, + "mappings": [], "min": 0, + "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "short" + }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 26 }, + "id": 121, + "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "multi", "sort": "desc" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "sum by (status) (increase(pxbackup_restore_count{user_id=~\"$UserID\", cluster=~\"$Cluster\"}[$__rate_interval]))", "format": "time_series", "legendFormat": "{{status}}", "refId": "A" } + ], + "title": "Restore Operations Trend", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 34 }, + "id": 4, + "panels": [], + "title": "Current States", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Distribution of current backup states across all backups (pxbackup_backup_status).", + "fieldConfig": { + "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Partial Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 35 }, + "id": 130, + "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==6)", "format": "time_series", "legendFormat": "Success", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==8)", "format": "time_series", "legendFormat": "Partial Success", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==4)", "format": "time_series", "legendFormat": "Failed", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==2)", "format": "time_series", "legendFormat": "In Progress", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==1)", "format": "time_series", "legendFormat": "Pending", "refId": "E" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==10)", "format": "time_series", "legendFormat": "Cloud Backup Missing", "refId": "F" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==9)", "format": "time_series", "legendFormat": "Delete Pending", "refId": "G" } + ], + "title": "Current Backup States", + "type": "piechart" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Distribution of current restore states across all restores (pxbackup_restore_status).", + "fieldConfig": { + "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Partial Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 35 }, + "id": 131, + "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_restore_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==6)", "format": "time_series", "legendFormat": "Success", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_restore_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==8)", "format": "time_series", "legendFormat": "Partial Success", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_restore_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==4)", "format": "time_series", "legendFormat": "Failed", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_restore_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==2)", "format": "time_series", "legendFormat": "In Progress", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_restore_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==1)", "format": "time_series", "legendFormat": "Pending", "refId": "E" } + ], + "title": "Current Restore States", + "type": "piechart" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 43 }, + "id": 5, + "panels": [], + "title": "Schedule & Policy Health", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 4, "x": 0, "y": 44 }, + "id": 140, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_schedule_status{user_id=~\"$UserID\"}==0) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Active Schedules", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "yellow", "value": 1 } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 4, "x": 4, "y": 44 }, + "id": 141, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_schedule_status{user_id=~\"$UserID\"}==1) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Suspended Schedules", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Schedule policy inventory (pxbackup_schedpolicy_metrics).", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 8, "w": 8, "x": 0, "y": 48 }, + "id": 142, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_schedpolicy_metrics{user_id=~\"$UserID\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Schedule Policies", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true }, "renameByName": { "name": "Policy", "type": "Type", "user_id": "User" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Volume/resource-only policy inventory (pxbackup_volumeresourceonlypolicy_metrics).", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 8, "w": 8, "x": 8, "y": 48 }, + "id": 143, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_volumeresourceonlypolicy_metrics{user_id=~\"$UserID\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Volume/Resource-Only Policies", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true }, "renameByName": { "name": "Policy", "type": "Type", "user_id": "User" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Rule inventory (pxbackup_rule_metrics).", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 8, "w": 8, "x": 16, "y": 48 }, + "id": 144, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_rule_metrics{user_id=~\"$UserID\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Rules", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true }, "renameByName": { "name": "Rule", "user_id": "User" } } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 56 }, + "id": 6, + "panels": [], + "title": "Credentials", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "blue" } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 8, "w": 6, "x": 0, "y": 57 }, + "id": 150, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_cloudcred_metrics{user_id=~\"$UserID\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Total Cloud Credentials", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Credentials by provider type (pxbackup_cloudcred_metrics value: 1=AWS, 2=Azure, 3=Google, 4=IBM, 5=Rancher).", + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 8, "w": 12, "x": 6, "y": 57 }, + "id": 151, + "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_cloudcred_metrics{user_id=~\"$UserID\"}==1)", "format": "time_series", "legendFormat": "AWS", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_cloudcred_metrics{user_id=~\"$UserID\"}==2)", "format": "time_series", "legendFormat": "Azure", "refId": "B" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_cloudcred_metrics{user_id=~\"$UserID\"}==3)", "format": "time_series", "legendFormat": "Google", "refId": "C" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_cloudcred_metrics{user_id=~\"$UserID\"}==4)", "format": "time_series", "legendFormat": "IBM", "refId": "D" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_cloudcred_metrics{user_id=~\"$UserID\"}==5)", "format": "time_series", "legendFormat": "Rancher", "refId": "E" } + ], + "title": "Credentials by Provider", + "type": "piechart" + }, + { + "collapsed": true, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 65 }, + "id": 7, + "panels": [ + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "gridPos": { "h": 6, "w": 24, "x": 0, "y": 66 }, + "id": 160, + "options": { "code": { "language": "plaintext", "showLineNumbers": false, "showMiniMap": false }, "content": "## Federated Operations (optional)\n\nPortworx Backup Federated mode exposes additional discovery / Gardener metrics that are **not part of the on-prem `px-backup-metrics` reference** used to build this dashboard.\n\nIf your environment runs Federated mode and surfaces those metrics in Prometheus, add panels here. Note that **VM/KubeVirt backups are documented as Classic-mode only**; Federated mode supports application namespace backups.\n\nThis row is intentionally left as a placeholder so the section is discoverable without breaking import for Classic-mode users.", "mode": "markdown" }, + "pluginVersion": "11.6.0", + "title": "Federated Operations", + "type": "text" + } + ], + "title": "Federated Operations (optional)", + "type": "row" + } + ], + "refresh": "30s", + "schemaVersion": 41, + "tags": [ "portworx-backup", "pxbackup", "global" ], + "templating": { + "list": [ + { + "allValue": ".*", + "current": {}, + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "definition": "pxbackup_cluster_status", + "includeAll": true, + "label": "UserID", + "multi": true, + "name": "UserID", + "options": [], + "query": "pxbackup_cluster_status", + "refresh": 1, + "regex": "/.*user_id=\"([^\"]*).*/", + "type": "query" + }, + { + "allValue": ".*", + "current": {}, + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "definition": "pxbackup_cluster_status{user_id=~\"$UserID\"}", + "includeAll": true, + "label": "Cluster", + "multi": true, + "name": "Cluster", + "options": [], + "query": "pxbackup_cluster_status{user_id=~\"$UserID\"}", + "refresh": 1, + "regex": "/.*name=\"([^\"]*).*/", + "type": "query" + } + ] + }, + "time": { "from": "now-24h", "to": "now" }, + "timepicker": {}, + "timezone": "", + "title": "Portworx Backup - Global Operations Overview", + "uid": "pxb-global-ops", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/assets/helm-backup/grafana-kubevirt.json b/assets/helm-backup/grafana-kubevirt.json new file mode 100644 index 00000000..85cb8050 --- /dev/null +++ b/assets/helm-backup/grafana-kubevirt.json @@ -0,0 +1,481 @@ +{ + "__inputs": [ + { + "name": "DS_PX-BACKUP", + "label": "px-backup", + "description": "Prometheus data source scraping Portworx Backup metrics", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "11.6.0" }, + { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" }, + { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, + { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" }, + { "type": "panel", "id": "table", "name": "Table", "version": "" }, + { "type": "panel", "id": "piechart", "name": "Pie chart", "version": "" }, + { "type": "panel", "id": "barchart", "name": "Bar chart", "version": "" } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "datasource", "uid": "grafana" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Portworx Backup VM / KubeVirt protection: VM backup objects, VM status and OS inventory, VM disks/PVCs, VM resources, auto-exec rule governance, VM restore health and failure drilldowns. VM backups are Classic-mode in Portworx Backup.", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, + "id": 1, + "panels": [], + "title": "VM Backup Object Summary", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "blue" } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 6, "x": 0, "y": 1 }, + "id": 300, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"VirtualMachine\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Total VM Backup Objects", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 1 } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 6, "x": 6, "y": 1 }, + "id": 301, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"VirtualMachine\", status=\"Failed\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Failed", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "yellow", "value": 1 } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 6, "x": 12, "y": 1 }, + "id": 302, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"VirtualMachine\", status=\"PartialSuccess\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Partial Success", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "yellow", "value": 1 } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 6, "x": 18, "y": 1 }, + "id": 303, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"VirtualMachine\", status=~\"Deleting|DeletePending\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Deleting / Delete Pending", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 }, + "id": 2, + "panels": [], + "title": "VM Status & OS", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VM backup status distribution (pxbackup_virtual_machine_info).", + "fieldConfig": { + "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "PartialSuccess" }, "properties": [ { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 8, "x": 0, "y": 6 }, + "id": 310, + "options": { "legend": { "displayMode": "table", "placement": "bottom", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count by (status) (pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\", namespace=~\"$Namespace\"})", "format": "time_series", "legendFormat": "{{status}}", "refId": "A" } + ], + "title": "VM Backup Status", + "type": "piechart" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VM operating-system distribution (pxbackup_virtual_machine_info os_name).", + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 8, "w": 8, "x": 8, "y": 6 }, + "id": 311, + "options": { "legend": { "displayMode": "table", "placement": "bottom", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count by (os_name) (pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\", namespace=~\"$Namespace\"})", "format": "time_series", "legendFormat": "{{os_name}}", "refId": "A" } + ], + "title": "OS Distribution", + "type": "piechart" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VMs in Failed or PartialSuccess state.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Failed": { "color": "red", "index": 0 }, "PartialSuccess": { "color": "yellow", "index": 1 } } } ] } ] } + ] + }, + "gridPos": { "h": 8, "w": 8, "x": 16, "y": 6 }, + "id": 312, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\", namespace=~\"$Namespace\", status=~\"Failed|PartialSuccess\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Failed VMs", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "schedule_policy_uid": true, "cluster_uid": true, "create_time_in_sec": true, "os_name": true }, "renameByName": { "name": "VM", "namespace": "Namespace", "backup_name": "Backup", "status": "Status", "status_reason": "Reason", "schedule_policy_name": "Policy", "cluster_name": "Cluster" } } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 }, + "id": 3, + "panels": [], + "title": "VM Inventory", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "All protected VMs, grouped by namespace and VM name.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Success": { "color": "green", "index": 0 }, "Failed": { "color": "red", "index": 1 }, "PartialSuccess": { "color": "yellow", "index": 2 } } } ] } ] } + ] + }, + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 15 }, + "id": 320, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\", namespace=~\"$Namespace\", name=~\"$VM\", os_name=~\"$OSName\", backup_name=~\"$BackupName\", schedule_policy_name=~\"$SchedulePolicy\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "VM Inventory", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "schedule_policy_uid": true, "cluster_uid": true, "create_time_in_sec": true }, "renameByName": { "namespace": "Namespace", "name": "VM", "os_name": "OS", "status": "Status", "status_reason": "Reason", "backup_name": "Backup", "schedule_policy_name": "Policy", "cluster_name": "Cluster" } } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 24 }, + "id": 4, + "panels": [], + "title": "VM Backup Objects", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VM backup objects with per-object VM and failure counts (pxbackup_backup_object_info, backup_object_type=VirtualMachine).", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Success": { "color": "green", "index": 0 }, "Failed": { "color": "red", "index": 1 }, "PartialSuccess": { "color": "yellow", "index": 2 } } } ] } ] } + ] + }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 25 }, + "id": 330, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"VirtualMachine\", name=~\"$BackupName\", backup_location_name=~\"$BackupLocation\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "VM Backup Object Inventory", + "transformations": [ + { "id": "organize", "options": { + "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "uid": true, "namespaces": true, "label_selectors": true, "ns_label_selectors": true, "advanced_resource_label_selector": true, "backup_path": true, "status_reason": true, "backup_schedule_name": true, "backup_schedule_uid": true, "schedule_policy_uid": true, "backup_location_uid": true, "cloud_credential_uid": true, "cluster_uid": true, "volume_resource_only_policy_name": true, "volume_resource_only_policy_uid": true, "total_size": true, "resource_count": true, "volume_count": true, "create_time_in_sec": true, "volumes_completion_time": true, "resources_completion_time": true, "total_completion_time": true, "backup_id_list": true, "previous_backup_id_list": true, "previous_status": true, "previous_volume_count": true, "previous_total_size": true, "cluster": true, "org_id": true, "direct_kdmp": true, "large_resource_enabled": true, "retention_time": true, "backup_object_type": true }, + "renameByName": { "name": "Backup", "cluster_name": "Cluster", "status": "Status", "virtual_machines_total_count": "VMs Total", "virtual_machines_failed_count": "VMs Failed", "failed_resource_count": "Failed Resources", "failed_vol_count": "Failed Volumes", "backup_type": "Type", "backup_location_name": "Location", "cloud_credential_name": "Credential", "retention_period": "Retention", "skip_vm_auto_exec_rules": "Skip VM Auto-Exec Rules", "schedule_policy_name": "Policy" } + } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 33 }, + "id": 5, + "panels": [], + "title": "VM Disks / PVCs", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VM disk/PVC backups (pxbackup_backup_volume_info with virtual_machine_name set).", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Success": { "color": "green", "index": 0 }, "Failed": { "color": "red", "index": 1 }, "PartialSuccess": { "color": "yellow", "index": 2 } } } ] } ] } + ] + }, + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 34 }, + "id": 340, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_volume_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", storage_class=~\"$StorageClass\", backup_mode=~\"$BackupMode\", virtual_machine_name!=\"\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "VM Disks / PVCs", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "pvc_id": true, "name": true, "driver_name": true, "provisioner": true }, "renameByName": { "virtual_machine_name": "VM", "pvc": "PVC", "namespace": "Namespace", "backup_name": "Backup", "status": "Status", "storage_class": "Storage Class", "volume_snapshot": "Snapshot", "total_size": "Total Size", "actual_size": "Actual Size", "backup_mode": "Backup Mode" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VM disk backup mode (Full / Incremental / Not Supported).", + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 0, "y": 43 }, + "id": 341, + "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count by (backup_mode) (pxbackup_backup_volume_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", virtual_machine_name!=\"\"})", "format": "time_series", "legendFormat": "{{backup_mode}}", "refId": "A" } + ], + "title": "VM Disk Backup Mode", + "type": "piechart" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VM disks by storage class.", + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "fillOpacity": 80, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineWidth": 1, "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "short" }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 12, "y": 43 }, + "id": 342, + "options": { "barRadius": 0, "barWidth": 0.7, "fullHighlight": false, "groupWidth": 0.7, "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "orientation": "horizontal", "showValue": "auto", "stacking": "none", "tooltip": { "mode": "single", "sort": "none" }, "xTickLabelRotation": 0, "xTickLabelSpacing": 0 }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count by (storage_class) (pxbackup_backup_volume_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", virtual_machine_name!=\"\"})", "format": "time_series", "legendFormat": "{{storage_class}}", "refId": "A" } + ], + "title": "VM Disks by Storage Class", + "type": "barchart" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 50 }, + "id": 6, + "panels": [], + "title": "VM Resource Inventory", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Kubernetes resources captured per VM (pxbackup_virtual_machine_resource_info).", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 51 }, + "id": 350, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_virtual_machine_resource_info{backup_name=~\"$BackupName\", virtual_machine_name=~\"$VM\", namespace=~\"$Namespace\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "VM Resource Inventory", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true }, "renameByName": { "virtual_machine_name": "VM", "name": "Resource", "namespace": "Namespace", "group": "Group", "kind": "Kind", "version": "Version", "backup_name": "Backup" } } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 59 }, + "id": 7, + "panels": [], + "title": "VM Rules & Policy Governance", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Rule inventory (pxbackup_rule_metrics) — pre/post exec rules available for VM backups.", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 60 }, + "id": 360, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_rule_metrics{user_id=~\"$UserID\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Rules", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true }, "renameByName": { "name": "Rule", "user_id": "User" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VM backup objects and whether VM auto-exec rules were skipped.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Skip VM Auto-Exec Rules" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "true": { "color": "yellow", "index": 0 }, "false": { "color": "green", "index": 1 } } } ] } ] } + ] + }, + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 60 }, + "id": 361, + "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"VirtualMachine\", name=~\"$BackupName\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "VM Auto-Exec Rule Governance", + "transformations": [ + { "id": "organize", "options": { + "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "uid": true, "namespaces": true, "label_selectors": true, "ns_label_selectors": true, "advanced_resource_label_selector": true, "backup_path": true, "status_reason": true, "backup_schedule_name": true, "backup_schedule_uid": true, "schedule_policy_uid": true, "backup_location_uid": true, "cloud_credential_uid": true, "cluster_uid": true, "volume_resource_only_policy_name": true, "volume_resource_only_policy_uid": true, "total_size": true, "resource_count": true, "volume_count": true, "create_time_in_sec": true, "volumes_completion_time": true, "resources_completion_time": true, "total_completion_time": true, "backup_id_list": true, "previous_backup_id_list": true, "previous_status": true, "previous_volume_count": true, "previous_total_size": true, "cluster": true, "org_id": true, "direct_kdmp": true, "large_resource_enabled": true, "retention_time": true, "retention_period": true, "backup_object_type": true, "backup_location_name": true, "cloud_credential_name": true, "backup_type": true, "virtual_machines_total_count": true, "virtual_machines_failed_count": true, "failed_resource_count": true, "failed_vol_count": true, "status": true }, + "renameByName": { "name": "Backup", "cluster_name": "Cluster", "skip_vm_auto_exec_rules": "Skip VM Auto-Exec Rules", "schedule_policy_name": "Policy" } + } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 68 }, + "id": 8, + "panels": [], + "title": "VM Restore Health", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Restore operation rate by status. Restore metrics are not split by VM vs application, so this is filtered by cluster/user only.", + "fieldConfig": { + "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "short" }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 12, "x": 0, "y": 69 }, + "id": 370, + "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "multi", "sort": "desc" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "sum by (status) (increase(pxbackup_restore_count{user_id=~\"$UserID\", cluster=~\"$Cluster\", org_id=~\"$OrgID\"}[$__rate_interval]))", "format": "time_series", "legendFormat": "{{status}}", "refId": "A" } + ], + "title": "Restore Operations Trend", + "type": "timeseries" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Failed restores (pxbackup_restore_status == 4).", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 8, "w": 12, "x": 12, "y": 69 }, + "id": 371, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_restore_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"} == 4", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Failed Restores", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "org_id": true, "cluster_uid": true, "backfill": true, "timestamp_in_secs": true }, "renameByName": { "name": "Restore", "namespaces": "Namespaces", "cluster": "Cluster", "backup": "Source Backup", "error_reason": "Reason", "user_id": "User" } } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 77 }, + "id": 9, + "panels": [], + "title": "VM Failure Drilldown", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VMs in Failed or PartialSuccess state with reason.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Failed": { "color": "red", "index": 0 }, "PartialSuccess": { "color": "yellow", "index": 1 } } } ] } ] } + ] + }, + "gridPos": { "h": 7, "w": 12, "x": 0, "y": 78 }, + "id": 380, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\", namespace=~\"$Namespace\", status=~\"Failed|PartialSuccess\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Failed VMs", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "schedule_policy_uid": true, "cluster_uid": true, "create_time_in_sec": true, "os_name": true }, "renameByName": { "name": "VM", "namespace": "Namespace", "backup_name": "Backup", "status": "Status", "status_reason": "Reason", "schedule_policy_name": "Policy", "cluster_name": "Cluster" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "VM disks/PVCs in Failed or PartialSuccess state.", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 12, "y": 78 }, + "id": 381, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_volume_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", virtual_machine_name!=\"\", status=~\"Failed|PartialSuccess\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Failed VM Disks / PVCs", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "pvc_id": true, "name": true, "driver_name": true, "provisioner": true, "volume_snapshot": true }, "renameByName": { "virtual_machine_name": "VM", "pvc": "PVC", "namespace": "Namespace", "backup_name": "Backup", "status": "Status", "storage_class": "Storage Class", "total_size": "Total Size", "actual_size": "Actual Size", "backup_mode": "Backup Mode" } } } + ], + "type": "table" + } + ], + "refresh": "30s", + "schemaVersion": 41, + "tags": [ "portworx-backup", "pxbackup", "vm", "kubevirt" ], + "templating": { + "list": [ + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_cluster_status", "includeAll": true, "label": "UserID", "multi": true, "name": "UserID", "options": [], "query": "pxbackup_cluster_status", "refresh": 1, "regex": "/.*user_id=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_object_info{backup_object_type=\"VirtualMachine\"}", "includeAll": true, "label": "OrgID", "multi": true, "name": "OrgID", "options": [], "query": "pxbackup_backup_object_info{backup_object_type=\"VirtualMachine\"}", "refresh": 1, "regex": "/.*org_id=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_virtual_machine_info", "includeAll": true, "label": "Cluster", "multi": true, "name": "Cluster", "options": [], "query": "pxbackup_virtual_machine_info", "refresh": 2, "regex": "/.*cluster_name=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "Namespace", "multi": true, "name": "Namespace", "options": [], "query": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*namespace=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\", namespace=~\"$Namespace\"}", "includeAll": true, "label": "VM", "multi": true, "name": "VM", "options": [], "query": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\", namespace=~\"$Namespace\"}", "refresh": 2, "regex": "/.*\\bname=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "BackupName", "multi": true, "name": "BackupName", "options": [], "query": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*backup_name=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_object_info{backup_object_type=\"VirtualMachine\", cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "BackupLocation", "multi": true, "name": "BackupLocation", "options": [], "query": "pxbackup_backup_object_info{backup_object_type=\"VirtualMachine\", cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*backup_location_name=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "SchedulePolicy", "multi": true, "name": "SchedulePolicy", "options": [], "query": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*schedule_policy_name=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "OSName", "multi": true, "name": "OSName", "options": [], "query": "pxbackup_virtual_machine_info{cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*os_name=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_volume_info{virtual_machine_name!=\"\"}", "includeAll": true, "label": "StorageClass", "multi": true, "name": "StorageClass", "options": [], "query": "pxbackup_backup_volume_info{virtual_machine_name!=\"\"}", "refresh": 2, "regex": "/.*storage_class=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_volume_info{virtual_machine_name!=\"\"}", "includeAll": true, "label": "BackupMode", "multi": true, "name": "BackupMode", "options": [], "query": "pxbackup_backup_volume_info{virtual_machine_name!=\"\"}", "refresh": 2, "regex": "/.*backup_mode=\"([^\"]*).*/", "type": "query" } + ] + }, + "time": { "from": "now-24h", "to": "now" }, + "timepicker": {}, + "timezone": "", + "title": "Portworx Backup - VM / KubeVirt Protection", + "uid": "pxb-vm-kubevirt", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/assets/helm-backup/grafana-namespace.json b/assets/helm-backup/grafana-namespace.json new file mode 100644 index 00000000..36891fa7 --- /dev/null +++ b/assets/helm-backup/grafana-namespace.json @@ -0,0 +1,489 @@ +{ + "__inputs": [ + { + "name": "DS_PX-BACKUP", + "label": "px-backup", + "description": "Prometheus data source scraping Portworx Backup metrics", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "11.6.0" }, + { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" }, + { "type": "panel", "id": "stat", "name": "Stat", "version": "" }, + { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" }, + { "type": "panel", "id": "table", "name": "Table", "version": "" }, + { "type": "panel", "id": "piechart", "name": "Pie chart", "version": "" }, + { "type": "panel", "id": "barchart", "name": "Bar chart", "version": "" } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { "type": "datasource", "uid": "grafana" }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "description": "Portworx Backup Namespace / Application protection: app backups, namespaces, Kubernetes resource types, PVCs/volumes, retention governance and failure drilldowns.", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, + "id": 1, + "panels": [], + "title": "App Backup Summary", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "blue" } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 6, "x": 0, "y": 1 }, + "id": 200, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Total App Backups", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 1 } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 6, "x": 6, "y": 1 }, + "id": 201, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\", status=\"Failed\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Failed", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "yellow", "value": 1 } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 6, "x": 12, "y": 1 }, + "id": 202, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\", status=\"PartialSuccess\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Partial Success", + "type": "stat" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "yellow", "value": 1 } ] }, "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 4, "w": 6, "x": 18, "y": 1 }, + "id": 203, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\", status=~\"Deleting|DeletePending\"}) OR vector(0)", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Deleting / Delete Pending", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 }, + "id": 2, + "panels": [], + "title": "Operation Trends", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Backup operation rate by status (pxbackup_backup_count is fleet-wide; it is not split by backup_object_type).", + "fieldConfig": { + "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "short" }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 10, "x": 0, "y": 6 }, + "id": 210, + "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "multi", "sort": "desc" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "sum by (status) (increase(pxbackup_backup_count{user_id=~\"$UserID\", cluster_name=~\"$Cluster\", org_id=~\"$OrgID\"}[$__rate_interval]))", "format": "time_series", "legendFormat": "{{status}}", "refId": "A" } + ], + "title": "Backup Operations Trend", + "type": "timeseries" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Restore operation rate by status (pxbackup_restore_count).", + "fieldConfig": { + "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "short" }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 10, "x": 10, "y": 6 }, + "id": 211, + "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "hideZeros": false, "mode": "multi", "sort": "desc" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "sum by (status) (increase(pxbackup_restore_count{user_id=~\"$UserID\", cluster=~\"$Cluster\", org_id=~\"$OrgID\"}[$__rate_interval]))", "format": "time_series", "legendFormat": "{{status}}", "refId": "A" } + ], + "title": "Restore Operations Trend", + "type": "timeseries" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "fieldConfig": { "defaults": { "decimals": 0, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "red" }, { "color": "yellow", "value": 50 }, { "color": "green", "value": 90 } ] }, "unit": "percent" }, "overrides": [] }, + "gridPos": { "h": 8, "w": 4, "x": 20, "y": 6 }, + "id": 212, + "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "100*count(pxbackup_restore_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"}==6)/count(pxbackup_restore_status{cluster=~\"$Cluster\", user_id=~\"$UserID\"})", "format": "time_series", "legendFormat": "", "refId": "A" } + ], + "title": "Restore Success Rate", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 }, + "id": 3, + "panels": [], + "title": "Backup Inventory", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "All application backups (backup_object_type=All). Use the variables above to filter.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Success": { "color": "green", "index": 0 }, "Failed": { "color": "red", "index": 1 }, "PartialSuccess": { "color": "yellow", "index": 2 } } } ] } ] } + ] + }, + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 15 }, + "id": 220, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\", name=~\"$BackupName\", backup_location_name=~\"$BackupLocation\", schedule_policy_name=~\"$SchedulePolicy\", backup_type=~\"$BackupType\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Application Backup Inventory", + "transformations": [ + { "id": "organize", "options": { + "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "uid": true, "backup_schedule_uid": true, "backup_location_uid": true, "cloud_credential_uid": true, "cluster_uid": true, "schedule_policy_uid": true, "volume_resource_only_policy_uid": true, "backup_path": true, "label_selectors": true, "ns_label_selectors": true, "advanced_resource_label_selector": true, "create_time_in_sec": true, "volumes_completion_time": true, "resources_completion_time": true, "total_completion_time": true, "backup_id_list": true, "previous_backup_id_list": true, "previous_status": true, "previous_volume_count": true, "previous_total_size": true, "cluster": true, "backup_object_type": true, "org_id": true }, + "renameByName": { "name": "Backup", "namespaces": "Namespaces", "backup_schedule_name": "Schedule", "schedule_policy_name": "Policy", "status": "Status", "status_reason": "Reason", "backup_location_name": "Location", "cloud_credential_name": "Credential", "backup_type": "Type", "retention_period": "Retention", "total_size": "Total Size", "resource_count": "Resources", "volume_count": "Volumes", "cluster_name": "Cluster" } + } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 24 }, + "id": 4, + "panels": [], + "title": "Backup Composition", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Scheduled (backup_schedule_name set) vs manual (empty) application backups.", + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 0, "y": 25 }, + "id": 230, + "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "values": [ "value" ] }, "pieType": "pie", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\", backup_schedule_name!=\"\"})", "format": "time_series", "legendFormat": "Scheduled", "refId": "A" }, + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count(pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\", backup_schedule_name=\"\"})", "format": "time_series", "legendFormat": "Manual", "refId": "B" } + ], + "title": "Scheduled vs Manual", + "type": "piechart" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Backup type mix (pxbackup_backup_object_info backup_type label).", + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 12, "y": 25 }, + "id": 231, + "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count by (backup_type) (pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\"})", "format": "time_series", "legendFormat": "{{backup_type}}", "refId": "A" } + ], + "title": "Backup Type Mix", + "type": "piechart" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 32 }, + "id": 5, + "panels": [], + "title": "Namespace Health", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Per-namespace protection status for the selected backup(s). The 'name' label holds the namespace.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Success": { "color": "green", "index": 0 }, "Failed": { "color": "red", "index": 1 }, "PartialSuccess": { "color": "yellow", "index": 2 } } } ] } ] } + ] + }, + "gridPos": { "h": 8, "w": 16, "x": 0, "y": 33 }, + "id": 240, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_namespace_resource_info{backup_name=~\"$BackupName\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Namespace Health", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "create_time_in_sec": true }, "renameByName": { "name": "Namespace", "backup_name": "Backup", "status": "Status", "status_reason": "Reason", "total_resources": "Resources", "total_volumes": "Volumes", "total_failed_resources": "Failed Resources", "total_failed_volumes": "Failed Volumes" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Namespace status distribution for the selected backup(s).", + "fieldConfig": { + "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "Success" }, "properties": [ { "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } } ] }, + { "matcher": { "id": "byName", "options": "PartialSuccess" }, "properties": [ { "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } } ] } + ] + }, + "gridPos": { "h": 8, "w": 8, "x": 16, "y": 33 }, + "id": 241, + "options": { "legend": { "displayMode": "table", "placement": "bottom", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count by (status) (pxbackup_namespace_resource_info{backup_name=~\"$BackupName\"})", "format": "time_series", "legendFormat": "{{status}}", "refId": "A" } + ], + "title": "Namespace Status Distribution", + "type": "piechart" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 41 }, + "id": 6, + "panels": [], + "title": "Kubernetes Resource Types", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Resource-type breakdown per namespace for the selected backup(s). The 'name' label holds the resource type.", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Failed Resources" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-background", "mode": "gradient" } }, { "id": "thresholds", "value": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 1 } ] } } ] } + ] + }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 42 }, + "id": 250, + "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_namespace_resource_type_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Resource-Type Breakdown", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true }, "renameByName": { "namespace": "Namespace", "name": "Resource Type", "backup_name": "Backup", "total_resources": "Resources", "total_failed_resources": "Failed Resources" } } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 50 }, + "id": 7, + "panels": [], + "title": "PVC / Volume Health", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Application PVC/volume backups (virtual_machine_name empty = non-VM volumes).", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Success": { "color": "green", "index": 0 }, "Failed": { "color": "red", "index": 1 }, "PartialSuccess": { "color": "yellow", "index": 2 } } } ] } ] } + ] + }, + "gridPos": { "h": 9, "w": 24, "x": 0, "y": 51 }, + "id": 260, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_volume_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", storage_class=~\"$StorageClass\", provisioner=~\"$Provisioner\", virtual_machine_name=\"\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "PVC / Volume Health", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "pvc_id": true, "name": true, "driver_name": true, "virtual_machine_name": true }, "renameByName": { "pvc": "PVC", "namespace": "Namespace", "backup_name": "Backup", "status": "Status", "storage_class": "Storage Class", "provisioner": "Provisioner", "volume_snapshot": "Snapshot", "total_size": "Total Size", "actual_size": "Actual Size", "backup_mode": "Backup Mode" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Full vs incremental volume backups (backup_mode).", + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "mappings": [], "unit": "none" }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 0, "y": 60 }, + "id": 261, + "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "values": [ "value" ] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count by (backup_mode) (pxbackup_backup_volume_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", virtual_machine_name=\"\"})", "format": "time_series", "legendFormat": "{{backup_mode}}", "refId": "A" } + ], + "title": "Full vs Incremental Volumes", + "type": "piechart" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Volume distribution by storage class.", + "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "fillOpacity": 80, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineWidth": 1, "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] }, "unit": "short" }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 12, "y": 60 }, + "id": 262, + "options": { "barRadius": 0, "barWidth": 0.7, "fullHighlight": false, "groupWidth": 0.7, "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "orientation": "horizontal", "showValue": "auto", "stacking": "none", "tooltip": { "mode": "single", "sort": "none" }, "xTickLabelRotation": 0, "xTickLabelSpacing": 0 }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "count by (storage_class) (pxbackup_backup_volume_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", virtual_machine_name=\"\"})", "format": "time_series", "legendFormat": "{{storage_class}}", "refId": "A" } + ], + "title": "Volumes by Storage Class", + "type": "barchart" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 67 }, + "id": 8, + "panels": [], + "title": "Retention & Location Governance", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Retention, backup location, credential and data-path governance per application backup.", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 8, "w": 24, "x": 0, "y": 68 }, + "id": 270, + "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_object_info{cluster_name=~\"$Cluster\", org_id=~\"$OrgID\", backup_object_type=\"All\", name=~\"$BackupName\", backup_location_name=~\"$BackupLocation\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Retention & Location Governance", + "transformations": [ + { "id": "organize", "options": { + "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "uid": true, "namespaces": true, "label_selectors": true, "ns_label_selectors": true, "advanced_resource_label_selector": true, "backup_path": true, "status": true, "status_reason": true, "backup_schedule_name": true, "backup_schedule_uid": true, "schedule_policy_name": true, "schedule_policy_uid": true, "backup_location_uid": true, "cloud_credential_uid": true, "cluster_uid": true, "volume_resource_only_policy_name": true, "volume_resource_only_policy_uid": true, "total_size": true, "resource_count": true, "volume_count": true, "backup_type": true, "backup_object_type": true, "skip_vm_auto_exec_rules": true, "virtual_machines_total_count": true, "virtual_machines_failed_count": true, "failed_resource_count": true, "failed_vol_count": true, "create_time_in_sec": true, "volumes_completion_time": true, "resources_completion_time": true, "total_completion_time": true, "backup_id_list": true, "previous_backup_id_list": true, "previous_status": true, "previous_volume_count": true, "previous_total_size": true, "cluster": true, "org_id": true }, + "renameByName": { "name": "Backup", "cluster_name": "Cluster", "retention_period": "Retention Period", "retention_time": "Retention Time", "backup_location_name": "Location", "cloud_credential_name": "Credential", "direct_kdmp": "Direct KDMP", "large_resource_enabled": "Large Resource" } + } } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { "h": 1, "w": 24, "x": 0, "y": 76 }, + "id": 9, + "panels": [], + "title": "Failure Drilldown", + "type": "row" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Namespaces in Failed or PartialSuccess state for the selected backup(s).", + "fieldConfig": { + "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, + "overrides": [ + { "matcher": { "id": "byName", "options": "Status" }, "properties": [ { "id": "custom.cellOptions", "value": { "type": "color-text" } }, { "id": "mappings", "value": [ { "type": "value", "options": { "Failed": { "color": "red", "index": 0 }, "PartialSuccess": { "color": "yellow", "index": 1 } } } ] } ] } + ] + }, + "gridPos": { "h": 7, "w": 24, "x": 0, "y": 77 }, + "id": 280, + "options": { "cellHeight": "sm", "footer": { "countRows": true, "fields": "", "reducer": [ "count" ], "show": true }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_namespace_resource_info{backup_name=~\"$BackupName\", status=~\"Failed|PartialSuccess\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Namespaces Needing Attention", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "create_time_in_sec": true }, "renameByName": { "name": "Namespace", "backup_name": "Backup", "status": "Status", "status_reason": "Reason", "total_resources": "Resources", "total_volumes": "Volumes", "total_failed_resources": "Failed Resources", "total_failed_volumes": "Failed Volumes" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Resource types with at least one failed resource.", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 0, "y": 84 }, + "id": 281, + "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_namespace_resource_type_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", total_failed_resources!=\"0\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Failed Resource Types", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true }, "renameByName": { "namespace": "Namespace", "name": "Resource Type", "backup_name": "Backup", "total_resources": "Resources", "total_failed_resources": "Failed Resources" } } } + ], + "type": "table" + }, + { + "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, + "description": "Application volumes in Failed or PartialSuccess state.", + "fieldConfig": { "defaults": { "custom": { "align": "auto", "filterable": true }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" } ] } }, "overrides": [] }, + "gridPos": { "h": 7, "w": 12, "x": 12, "y": 84 }, + "id": 282, + "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "showHeader": true }, + "pluginVersion": "11.6.0", + "targets": [ + { "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "expr": "pxbackup_backup_volume_info{backup_name=~\"$BackupName\", namespace=~\"$Namespace\", virtual_machine_name=\"\", status=~\"Failed|PartialSuccess\"}", "format": "table", "instant": true, "legendFormat": "", "refId": "A" } + ], + "title": "Failed PVCs / Volumes", + "transformations": [ + { "id": "organize", "options": { "excludeByName": { "Time": true, "__name__": true, "Value": true, "instance": true, "job": true, "backup_id": true, "pvc_id": true, "name": true, "driver_name": true, "virtual_machine_name": true, "volume_snapshot": true }, "renameByName": { "pvc": "PVC", "namespace": "Namespace", "backup_name": "Backup", "status": "Status", "storage_class": "Storage Class", "provisioner": "Provisioner", "total_size": "Total Size", "actual_size": "Actual Size", "backup_mode": "Backup Mode" } } } + ], + "type": "table" + } + ], + "refresh": "30s", + "schemaVersion": 41, + "tags": [ "portworx-backup", "pxbackup", "namespace", "application" ], + "templating": { + "list": [ + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_cluster_status", "includeAll": true, "label": "UserID", "multi": true, "name": "UserID", "options": [], "query": "pxbackup_cluster_status", "refresh": 1, "regex": "/.*user_id=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_object_info{backup_object_type=\"All\"}", "includeAll": true, "label": "OrgID", "multi": true, "name": "OrgID", "options": [], "query": "pxbackup_backup_object_info{backup_object_type=\"All\"}", "refresh": 1, "regex": "/.*org_id=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_object_info{backup_object_type=\"All\", org_id=~\"$OrgID\"}", "includeAll": true, "label": "Cluster", "multi": true, "name": "Cluster", "options": [], "query": "pxbackup_backup_object_info{backup_object_type=\"All\", org_id=~\"$OrgID\"}", "refresh": 2, "regex": "/.*cluster_name=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_object_info{backup_object_type=\"All\", cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "BackupName", "multi": true, "name": "BackupName", "options": [], "query": "pxbackup_backup_object_info{backup_object_type=\"All\", cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*\\bname=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_volume_info{virtual_machine_name=\"\"}", "includeAll": true, "label": "Namespace", "multi": true, "name": "Namespace", "options": [], "query": "pxbackup_backup_volume_info{virtual_machine_name=\"\"}", "refresh": 2, "regex": "/.*namespace=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_object_info{backup_object_type=\"All\", cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "BackupLocation", "multi": true, "name": "BackupLocation", "options": [], "query": "pxbackup_backup_object_info{backup_object_type=\"All\", cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*backup_location_name=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_object_info{backup_object_type=\"All\", cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "SchedulePolicy", "multi": true, "name": "SchedulePolicy", "options": [], "query": "pxbackup_backup_object_info{backup_object_type=\"All\", cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*schedule_policy_name=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_object_info{backup_object_type=\"All\", cluster_name=~\"$Cluster\"}", "includeAll": true, "label": "BackupType", "multi": true, "name": "BackupType", "options": [], "query": "pxbackup_backup_object_info{backup_object_type=\"All\", cluster_name=~\"$Cluster\"}", "refresh": 2, "regex": "/.*backup_type=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_volume_info{virtual_machine_name=\"\"}", "includeAll": true, "label": "StorageClass", "multi": true, "name": "StorageClass", "options": [], "query": "pxbackup_backup_volume_info{virtual_machine_name=\"\"}", "refresh": 2, "regex": "/.*storage_class=\"([^\"]*).*/", "type": "query" }, + { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${DS_PX-BACKUP}" }, "definition": "pxbackup_backup_volume_info{virtual_machine_name=\"\"}", "includeAll": true, "label": "Provisioner", "multi": true, "name": "Provisioner", "options": [], "query": "pxbackup_backup_volume_info{virtual_machine_name=\"\"}", "refresh": 2, "regex": "/.*provisioner=\"([^\"]*).*/", "type": "query" } + ] + }, + "time": { "from": "now-24h", "to": "now" }, + "timepicker": {}, + "timezone": "", + "title": "Portworx Backup - Namespace / App Protection", + "uid": "pxb-ns-app", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/scripts/helm-backup b/scripts/helm-backup index d82fb870..f7375a1d 100644 --- a/scripts/helm-backup +++ b/scripts/helm-backup @@ -3,14 +3,14 @@ NAMESPACE=central if [ -v pxb_version ]; then VERSION=$pxb_version else - VERSION=2.11.0 + # ensure to update px cli to supported version + VERSION=3.1.1 fi kubectl apply -f /assets/helm-backup/namespace.yml curl -O https://raw.githubusercontent.com/portworx/helm/master/stable/px-central-$VERSION.tgz -helm install px-central px-central-$VERSION.tgz --namespace $NAMESPACE --create-namespace --version $VERSION --set persistentStorage.enabled=true,persistentStorage.storageClassName="px-csi-db",pxbackup.enabled=true,oidc.centralOIDC.updateAdminProfile=false,installCRDs=true - +helm install px-central px-central-$VERSION.tgz --namespace $NAMESPACE --create-namespace --version $VERSION --skip-crds --set persistentStorage.enabled=true,persistentStorage.storageClassName="px-csi-db",pxbackup.enabled=true,oidc.centralOIDC.updateAdminProfile=false,pxbackup.prometheus.replicas=1,pxbackup.alertmanager.replicas=1,service.pxCentralUIServiceType="LoadBalancer",service.pxBackupUIServiceType="LoadBalancer" until (kubectl get po -n $NAMESPACE -ljob-name=pxcentral-post-install-hook -o wide | awk '{print $1, $2, $3}' |grep "Completed"); do echo "Waiting for post install hook";sleep 3; done until (kubectl get po -n $NAMESPACE -lapp=px-backup -o wide | awk '{print $1, $2, $3}' | grep "Running" | grep "1/1"); do echo "Waiting for backup service";sleep 3; done @@ -59,7 +59,7 @@ if [ "$platform" = ocp4 ]; then authIP=$(kubectl get route px-central-ui -n central -o json |jq -r ".status.ingress[0].host") authPort=80 PXB_URL=$(kubectl get route px-backup-ui -n central -o json |jq -r ".status.ingress[0].host") - + PROMETHEUS_UID="P1809F7CD0C75ACF3" else # platform is k8s on aws IMDSTOKEN=$(curl -s -X PUT 'http://169.254.169.254/latest/api/token' -H 'X-aws-ec2-metadata-token-ttl-seconds: 120') backupIP=$(curl -H "X-aws-ec2-metadata-token: $IMDSTOKEN" -s http://169.254.169.254/latest/meta-data/public-ipv4) @@ -69,10 +69,24 @@ else # platform is k8s on aws kubectl apply -f /assets/helm-backup/backup-grpc-api-svc.yml backupPort=$(kubectl get svc px-backup-api-grpc -n central -o=jsonpath='{.spec.ports[?(@.port==10002)].nodePort}') PXB_URL=$(kubectl get svc px-backup-ui -n central -o=jsonpath='{.status.loadBalancer.ingress[0].hostname}') + + PXB_PROMETHEUS_PW=$(kubectl get secret pxc-backup-metrics -n central -o jsonpath='{.data.password}' | base64 -d) + sed -i "s//$PXB_PROMETHEUS_PW/" /assets/grafana/grafana-datasource.yaml + kubectl -n portworx delete configmap grafana-source-config + kubectl -n portworx create configmap grafana-source-config --from-file=/assets/grafana/grafana-datasource.yaml + PROMETHEUS_UID="P2A6756613D5CF575" fi +sed -i "s/\${DS_PX-BACKUP}/$PROMETHEUS_UID/" /assets/helm-backup/grafana-global-operations.json +sed -i "s/\${DS_PX-BACKUP}/$PROMETHEUS_UID/" /assets/helm-backup/grafana-kubevirt.json +sed -i "s/\${DS_PX-BACKUP}/$PROMETHEUS_UID/" /assets/helm-backup/grafana-namespace.json + +kubectl patch cm grafana-dashboards -n portworx --type=merge -p "{\"data\":{\"grafana-global-operations.json\":$(jq -Rs . < /assets/helm-backup/grafana-global-operations.json)}}" +kubectl patch cm grafana-dashboards -n portworx --type=merge -p "{\"data\":{\"grafana-kubevirt.json\":$(jq -Rs . < /assets/helm-backup/grafana-kubevirt.json)}}" +kubectl patch cm grafana-dashboards -n portworx --type=merge -p "{\"data\":{\"grafana-namespace.json\":$(jq -Rs . < /assets/helm-backup/grafana-namespace.json)}}" +kubectl -n portworx delete pod -l app=grafana + px pxb init config --px-backup-api-url http://$backupIP:$backupPort --pxcentral-auth-url http://$authIP:$authPort -px pxb set config --pxcentral-verify-ssl false px pxb login --username admin --password $ADMIN_PW while ! px pxb version; do diff --git a/scripts/install-px b/scripts/install-px index b80084ab..b14167e4 100644 --- a/scripts/install-px +++ b/scripts/install-px @@ -133,7 +133,7 @@ done kubectl apply -f /tmp/px.yml # Install px cli -curl -L -o /tmp/pxcli.tgz https://mirrors.portworx.com/packages/px-cli/v1.2.0/px-v1.2.0.linux.amd64.tar.gz +curl -L -o /tmp/pxcli.tgz https://mirrors.portworx.com/packages/px-cli/v1.5.0/px-v1.5.0.linux.amd64.tar.gz tar -xzf /tmp/pxcli.tgz -C /tmp/ chmod +x /tmp/px/bin/px* cp /tmp/px/bin/* /usr/local/bin/ @@ -167,12 +167,30 @@ kubectl -n portworx create configmap grafana-dashboards \ --from-file=/assets/grafana/portworx-dr-dashboard.json kubectl -n portworx create configmap grafana-dashboard-config --from-file=/assets/grafana/grafana-dashboard-config.yaml +GRAFANA_ADMIN_PW=$(openssl rand -base64 12) +kubectl create secret generic grafana-admin-secret -n portworx --from-literal=admin-password="$GRAFANA_ADMIN_PW" + if [ $platform = k8s ]; then kubectl -n portworx create configmap grafana-source-config --from-file=/assets/grafana/grafana-datasource.yaml kubectl -n portworx apply -f /assets/grafana/node-exporter.yaml kubectl -n portworx apply -f /assets/grafana/node-exporter-svc.yaml kubectl -n portworx apply -f /assets/grafana/node-exporter-servicemonitor.yaml kubectl -n portworx apply -f /assets/grafana/grafana.yaml + grafanaHost=$(kubectl get svc grafana -n portworx -o json | jq -r ".status.loadBalancer.ingress[0].hostname") + + # only wait once 5sec for LB hostname; do not block deployment (other clouds than AWS wont have a hostname) + if [ $grafanaHost = "null" ]; then + echo "Waiting 5sec for Grafana LB" + sleep 5 + grafanaHost=$(kubectl get svc grafana -n portworx -o json | jq -r ".status.loadBalancer.ingress[0].hostname") + fi + + # if there is no hostname show hint + if [ $grafanaHost = "null" ]; then + grafanaHost="[check grafana svc in px namespace]" + fi + grafanaHost="$grafanaHost:3000" + elif [ $platform = ocp4 ]; then oc apply -n portworx -f /assets/grafana/grafana-service-account.yaml oc -n portworx adm policy add-cluster-role-to-user cluster-monitoring-view -z grafana @@ -183,6 +201,7 @@ elif [ $platform = ocp4 ]; then oc -n portworx create configmap grafana-source-config --from-file=/assets/grafana/grafana-datasource-ocp.yaml oc -n portworx apply -f /assets/grafana/grafana-ocp.yaml oc expose service grafana -n portworx + grafanaHost=$(oc get route -n portworx -ojson | jq -r ".items[0].spec.host") fi # install storkctl @@ -194,3 +213,12 @@ while ! kubectl cp -n portworx $STORK_POD:/storkctl/linux/storkctl /usr/local/bi done chmod +x /usr/local/bin/storkctl storkctl completion bash >/etc/bash_completion.d/storkctl + +echo "PX grafana LB assigned: $grafanaHost" +cat <> /etc/motd ++================================================+ +Portworx Grafana User Interface Access URL : http://$grafanaHost +Portworx Grafana admin user name: admin +Portworx Grafana admin user password: $GRAFANA_ADMIN_PW ++================================================+ +EOF