diff --git a/resources/grafana/generated/dashboards/rhacs-cluster-overview.yaml b/resources/grafana/generated/dashboards/rhacs-cluster-overview.yaml index 5eec7ba..79ffc74 100644 --- a/resources/grafana/generated/dashboards/rhacs-cluster-overview.yaml +++ b/resources/grafana/generated/dashboards/rhacs-cluster-overview.yaml @@ -2131,13 +2131,150 @@ spec: ], "type": "table" }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "namespace\\namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 236 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "namespace\\Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 232 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "2026-05-08" + }, + "properties": [ + { + "id": "custom.width", + "value": 122 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 85 + }, + "id": 150, + "interval": "1d", + "maxDataPoints": 30, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": ["sum"], + "countRows": false, + "fields": "" + }, + "sortBy": [ + { + "displayName": "namespace\\Time", + "desc": true + } + ] + }, + "pluginVersion": "11.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (namespace) (increase(rox_central_scan_duration_count[1d]))", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "timeFrom": "$_relativeTime/d", + "timeShift": "$_timeShift/d", + "title": "Scans per Day by Namespace", + "transformations": [ + { + "id": "formatTime", + "options": { + "outputFormat": "YYYY-MM-DD", + "timeField": "Time", + "useTimezone": true + } + }, + { + "id": "groupingToMatrix", + "options": { + "columnField": "Time", + "rowField": "namespace", + "valueField": "Value" + } + } + ], + "type": "table" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 85 + "y": 93 }, "id": 149, "panels": [], @@ -2184,7 +2321,7 @@ spec: "h": 13, "w": 24, "x": 0, - "y": 86 + "y": 94 }, "id": 148, "options": { diff --git a/resources/grafana/sources/.claude/settings.local.json b/resources/grafana/sources/.claude/settings.local.json new file mode 100644 index 0000000..0b8977e --- /dev/null +++ b/resources/grafana/sources/.claude/settings.local.json @@ -0,0 +1,12 @@ +{ + "permissions": { + "allow": [ + "Read(//home/ebenshet/workspaces/rox-34665-grafana-display-scans-per-day/github.com/stackrox/rhacs-observability-resources/**)", + "Bash(jj status *)", + "Bash(jj rebase *)", + "Bash(rm -f resources/grafana/generated/dashboards/new-panel.yaml resources/grafana/sources/.claude/settings.local.json)", + "Bash(rmdir resources/grafana/sources/.claude)", + "Bash(jj commit -m 'ROX-34665: Add Scans per Day by Namespace panel to cluster overview dashboard *)" + ] + } +} diff --git a/resources/grafana/sources/rhacs-cluster-overview.json b/resources/grafana/sources/rhacs-cluster-overview.json index e32f518..03aa681 100644 --- a/resources/grafana/sources/rhacs-cluster-overview.json +++ b/resources/grafana/sources/rhacs-cluster-overview.json @@ -2119,13 +2119,150 @@ ], "type": "table" }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "color": { + "mode": "thresholds" + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "namespace\\namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 236 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "namespace\\Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 232 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "2026-05-08" + }, + "properties": [ + { + "id": "custom.width", + "value": 122 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 85 + }, + "id": 150, + "interval": "1d", + "maxDataPoints": 30, + "options": { + "showHeader": true, + "cellHeight": "sm", + "footer": { + "show": false, + "reducer": ["sum"], + "countRows": false, + "fields": "" + }, + "sortBy": [ + { + "displayName": "namespace\\Time", + "desc": true + } + ] + }, + "pluginVersion": "11.1.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (namespace) (increase(rox_central_scan_duration_count[1d]))", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "timeFrom": "$_relativeTime/d", + "timeShift": "$_timeShift/d", + "title": "Scans per Day by Namespace", + "transformations": [ + { + "id": "formatTime", + "options": { + "outputFormat": "YYYY-MM-DD", + "timeField": "Time", + "useTimezone": true + } + }, + { + "id": "groupingToMatrix", + "options": { + "columnField": "Time", + "rowField": "namespace", + "valueField": "Value" + } + } + ], + "type": "table" + }, { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 85 + "y": 93 }, "id": 149, "panels": [], @@ -2172,7 +2309,7 @@ "h": 13, "w": 24, "x": 0, - "y": 86 + "y": 94 }, "id": 148, "options": {