diff --git a/charts/client/Chart.yaml b/charts/client/Chart.yaml index 82bb2eb8..64bd8688 100644 --- a/charts/client/Chart.yaml +++ b/charts/client/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.4 +version: 0.2.5 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/client/templates/configmap-gitbridge-dashboard.yaml b/charts/client/templates/configmap-gitbridge-dashboard.yaml index 62b374b9..d2917553 100644 --- a/charts/client/templates/configmap-gitbridge-dashboard.yaml +++ b/charts/client/templates/configmap-gitbridge-dashboard.yaml @@ -17,6 +17,12 @@ data: "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] @@ -24,41 +30,318 @@ data: "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 3, - "links": [ - { - "asDropdown": false, - "icon": "external link", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": true, - "title": "JSON Formatter", - "tooltip": "", - "type": "link", - "url": "https://jsonformatter.org/" - } - ], + "id": 8, + "links": [], "liveNow": false, "panels": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of merge request done from all the Git providers", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) AS GitHub FROM default.github\nWHERE EventType = 'pull_request'", + "rawQuery": "SELECT count(*) AS GitHub FROM default.github\nWHERE EventType = 'pull_request'", + "refId": "A", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS GitLab FROM default.gitlab\nWHERE EventType = 'Merge Request Hook'", + "rawQuery": "SELECT count(*) AS GitLab FROM default.gitlab\nWHERE EventType = 'Merge Request Hook'", + "refId": "B", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS BitBucket FROM default.bitbucket\nWHERE EventType = 'pullrequest:fulfilled'", + "rawQuery": "SELECT count(*) AS BitBucket FROM default.bitbucket\nWHERE EventType = 'pullrequest:fulfilled'", + "refId": "C", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Gitea FROM default.gitea\nWHERE EventType = 'pull_request'", + "rawQuery": "SELECT count(*) AS Gitea FROM default.gitea\nWHERE EventType = 'pull_request'", + "refId": "D", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Azure FROM default.azure_devops\nWHERE EventType = 'git.pullrequest.merged'", + "rawQuery": "SELECT count(*) AS Azure FROM default.azure_devops\nWHERE EventType = 'git.pullrequest.merged'", + "refId": "E", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Merge events from all Git providers", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number push events triggered from different Git Providers", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#7c766c", + "mode": "palette-classic" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) AS GitHub FROM default.github\nWHERE EventType = 'push'", + "rawQuery": "SELECT count(*) AS GitHub FROM default.github\nWHERE EventType = 'push'", + "refId": "A", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) Gitlab FROM default.gitlab\nWHERE EventType = 'Push Hook'", + "rawQuery": "SELECT count(*) Gitlab FROM default.gitlab\nWHERE EventType = 'Push Hook'", + "refId": "B", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS GiTea FROM default.gitea\nWHERE EventType = 'push'", + "rawQuery": "SELECT count(*) AS GiTea FROM default.gitea\nWHERE EventType = 'push'", + "refId": "C", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS BitBucket FROM default.bitbucket\nWHERE EventType = 'repo:push'", + "rawQuery": "SELECT count(*) AS BitBucket FROM default.bitbucket\nWHERE EventType = 'repo:push'", + "refId": "D", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Azure FROM default.azure_devops\nWHERE EventType = 'git.push'", + "rawQuery": "SELECT count(*) AS Azure FROM default.azure_devops\nWHERE EventType = 'git.push'", + "refId": "E", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Push Events from all Git Providers", + "transparent": true, + "type": "stat" + }, { "datasource": { "type": "grafana-clickhouse-datasource", "uid": "ClickHouse" }, - "description": "This panel displays all the Git metrics and its providers.", + "description": "The panel displays the count of Push events on Azure by each author. It provides insights into the contribution activity of different authors within the specified repository.", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "#17bcc1", + "mode": "fixed" }, "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "filterable": true, - "inspect": false + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } }, "mappings": [], "thresholds": { @@ -73,30 +356,229 @@ data: "value": 80 } ] - } + }, + "unit": "short" }, "overrides": [] }, "gridPos": { - "h": 15, - "w": 24, + "h": 8, + "w": 12, "x": 0, - "y": 0 + "y": 5 }, - "id": 1, + "id": 36, "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" }, - "showHeader": true + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Azure_Push_Events\nFROM default.azure_devops\nWHERE EventType = 'git.push'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "Azure Push Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of Merge events on Azure by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#17bcc1", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 5 + }, + "id": 34, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Azure_Merge_Events\nFROM default.azure_devops\nWHERE EventType = 'git.pullrequest.merged'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "Azure Merge Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of Push events on BitBucket by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#e8f808", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 28, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 }, - "pluginVersion": "10.0.1", "targets": [ { "datasource": { @@ -112,18 +594,1145 @@ data: } }, "queryType": "sql", - "rawSql": "SELECT event.metrics.commits.timestamp AS TimeStamp,\nevent.metrics.commits.id AS Id,\nevent.metrics.commits.url AS Url,\nevent.metrics.object_kind AS Action,\nevent.repo AS GitProvider,\nevent AS MetaData\nFROM default.git_json", + "rawSql": "SELECT Author, count(*) AS Push_Events\nFROM default.bitbucket\nWHERE EventType = 'repo:push'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "BitBucket Push Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of Merge events on BitBucket by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#e8f808", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 30, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Merge_Events\nFROM default.bitbucket\nWHERE EventType = 'pullrequest:fulfilled'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "BitBucket Merge Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of Push events on GiTea by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#f46565", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 21 + }, + "id": 24, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Push_Events\nFROM default.gitea\nWHERE EventType = 'push'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "GiTea Push Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of Merge events on GiTea by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#f46565", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 21 + }, + "id": 26, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "builderOptions": { + "database": "default", + "fields": [], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [], + "table": "" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "database": "default", + "fields": [], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [], + "table": "" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Merge_Events\nFROM default.gitea\nWHERE EventType = 'pull_request'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "GiTea Merge Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of push events on GitLab by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-blue", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 29 + }, + "id": 20, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Push_Events\nFROM default.gitlab\nWHERE EventType = 'Push Hook'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "GitLab Push Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of merge events on GitLab by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-blue", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 29 + }, + "id": 22, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Merge_Events\nFROM default.gitlab\nWHERE EventType = 'Merge Request Hook'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "GitLab Merge Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of push events on Github by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "left", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 0, + "y": 39 + }, + "id": 16, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Push_Events\nFROM default.github\nWHERE EventType = 'push'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "Github Push Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "The panel displays the count of merge events on Github by each author. It provides insights into the contribution activity of different authors within the specified repository.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 18, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT Author, count(*) AS Merge_Events\nFROM default.github\nWHERE EventType = 'pull_request'\nGROUP BY Author", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "Github Merge Events by Author", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "This panel displays all the events occured in the Azure Procider", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 49 + }, + "id": 14, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "builderOptions": { + "database": "default", + "fields": [ + "Author", + "CommitID", + "CommitUrl", + "EventType", + "RepoName", + "TimeStamp" + ], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [ + { + "dir": "DESC", + "name": "TimeStamp" + } + ], + "table": "azure_devops" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "queryType": "builder", + "rawSql": "SELECT Author, CommitID, CommitUrl, EventType, RepoName, TimeStamp FROM default.\"azure_devops\" ORDER BY TimeStamp DESC LIMIT 100", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "Azure", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "This panel displays all the events occured in the BitBucket Providers", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 56 + }, + "id": 12, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "builderOptions": { + "database": "default", + "fields": [ + "Author", + "CommitID", + "CommitUrl", + "EventType", + "RepoName", + "TimeStamp" + ], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [ + { + "dir": "DESC", + "name": "TimeStamp" + } + ], + "table": "bitbucket" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "queryType": "builder", + "rawSql": "SELECT Author, CommitID, CommitUrl, EventType, RepoName, TimeStamp FROM default.\"bitbucket\" ORDER BY TimeStamp DESC LIMIT 100", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "BitBucket", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "This panel displays all the events occured in the GiTea provider", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 64 + }, + "id": 10, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "builderOptions": { + "database": "default", + "fields": [ + "Author", + "CommitID", + "CommitUrl", + "EventType", + "RepoName", + "TimeStamp" + ], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [ + { + "dir": "DESC", + "name": "TimeStamp" + } + ], + "table": "gitea" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "queryType": "builder", + "rawSql": "SELECT Author, CommitID, CommitUrl, EventType, RepoName, TimeStamp FROM default.\"gitea\" ORDER BY TimeStamp DESC LIMIT 100", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "GiTea", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "This panel displays all the events occured in the GitLab provider.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 73 + }, + "id": 8, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "builderOptions": { + "database": "default", + "fields": [ + "Author", + "CommitID", + "CommitUrl", + "EventType", + "RepoName", + "TimeStamp" + ], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [ + { + "dir": "DESC", + "name": "TimeStamp" + } + ], + "table": "gitlab" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "queryType": "builder", + "rawSql": "SELECT Author, CommitID, CommitUrl, EventType, RepoName, TimeStamp FROM default.\"gitlab\" ORDER BY TimeStamp DESC LIMIT 100", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "GitLab", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "This panel displays all the events occured in the GitHub provider.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 81 + }, + "id": 6, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "builderOptions": { + "database": "default", + "fields": [ + "Author", + "CommitID", + "CommitUrl", + "EventType", + "RepoName", + "TimeStamp" + ], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [ + { + "dir": "DESC", + "name": "TimeStamp" + } + ], + "table": "github" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "queryType": "builder", + "rawSql": "SELECT Author, CommitID, CommitUrl, EventType, RepoName, TimeStamp FROM default.\"github\" ORDER BY TimeStamp DESC LIMIT 100", "refId": "A", "selectedFormat": 1 } ], - "title": "Git Bridge", + "title": "GitHub", "transparent": true, "type": "table" } ], - "refresh": "", - "schemaVersion": 38, + "schemaVersion": 35, "style": "dark", "tags": [], "templating": { @@ -135,9 +1744,9 @@ data: }, "timepicker": {}, "timezone": "", - "title": "Git Bridge", - "uid": "a1885f0a-0f8a-42f5-a4b9-5ac7f2665bc4", - "version": 1, + "title": "GitBridge", + "uid": "u3EJcUqVk", + "version": 15, "weekStart": "" } {{- end }} \ No newline at end of file diff --git a/charts/client/templates/configmap-custom-dashboard.yaml b/charts/client/templates/configmap-kubedata-dashboard.yaml similarity index 100% rename from charts/client/templates/configmap-custom-dashboard.yaml rename to charts/client/templates/configmap-kubedata-dashboard.yaml diff --git a/charts/client/templates/configmap-kubescore-dashboard.yaml b/charts/client/templates/configmap-kubescore-dashboard.yaml new file mode 100644 index 00000000..2f80dd51 --- /dev/null +++ b/charts/client/templates/configmap-kubescore-dashboard.yaml @@ -0,0 +1,131 @@ +{{- if .Values.dashboards.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "client.fullname" . }}-kubescore-dashboard + labels: + {{ .Values.dashboards.label }}: {{ .Values.dashboards.labelValue | quote }} +data: + kubescore.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 10, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the list of recommendations of what you can improve to make your application more secure and resilient.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 15, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT * FROM default.kubescore", + "rawQuery": "SELECT * FROM default.kubescore", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "KubeScore", + "transparent": true, + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 35, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "KubeScore", + "uid": "d8f0fceb-7621-45bc-9710-89e11fe57a79", + "version": 2, + "weekStart": "" + } +{{- end }} \ No newline at end of file diff --git a/charts/client/templates/configmap-kubviz-dashboard.yaml b/charts/client/templates/configmap-kubviz-dashboard.yaml new file mode 100644 index 00000000..888a7ec0 --- /dev/null +++ b/charts/client/templates/configmap-kubviz-dashboard.yaml @@ -0,0 +1,2526 @@ +{{- if .Values.dashboards.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "client.fullname" . }}-kubviz-dashboard + labels: + {{ .Values.dashboards.label }}: {{ .Values.dashboards.labelValue | quote }} +data: + kubviz.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 5, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays all the names of the cluster monitoring the kubernetes events and features", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "lcd-gauge", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 14, + "x": 0, + "y": 0 + }, + "id": 48, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT DISTINCT ClusterName from(SELECT distinct ClusterName FROM default.DeletedAPIs\nUNION ALL\nSELECT DISTINCT ClusterName FROM default.DeprecatedAPIs\n UNION ALL\n SELECT DISTINCT ClusterName FROM default.events\n UNION ALL\n SELECT DISTINCT ClusterName FROM default.getall_resources\n UNION ALL\n SELECT DISTINCT ClusterName FROM default.outdated_images)", + "rawQuery": "SELECT DISTINCT ClusterName from(SELECT distinct ClusterName FROM default.DeletedAPIs\nUNION ALL\nSELECT DISTINCT ClusterName FROM default.DeprecatedAPIs\n UNION ALL\n SELECT DISTINCT ClusterName FROM default.events\n UNION ALL\n SELECT DISTINCT ClusterName FROM default.getall_resources\n UNION ALL\n SELECT DISTINCT ClusterName FROM default.outdated_images)", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Monitoring Clusters", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the which cluster has the highest events.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 10, + "x": 14, + "y": 0 + }, + "id": 52, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/.*/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT ClusterName,count(*) AS Events From default.events\nGROUP BY ClusterName\nORDER BY Events DESC\nLIMIT 1", + "rawQuery": "SELECT ClusterName,count(*) AS Events From default.events\nGROUP BY ClusterName\nORDER BY Events DESC\nLIMIT 1", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Clusters with Most Activity", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of outdated images from all cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "targetBlank": true, + "title": "Outdated Images", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 5, + "x": 0, + "y": 6 + }, + "id": 18, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.outdated_images\nWHERE VersionsBehind > 0", + "rawQuery": "SELECT count(*) FROM default.outdated_images\nWHERE VersionsBehind > 0", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Outdated Images Across All Clusters", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of events from all cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "targetBlank": true, + "title": "Kubedata", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1689917173495&to=1689918073495" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 5, + "x": 5, + "y": 6 + }, + "id": 20, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events", + "rawQuery": "SELECT count(*) FROM default.events", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Events across all Clusters", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of DeletedAPIs from all the cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "targetBlank": true, + "title": "DeletedAPIs", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 5, + "x": 10, + "y": 6 + }, + "id": 22, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.DeletedAPIs", + "rawQuery": "SELECT count(*) FROM default.DeletedAPIs", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of DeletedAPIs across all Clusters", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of DeprecatedAPIs in all cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "targetBlank": true, + "title": "DeprecatedAPIs", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 5, + "x": 15, + "y": 6 + }, + "id": 24, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.DeprecatedAPIs", + "rawQuery": "SELECT count(*) FROM default.DeprecatedAPIs", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of DeprecatedAPIs across all Clusters", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "Thos panel displays the total count of resources running in all kubernetes cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [ + { + "targetBlank": true, + "title": "Kubernetes Resources", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 4, + "x": 20, + "y": 6 + }, + "id": 26, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.getall_resources", + "rawQuery": "SELECT count(*) FROM default.getall_resources", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of k8s_Resources across all Clusters", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count events related to Pod.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#249b6a", + "mode": "fixed" + }, + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 10 + }, + "id": 57, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Pod'", + "rawQuery": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Pod'", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Pod creation events", + "type": "stat" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of pods with Created state.", + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 10 + }, + "id": 63, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Pod' AND Reason IN 'Created'", + "rawQuery": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Pod' AND Reason IN 'Created'", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of pods with Created state", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of pods with backOff state.", + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 10 + }, + "id": 61, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Pod' AND Reason IN 'BackOff'", + "rawQuery": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Pod' AND Reason IN 'BackOff'", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of pods with BackOff state", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of pods with Unhealthy state.", + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 10 + }, + "id": 62, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Pod' AND Reason IN 'Unhealthy'", + "rawQuery": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Pod' AND Reason IN 'Unhealthy'", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of pods with Unhealthy state", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count events related to node.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "#249b6a", + "mode": "fixed" + }, + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 14 + }, + "id": 56, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value" + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Node'", + "rawQuery": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Node'", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Node creation events", + "transparent": true, + "type": "stat" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of nodes which is in not ready state", + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 14 + }, + "id": 58, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Node' AND Reason IN 'NodeNotReady'", + "rawQuery": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Node' AND Reason IN 'NodeNotReady'", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Nodes with NotReady State", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of nodes which is in ready state", + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 14 + }, + "id": 59, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Node' AND Reason IN 'NodeReady'", + "rawQuery": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Node' AND Reason IN 'NodeReady'", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Nodes with Ready State", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of nodes which is in NodeHasNoDiskPressure state", + "fieldConfig": { + "defaults": { + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 14 + }, + "id": 60, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Node' AND Reason IN 'NodeHasNoDiskPressure'", + "rawQuery": "SELECT count(*) FROM default.events\nWHERE Kind IN 'Node' AND Reason IN 'NodeHasNoDiskPressure'", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Nodes with NodeHasNoDiskPressure State", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of events per cluster seperated by namespace.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "gradient-gauge", + "filterable": true + }, + "links": [ + { + "targetBlank": true, + "title": "Kubedata", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1689917173495&to=1689918073495" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "light-yellow", + "value": 80 + }, + { + "color": "light-red", + "value": 150 + }, + { + "color": "semi-dark-red", + "value": 1000 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Namespace" + }, + "properties": [ + { + "id": "custom.width", + "value": 425 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 44, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT ClusterName, Namespace, count(Event) AS Events FROM default.events\nGROUP BY ClusterName,Namespace\nORDER BY Events DESC", + "rawQuery": "SELECT ClusterName, Namespace, count(Event) AS Events FROM default.events\nGROUP BY ClusterName,Namespace\nORDER BY Events DESC", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Events per cluster by Namespace", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number of clusters containing activity uniquely.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "links": [], + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 40, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT COUNT(DISTINCT ClusterName) AS DeletedAPIs\nFROM default.DeletedAPIs", + "rawQuery": "SELECT COUNT(DISTINCT ClusterName) AS DeletedAPIs\nFROM default.DeletedAPIs", + "refId": "A", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT COUNT(DISTINCT ClusterName) AS DeprecatedAPIs\nFROM default.DeprecatedAPIs", + "rawQuery": "SELECT COUNT(DISTINCT ClusterName) AS DeprecatedAPIs\nFROM default.DeprecatedAPIs", + "refId": "B", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(DISTINCT(ClusterName)) AS Events\nFROM default.events", + "rawQuery": "SELECT count(DISTINCT(ClusterName)) AS Events\nFROM default.events", + "refId": "C", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(DISTINCT(ClusterName)) AS OutdatedImages\nFROM default.outdated_images", + "rawQuery": "SELECT count(DISTINCT(ClusterName)) AS OutdatedImages\nFROM default.outdated_images", + "refId": "D", + "round": "0s", + "skip_comments": true + } + ], + "title": "Number of Clusters Containing Activity", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of pods grouped by reason.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "links": [ + { + "targetBlank": true, + "title": "KubeData", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1690551079516&to=1690551979516" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 64, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(Kind) AS Pods,ClusterName, Reason FROM default.events\nWHERE Kind IN 'Pod' \nGROUP BY ClusterName,Reason", + "rawQuery": "SELECT count(Kind) AS Pods,ClusterName, Reason FROM default.events\nWHERE Kind IN 'Pod' \nGROUP BY ClusterName,Reason", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Count of Pods grouped by Reason", + "transparent": true, + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of DeprecatedAPIs for each clusters respectively.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-green", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "links": [ + { + "targetBlank": true, + "title": "DeprecatedAPIs", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 39 + }, + "id": 34, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT ClusterName, count(Deprecated) AS DeprecatedAPIs FROM default.DeprecatedAPIs\nGROUP BY ClusterName", + "rawQuery": "SELECT ClusterName, count(Deprecated) AS DeprecatedAPIs FROM default.DeprecatedAPIs\nGROUP BY ClusterName", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Count of DeprecatedAPIs per cluster", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of DeletedAPIs form each clusters respectively.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-green", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "links": [ + { + "targetBlank": true, + "title": "DeletedAPIs", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 39 + }, + "id": 36, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT ClusterName, count(Deleted) AS DeletedAPIs FROM default.DeletedAPIs\nGROUP BY ClusterName", + "rawQuery": "SELECT ClusterName, count(Deleted) AS DeletedAPIs FROM default.DeletedAPIs\nGROUP BY ClusterName", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Count of DeletedAPIs per cluster", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of outdated images from each cluster respectively.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-green", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Outdated Images", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 48 + }, + "id": 28, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT ClusterName, count(CurrentImage) AS Outdated_Images FROM default.outdated_images\nGROUP BY ClusterName", + "rawQuery": "SELECT ClusterName, count(CurrentImage) AS Outdated_Images FROM default.outdated_images\nGROUP BY ClusterName", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Count of Outdated Images per cluster", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of Events for each cluster respectively", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Kubedata", + "url": "https://grafana.alpha.optimizor.app/d/Qq-FK1rVz/kubedata?orgId=1&from=1689917173495&to=1689918073495" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 48 + }, + "id": 32, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "select ClusterName,count(Id) AS Events from default.events\ngroup by ClusterName", + "rawQuery": "select ClusterName,count(Id) AS Events from default.events\ngroup by ClusterName", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Count of Events per cluster", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of resources for each clusters respectively", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-green", + "mode": "fixed" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "fillOpacity": 80, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineWidth": 1, + "scaleDistribution": { + "type": "linear" + } + }, + "links": [ + { + "targetBlank": true, + "title": "Kubernetes Resources", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 48 + }, + "id": 30, + "options": { + "barRadius": 0.2, + "barWidth": 0.3, + "fullHighlight": false, + "groupWidth": 0.7, + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "orientation": "auto", + "showValue": "always", + "stacking": "none", + "tooltip": { + "mode": "single", + "sort": "none" + }, + "xTickLabelRotation": 0, + "xTickLabelSpacing": 0 + }, + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT ClusterName, count(Resource) AS Resources FROM default.getall_resources\nGROUP BY ClusterName", + "rawQuery": "SELECT ClusterName, count(Resource) AS Resources FROM default.getall_resources\nGROUP BY ClusterName", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Count of Resources per cluster", + "transparent": true, + "type": "barchart" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number resources for each Clusters seperated by Kind.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "gradient-gauge", + "filterable": true + }, + "links": [ + { + "targetBlank": true, + "title": "Kubernetes Resources", + "url": "https://grafana.alpha.optimizor.app/d/o2M7hbrVk/kubviz-features?orgId=1&from=1689896094681&to=1689917694681" + } + ], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "light-yellow", + "value": 100 + }, + { + "color": "semi-dark-red", + "value": 200 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 56 + }, + "id": 42, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT ClusterName, Kind, count(Resource) AS Resources FROM default.getall_resources\nGROUP BY ClusterName,Kind\nORDER BY Resources DESC", + "rawQuery": "SELECT ClusterName, Kind, count(Resource) AS Resources FROM default.getall_resources\nGROUP BY ClusterName,Kind\nORDER BY Resources DESC", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": " Resources per Cluster by Kind", + "transparent": true, + "type": "table" + }, + { + "collapsed": true, + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 63 + }, + "id": 16, + "panels": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays all the resources running in the kubernetes cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 16, + "w": 24, + "x": 0, + "y": 217 + }, + "id": 14, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT * FROM default.getall_resources", + "rawQuery": "SELECT * FROM default.getall_resources", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Kubernetes Resources", + "transparent": true, + "type": "table" + } + ], + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "refId": "A" + } + ], + "title": "Kubernetes Resources", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 64 + }, + "id": 12, + "panels": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays all the out-of-date images from the cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 10 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 16, + "w": 24, + "x": 0, + "y": 218 + }, + "id": 10, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT * FROM default.outdated_images\nWHERE VersionsBehind > 0", + "rawQuery": "SELECT * FROM default.outdated_images\nWHERE VersionsBehind > 0", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Outdated Images", + "transparent": true, + "type": "table" + } + ], + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "refId": "A" + } + ], + "title": "Outdated Images", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 65 + }, + "id": 8, + "panels": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays all the DeletedAPIs from the cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 219 + }, + "id": 6, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT * FROM default.DeletedAPIs", + "rawQuery": "SELECT * FROM default.DeletedAPIs", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "DeletedAPIs", + "transparent": true, + "type": "table" + } + ], + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "refId": "A" + } + ], + "title": "DeletedAPIs", + "type": "row" + }, + { + "collapsed": true, + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 66 + }, + "id": 4, + "panels": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays all the DeprecatedAPIs from the cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 220 + }, + "id": 2, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "9.3.2", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT * FROM default.DeprecatedAPIs", + "rawQuery": "SELECT * FROM default.DeprecatedAPIs", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "DeprecatedAPIs", + "transparent": true, + "type": "table" + } + ], + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "refId": "A" + } + ], + "title": "DeprecatedAPIs", + "type": "row" + } + ], + "refresh": "", + "schemaVersion": 35, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Kubviz Dashboard", + "uid": "eT4fox94z", + "version": 8, + "weekStart": "" + } +{{- end }} \ No newline at end of file diff --git a/charts/client/templates/configmap-trivy-dashboard.yaml b/charts/client/templates/configmap-trivy-dashboard.yaml new file mode 100644 index 00000000..9e3c1921 --- /dev/null +++ b/charts/client/templates/configmap-trivy-dashboard.yaml @@ -0,0 +1,1166 @@ +{{- if .Values.dashboards.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "client.fullname" . }}-trivy-dashboard + labels: + {{ .Values.dashboards.label }}: {{ .Values.dashboards.labelValue | quote }} +data: + trivy.json: |- + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 6, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel illustrates the distribution of vulnerability severities across different clusters. It provides an overview of the count of vulnerabilities categorized by severity levels within each cluster.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 20, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT cluster_name, vul_severity, count(*) \nFROM default.trivy_vul\nGROUP BY cluster_name, vul_severity", + "rawQuery": "SELECT cluster_name, vul_severity, count(*) \nFROM default.trivy_vul\nGROUP BY cluster_name, vul_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Severity counts grouped by Cluster", + "transparent": true, + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel illustrates the distribution of misconfiguration severities across different clusters. It provides an overview of the count of misconfigurations categorized by severity levels within each cluster. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 22, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT cluster_name, misconfig_severity, count(*)\nFROM default.trivy_misconfig\nGROUP BY cluster_name, misconfig_severity", + "rawQuery": "SELECT cluster_name, misconfig_severity, count(*)\nFROM default.trivy_misconfig\nGROUP BY cluster_name, misconfig_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Severity counts grouped by Cluster", + "transparent": true, + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total of misconfigurations from each clusters.", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 16, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT cluster_name, count(*) FROM default.trivy_misconfig\nGROUP BY cluster_name", + "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_misconfig\nGROUP BY cluster_name", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Count by Cluster", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number Vulnerabilities under each namespace", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 18, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT cluster_name, count(*) FROM default.trivy_vul\nGROUP BY cluster_name", + "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_vul\nGROUP BY cluster_name", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Count by Cluster", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel provides a count of critical vulnerabilities categorized by namespace. It helps to monitor and prioritize critical security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 12, + "options": { + "displayMode": "basic", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT cluster_name, namespace, count(vul_severity) AS Critical_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace\n", + "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Critical_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Critical Vulnerability Count by Namespace and ClusterName", + "transparent": true, + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel provides a count of critical misconfigurations categorized by namespace. It helps to monitor and prioritize critical security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 14, + "options": { + "displayMode": "basic", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "interval": "", + "intervalFactor": 1, + "query": "SELECT cluster_name, namespace, count(misconfig_severity) AS Critical_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace\n", + "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Critical_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Critical Misconfiguration Count by Namespace and ClusterName", + "transparent": true, + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of Misconfiguration severity for each level", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 8, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) AS High_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'HIGH'", + "rawQuery": "SELECT count(*) AS High_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'HIGH'", + "refId": "A", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'MEDIUM'", + "rawQuery": "SELECT count(*) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'MEDIUM'", + "refId": "B", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'LOW'", + "rawQuery": "SELECT count(*) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'LOW'", + "refId": "C", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Critical_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'CRITICAL'", + "rawQuery": "SELECT count(*) AS Critical_Severity\nFROM default.trivy_misconfig\nWHERE misconfig_severity = 'CRITICAL'", + "refId": "D", + "round": "0s", + "skip_comments": true + } + ], + "title": "Count of Misconfiguration Severity Level", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total count of Vulnerability severity for each level", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 20 + }, + "id": 10, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT count(*) AS High_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'HIGH'", + "rawQuery": "SELECT count(*) AS High_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'HIGH'", + "refId": "A", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Medium_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'MEDIUM'", + "rawQuery": "SELECT count(*) AS Medium_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'MEDIUM'", + "refId": "B", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Low_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'LOW'", + "rawQuery": "SELECT count(*) AS Low_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'LOW'", + "refId": "C", + "round": "0s", + "skip_comments": true + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "hide": false, + "intervalFactor": 1, + "query": "SELECT count(*) AS Critical_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'CRITICAL'", + "rawQuery": "SELECT count(*) AS Critical_Severity\nFROM default.trivy_vul\nWHERE vul_severity = 'CRITICAL'", + "refId": "D", + "round": "0s", + "skip_comments": true + } + ], + "title": "Count of Vulnereability Severity level", + "transparent": true, + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the count of Misconfigurations in different clusters and namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 26 + }, + "id": 4, + "options": { + "displayMode": "lcd", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT cluster_name, namespace, count(*) AS Misconfigurations\nFROM default.trivy_misconfig\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(*) AS Misconfigurations\nFROM default.trivy_misconfig\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Count by Cluster and Namespace", + "transparent": true, + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the count of vulnerabilities in different clusters and namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 26 + }, + "id": 6, + "options": { + "displayMode": "lcd", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "dateTimeType": "DATETIME", + "extrapolate": true, + "format": "table", + "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t", + "intervalFactor": 1, + "query": "SELECT cluster_name, namespace, count(*) AS Vulnerabilities\nFROM default.trivy_vul\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(*) AS Vulnerabilities\nFROM default.trivy_vul\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Count by Cluster and Namespace", + "transparent": true, + "type": "bargauge" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 2, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "builderOptions": { + "database": "default", + "fields": [ + "cluster_name", + "namespace", + "kind", + "name", + "vul_id", + "vul_vendor_ids", + "vul_pkg_id", + "vul_pkg_name", + "vul_pkg_path", + "vul_installed_version", + "vul_fixed_version", + "vul_title", + "vul_severity", + "vul_published_date", + "vul_last_modified_date" + ], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [], + "table": "trivy_vul" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "queryType": "builder", + "rawSql": "SELECT cluster_name, namespace, kind, name, vul_id, vul_vendor_ids, vul_pkg_id, vul_pkg_name, vul_pkg_path, vul_installed_version, vul_fixed_version, vul_title, vul_severity, vul_published_date, vul_last_modified_date FROM default.\"trivy_vul\" LIMIT 100", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "Trivy Vulnerabilities", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 42 + }, + "id": 1, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "builderOptions": { + "database": "default", + "fields": [ + "cluster_name", + "namespace", + "kind", + "name", + "misconfig_id", + "misconfig_avdid", + "misconfig_type", + "misconfig_title", + "misconfig_desc", + "misconfig_msg", + "misconfig_query", + "misconfig_resolution", + "misconfig_severity", + "misconfig_status" + ], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [], + "table": "trivy_misconfig" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "queryType": "builder", + "rawSql": "SELECT cluster_name, namespace, kind, name, misconfig_id, misconfig_avdid, misconfig_type, misconfig_title, misconfig_desc, misconfig_msg, misconfig_query, misconfig_resolution, misconfig_severity, misconfig_status FROM default.\"trivy_misconfig\" LIMIT 100", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "Trivy Misconfiguration", + "transparent": true, + "type": "table" + }, + { + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "displayMode": "color-text", + "filterable": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 52 + }, + "id": 24, + "options": { + "footer": { + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "8.4.6", + "targets": [ + { + "builderOptions": { + "0": "T", + "1": "h", + "2": "e", + "3": " ", + "4": "q", + "5": "u", + "6": "e", + "7": "r", + "8": "y", + "9": " ", + "10": "i", + "11": "s", + "12": " ", + "13": "n", + "14": "o", + "15": "t", + "16": " ", + "17": "a", + "18": " ", + "19": "s", + "20": "e", + "21": "l", + "22": "e", + "23": "c", + "24": "t", + "25": " ", + "26": "s", + "27": "t", + "28": "a", + "29": "t", + "30": "e", + "31": "m", + "32": "e", + "33": "n", + "34": "t", + "35": ".", + "database": "default", + "fields": [ + "cluster_name", + "artifact_name", + "vul_id", + "vul_pkg_id", + "vul_pkg_name", + "vul_installed_version", + "vul_fixed_version", + "vul_title", + "vul_severity", + "vul_published_date", + "vul_last_modified_date" + ], + "filters": [], + "limit": 100, + "mode": "list", + "orderBy": [], + "table": "trivyimage" + }, + "datasource": { + "type": "grafana-clickhouse-datasource", + "uid": "ClickHouse" + }, + "format": 1, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "builder", + "rawSql": "SELECT cluster_name, artifact_name, vul_id, vul_pkg_id, vul_pkg_name, vul_installed_version, vul_fixed_version, vul_title, vul_severity, vul_published_date, vul_last_modified_date FROM default.\"trivyimage\" LIMIT 100", + "refId": "A", + "selectedFormat": 1 + } + ], + "title": "Trivy Image", + "transparent": true, + "type": "table" + } + ], + "refresh": "", + "schemaVersion": 35, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Trivy", + "uid": "f9b0a865-f419-410a-b7d9-9a3f79a70d47", + "version": 15, + "weekStart": "" + } +{{- end }} \ No newline at end of file