From 030cf44d581f440087c655cd28c7716b2b637edc Mon Sep 17 00:00:00 2001 From: ahinvinith Date: Fri, 15 Mar 2024 10:23:47 +0530 Subject: [PATCH] New trivy dashboard JSON --- charts/client/Chart.yaml | 2 +- .../templates/configmap-trivy-dashboard.yaml | 2446 ++++++++++++----- grafana/trivy-dashboard.json | 2446 ++++++++++++----- 3 files changed, 3401 insertions(+), 1493 deletions(-) diff --git a/charts/client/Chart.yaml b/charts/client/Chart.yaml index ebc9d780..4baa724f 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: 1.1.19 +version: 1.1.20 # 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-trivy-dashboard.yaml b/charts/client/templates/configmap-trivy-dashboard.yaml index 8589def1..d762bc19 100644 --- a/charts/client/templates/configmap-trivy-dashboard.yaml +++ b/charts/client/templates/configmap-trivy-dashboard.yaml @@ -32,141 +32,39 @@ data: "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 170, + "id": 106, "links": [], "liveNow": false, "panels": [ { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "{{ .Values.datasources.uid }}" - }, "gridPos": { - "h": 8, - "w": 12, + "h": 1, + "w": 24, "x": 0, "y": 0 }, - "id": 36, - "options": { - "baidu": { - "callback": "bmapReady", - "key": "" - }, - "editor": { - "format": "auto", - "height": 600 - }, - "gaode": { - "key": "", - "plugin": "AMap.Scale,AMap.ToolBar" - }, - "getOption": "let severity = [];\nlet counts = [];\n\ndata.series.map((s) => {\n severity = s.fields.find((f) => f.name === 'vul_severity').values;\n counts = s.fields.find((f) => f.name === 'total_count').values;\n});\n\n// Create an empty array to store pie chart data\nconst pieChartData = [];\n\n// Define colors for pie slices\nconst pieSliceColors = ['#235894', '#FF0000', '#00FF00', '#FFFF00', '#FFA500'];\n\n// Map severity and counts to pie chart data\nseverity.forEach((sev, index) => {\n pieChartData.push({\n value: counts[index],\n name: sev,\n itemStyle: {\n opacity: 0.7,\n color: pieSliceColors[index % pieSliceColors.length],\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n });\n});\n\nreturn {\n backgroundColor: '#FFFFFF', // Set the background color to white\n tooltip: {},\n series: [\n {\n name: 'pie',\n type: 'pie',\n selectedMode: 'single',\n selectedOffset: 30,\n clockwise: true,\n label: {\n fontSize: 18,\n color: '#235894',\n },\n labelLine: {\n lineStyle: {\n color: '#235894',\n },\n },\n data: pieChartData, // Use the modified pie chart data\n itemStyle: {\n opacity: 0.7,\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n },\n ],\n};", - "google": { - "callback": "gmapReady", - "key": "" - }, - "map": "none", - "renderer": "canvas", - "themeEditor": { - "config": "{}", - "height": 400, - "name": "default" - } - }, - "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 vul_severity, count(*) AS total_count\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY vul_severity", - "rawQuery": "SELECT vul_severity, count(*) AS total_count\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694438766) AND vul_last_modified_date <= toDateTime(1694611566)\nGROUP BY vul_severity", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Vulnerability Severity Distribution", - "type": "volkovlabs-echarts-panel" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "{{ .Values.datasources.uid }}" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 37, - "options": { - "baidu": { - "callback": "bmapReady", - "key": "" - }, - "editor": { - "format": "auto", - "height": 600 - }, - "gaode": { - "key": "", - "plugin": "AMap.Scale,AMap.ToolBar" - }, - "getOption": "let severity = [];\nlet counts = [];\n\ndata.series.map((s) => {\n severity = s.fields.find((f) => f.name === 'misconfig_severity').values;\n counts = s.fields.find((f) => f.name === 'total_count').values;\n});\n\n// Create an empty array to store pie chart data\nconst pieChartData = [];\n\n// Define colors for pie slices\nconst pieSliceColors = ['#235894', '#FF0000', '#00FF00', '#FFFF00', '#FFA500'];\n\n// Map severity and counts to pie chart data\nseverity.forEach((sev, index) => {\n pieChartData.push({\n value: counts[index],\n name: sev,\n itemStyle: {\n opacity: 0.7,\n color: pieSliceColors[index % pieSliceColors.length],\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n });\n});\n\nreturn {\n backgroundColor: '#FFFFFF', // Set the background color to white\n tooltip: {},\n series: [\n {\n name: 'pie',\n type: 'pie',\n selectedMode: 'single',\n selectedOffset: 30,\n clockwise: true,\n label: {\n fontSize: 18,\n color: '#235894',\n },\n labelLine: {\n lineStyle: {\n color: '#235894',\n },\n },\n data: pieChartData, // Use the modified pie chart data\n itemStyle: {\n opacity: 0.7,\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n },\n ],\n};", - "google": { - "callback": "gmapReady", - "key": "" - }, - "map": "none", - "renderer": "canvas", - "themeEditor": { - "config": "{}", - "height": 400, - "name": "default" - } - }, - "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 misconfig_severity, count(*) AS total_count\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY misconfig_severity", - "rawQuery": "SELECT misconfig_severity, count(*) AS total_count\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694438912) AND EventTime <= toDateTime(1694611712)\nGROUP BY misconfig_severity", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Misconfiguration Severity Distribution", - "type": "volkovlabs-echarts-panel" + "id": 49, + "title": "Image Vulnerability and SBOM", + "type": "row" }, { "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" + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { "mode": "absolute", "steps": [ @@ -174,34 +72,65 @@ data: "color": "green", "value": null }, + { + "color": "semi-dark-yellow", + "value": 10 + }, + { + "color": "orange", + "value": 25 + }, { "color": "red", - "value": 80 + "value": 50 + }, + { + "color": "semi-dark-red", + "value": 100 + }, + { + "color": "dark-red", + "value": 1000 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Counts" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 1 }, - "id": 20, + "id": 47, "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -215,29 +144,34 @@ data: "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name, vul_severity", - "rawQuery": "SELECT cluster_name, vul_severity, count(*) \nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155614) AND vul_last_modified_date <= toDateTime(1694242014)\nGROUP BY cluster_name, vul_severity", + "query": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'LOW'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", + "rawQuery": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'LOW'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Vulnerability Severity counts grouped by Cluster", - "type": "bargauge" + "title": "Highest Vulnerability Images with Low Severity", + "type": "table" }, { "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" + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { "mode": "absolute", "steps": [ @@ -245,34 +179,65 @@ data: "color": "green", "value": null }, + { + "color": "semi-dark-yellow", + "value": 10 + }, + { + "color": "orange", + "value": 25 + }, { "color": "red", - "value": 80 + "value": 50 + }, + { + "color": "semi-dark-red", + "value": 100 + }, + { + "color": "dark-red", + "value": 1000 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Counts" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 1 }, - "id": 22, + "id": 48, "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -286,62 +251,100 @@ data: "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name, misconfig_severity", - "rawQuery": "SELECT cluster_name, misconfig_severity, count(*)\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156239) AND EventTime <= toDateTime(1694242639)\nGROUP BY cluster_name, misconfig_severity", + "query": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'HIGH'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", + "rawQuery": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'HIGH'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Misconfiguration Severity counts grouped by Cluster", - "type": "bargauge" + "title": "Highest Vulnerability Images with High Severity", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "{{ .Values.datasources.uid }}" }, - "description": "This panel displays the total number Vulnerabilities under each namespace", "fieldConfig": { "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { - "mode": "percentage", + "mode": "absolute", "steps": [ { "color": "green", "value": null }, + { + "color": "semi-dark-yellow", + "value": 10 + }, { "color": "orange", - "value": 70 + "value": 25 }, { "color": "red", - "value": 85 + "value": 50 + }, + { + "color": "semi-dark-red", + "value": 100 + }, + { + "color": "dark-red", + "value": 1000 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Counts" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { - "h": 5, + "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 9 }, - "id": 18, + "id": 45, "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -355,62 +358,100 @@ data: "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name", - "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155665) AND vul_last_modified_date <= toDateTime(1694242065)\nGROUP BY cluster_name", + "query": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'MEDIUM'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", + "rawQuery": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'MEDIUM'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Vulnerability Count by Cluster", - "type": "gauge" + "title": "Highest Vulnerability Images with Medium Severity", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "{{ .Values.datasources.uid }}" }, - "description": "This panel displays the total of misconfigurations from each clusters.", "fieldConfig": { "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { - "mode": "percentage", + "mode": "absolute", "steps": [ { "color": "green", "value": null }, + { + "color": "semi-dark-yellow", + "value": 10 + }, { "color": "orange", - "value": 70 + "value": 25 }, { "color": "red", - "value": 85 + "value": 50 + }, + { + "color": "semi-dark-red", + "value": 100 + }, + { + "color": "dark-red", + "value": 1000 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Counts" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { - "h": 5, + "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 9 }, - "id": 16, + "id": 46, "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -424,64 +465,81 @@ data: "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name", - "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156266) AND EventTime <= toDateTime(1694242666)\nGROUP BY cluster_name", + "query": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'CRITICAL'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", + "rawQuery": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'CRITICAL'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Misconfiguration Count by Cluster", - "type": "gauge" + "title": "Highest Vulnerability Images with Critical Severity", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "{{ .Values.datasources.uid }}" }, - "description": "This panel provides a count of high vulnerabilities categorized by namespace. It helps to monitor and prioritize high security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "light-blue", "value": null - }, - { - "color": "red", - "value": 80 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "vul_severity" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "basic", + "type": "color-background" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 21 + "y": 17 }, - "id": 29, + "id": 43, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -495,64 +553,81 @@ data: "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 High_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'HIGH'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS High_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155706) AND vul_last_modified_date <= toDateTime(1694242106) AND vul_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "query": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'LOW'", + "rawQuery": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'LOW'", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "High Vulnerability Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Low Vulnerability Images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "{{ .Values.datasources.uid }}" }, - "description": "This panel provides a count of high misconfigurations categorized by namespace. It helps to monitor and prioritize high security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "vul_severity" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "basic", + "type": "color-background" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 21 + "y": 17 }, - "id": 30, + "id": 44, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -566,64 +641,81 @@ data: "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(misconfig_severity) AS High_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'HIGH'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS High_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156303) AND EventTime <= toDateTime(1694242703) AND misconfig_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "query": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'MEDIUM'", + "rawQuery": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'MEDIUM'", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "High Misconfiguration Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Medium Vulnerability Images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "{{ .Values.datasources.uid }}" }, - "description": "This panel provides a count of Low vulnerabilities categorized by namespace. It helps to monitor and prioritize Low security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "super-light-orange", "value": null - }, - { - "color": "red", - "value": 80 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "vul_severity" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "basic", + "type": "color-background" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 28 + "y": 25 }, - "id": 27, + "id": 41, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -637,64 +729,81 @@ data: "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 Low_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'LOW'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Low_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155745) AND vul_last_modified_date <= toDateTime(1694242145) AND vul_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "query": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'HIGH'", + "rawQuery": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'HIGH'", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Low Vulnerability Count by Namespace and ClusterName", - "type": "bargauge" + "title": "High Vulnerability Images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "{{ .Values.datasources.uid }}" }, - "description": "This panel provides a count of low misconfigurations categorized by namespace. It helps to monitor and prioritize low security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { "mode": "absolute", "steps": [ - { - "color": "green", - "value": null - }, { "color": "red", - "value": 80 + "value": null } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "vul_severity" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "basic", + "type": "color-background" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 28 + "y": 25 }, - "id": 28, + "id": 42, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -708,29 +817,35 @@ data: "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(misconfig_severity) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'LOW'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156331) AND EventTime <= toDateTime(1694242731) AND misconfig_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "query": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'CRITICAL'", + "rawQuery": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'CRITICAL'", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Low Misconfiguration Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Critical Vulnerability Images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "{{ .Values.datasources.uid }}" }, - "description": "This panel provides a count of Medium vulnerabilities categorized by namespace. It helps to monitor and prioritize Medium security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { "mode": "absolute", "steps": [ @@ -748,24 +863,23 @@ data: "overrides": [] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 33 }, - "id": 25, + "id": 39, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -779,29 +893,32 @@ data: "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 Medium_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Medium_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155776) AND vul_last_modified_date <= toDateTime(1694242176) AND vul_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "query": "SELECT image_name, package_name, count(*) AS duplicates\nFROM default.trivysbom\nGROUP BY image_name,package_name\nHAVING count(*) > 1", + "rawQuery": "SELECT image_name, package_name, count(*) AS duplicates\nFROM default.trivysbom\nGROUP BY image_name,package_name\nHAVING count(*) > 1", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Medium Vulnerability Count by Namespace and ClusterName", - "type": "bargauge" + "title": "duplicate package for sbom images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "{{ .Values.datasources.uid }}" }, - "description": "This panel provides a count of medium misconfigurations categorized by namespace. It helps to monitor and prioritize medium security issues across different namespaces.", "fieldConfig": { "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { "mode": "absolute", "steps": [ @@ -816,27 +933,42 @@ data: ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "images" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 33 }, - "id": 26, + "id": 40, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -850,39 +982,42 @@ data: "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(misconfig_severity) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156357) AND EventTime <= toDateTime(1694242757) AND misconfig_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "query": "SELECT vul_id, count(artifact_name) AS images\nFROM default.trivyimage\nGROUP BY vul_id", + "rawQuery": "SELECT vul_id, count(artifact_name) AS images\nFROM default.trivyimage\nGROUP BY vul_id", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Medium Misconfiguration Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Count of images across Vulnerability Id", + "type": "table" }, { "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" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", + "noValue": "Trivy Image not available", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] } @@ -890,24 +1025,23 @@ data: "overrides": [] }, "gridPos": { - "h": 7, - "w": 12, + "h": 8, + "w": 24, "x": 0, - "y": 42 + "y": 41 }, - "id": 12, + "id": 34, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -921,39 +1055,42 @@ data: "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 $timeFilterByColumn(vul_last_modified_date) AND 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_last_modified_date >= toDateTime(1694156016) AND vul_last_modified_date <= toDateTime(1694242416) AND vul_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "query": "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\" \nFROM \"default\".\"trivyimage\"\nWHERE $timeFilterByColumn(vul_last_modified_date)\nORDER BY vul_last_modified_date DESC", + "rawQuery": "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\" \nFROM \"default\".\"trivyimage\"\nWHERE vul_last_modified_date >= toDateTime(1693581675) AND vul_last_modified_date <= toDateTime(1694186475)\nORDER BY vul_last_modified_date DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Critical Vulnerability Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Trivy Image", + "type": "table" }, { "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" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", + "noValue": "Trivy SBOM not available", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] } @@ -961,24 +1098,23 @@ data: "overrides": [] }, "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 42 + "h": 8, + "w": 24, + "x": 0, + "y": 49 }, - "id": 14, + "id": 35, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -991,451 +1127,1269 @@ data: "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 $timeFilterByColumn(EventTime) AND 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 EventTime >= toDateTime(1694156383) AND EventTime <= toDateTime(1694242783) AND misconfig_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "query": "SELECT * FROM default.trivysbom", + "rawQuery": "SELECT * FROM default.trivysbom", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Critical Misconfiguration Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Trivy_SBOM", + "type": "table" }, { - "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": [], - "noValue": "Trivy Vulnerabilities Not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, + "collapsed": true, "gridPos": { - "h": 8, - "w": 12, + "h": 1, + "w": 24, "x": 0, - "y": 49 - }, - "id": 6, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": true - }, - "showUnfilled": true, - "valueMode": "color" + "y": 57 }, - "pluginVersion": "10.0.3", - "targets": [ + "id": 38, + "panels": [ { "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(*) AS Vulnerabilities\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694156175) AND vul_last_modified_date <= toDateTime(1694242575)\nGROUP BY cluster_name, namespace", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Vulnerability Count by Cluster and Namespace", - "type": "bargauge" - }, - { - "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" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 97 }, - "mappings": [], - "noValue": "Trivy Misconfigurations not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "id": 36, + "options": { + "baidu": { + "callback": "bmapReady", + "key": "" + }, + "editor": { + "format": "auto", + "height": 600 + }, + "gaode": { + "key": "", + "plugin": "AMap.Scale,AMap.ToolBar" + }, + "getOption": "let severity = [];\nlet counts = [];\n\ndata.series.map((s) => {\n severity = s.fields.find((f) => f.name === 'vul_severity').values;\n counts = s.fields.find((f) => f.name === 'total_count').values;\n});\n\n// Create an empty array to store pie chart data\nconst pieChartData = [];\n\n// Define colors for pie slices\nconst pieSliceColors = ['#235894', '#FF0000', '#00FF00', '#FFFF00', '#FFA500'];\n\n// Map severity and counts to pie chart data\nseverity.forEach((sev, index) => {\n pieChartData.push({\n value: counts[index],\n name: sev,\n itemStyle: {\n opacity: 0.7,\n color: pieSliceColors[index % pieSliceColors.length],\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n });\n});\n\nreturn {\n backgroundColor: '#FFFFFF', // Set the background color to white\n tooltip: {},\n series: [\n {\n name: 'pie',\n type: 'pie',\n selectedMode: 'single',\n selectedOffset: 30,\n clockwise: true,\n label: {\n fontSize: 18,\n color: '#235894',\n },\n labelLine: {\n lineStyle: {\n color: '#235894',\n },\n },\n data: pieChartData, // Use the modified pie chart data\n itemStyle: {\n opacity: 0.7,\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n },\n ],\n};", + "google": { + "callback": "gmapReady", + "key": "" + }, + "map": "none", + "renderer": "canvas", + "themeEditor": { + "config": "{}", + "height": 400, + "name": "default" + } + }, + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" }, - { - "color": "red", - "value": 80 - } - ] - } + "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 vul_severity, count(*) AS total_count\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY vul_severity", + "rawQuery": "SELECT vul_severity, count(*) AS total_count\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694438766) AND vul_last_modified_date <= toDateTime(1694611566)\nGROUP BY vul_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Severity Distribution", + "type": "volkovlabs-echarts-panel" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 49 - }, - "id": 4, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": true + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 97 + }, + "id": 37, + "options": { + "baidu": { + "callback": "bmapReady", + "key": "" + }, + "editor": { + "format": "auto", + "height": 600 + }, + "gaode": { + "key": "", + "plugin": "AMap.Scale,AMap.ToolBar" + }, + "getOption": "let severity = [];\nlet counts = [];\n\ndata.series.map((s) => {\n severity = s.fields.find((f) => f.name === 'misconfig_severity').values;\n counts = s.fields.find((f) => f.name === 'total_count').values;\n});\n\n// Create an empty array to store pie chart data\nconst pieChartData = [];\n\n// Define colors for pie slices\nconst pieSliceColors = ['#235894', '#FF0000', '#00FF00', '#FFFF00', '#FFA500'];\n\n// Map severity and counts to pie chart data\nseverity.forEach((sev, index) => {\n pieChartData.push({\n value: counts[index],\n name: sev,\n itemStyle: {\n opacity: 0.7,\n color: pieSliceColors[index % pieSliceColors.length],\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n });\n});\n\nreturn {\n backgroundColor: '#FFFFFF', // Set the background color to white\n tooltip: {},\n series: [\n {\n name: 'pie',\n type: 'pie',\n selectedMode: 'single',\n selectedOffset: 30,\n clockwise: true,\n label: {\n fontSize: 18,\n color: '#235894',\n },\n labelLine: {\n lineStyle: {\n color: '#235894',\n },\n },\n data: pieChartData, // Use the modified pie chart data\n itemStyle: {\n opacity: 0.7,\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n },\n ],\n};", + "google": { + "callback": "gmapReady", + "key": "" + }, + "map": "none", + "renderer": "canvas", + "themeEditor": { + "config": "{}", + "height": 400, + "name": "default" + } + }, + "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 misconfig_severity, count(*) AS total_count\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY misconfig_severity", + "rawQuery": "SELECT misconfig_severity, count(*) AS total_count\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694438912) AND EventTime <= toDateTime(1694611712)\nGROUP BY misconfig_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Severity Distribution", + "type": "volkovlabs-echarts-panel" }, - "showUnfilled": true, - "valueMode": "color" - }, - "pluginVersion": "10.0.3", - "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(*) AS Misconfigurations\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156545) AND EventTime <= toDateTime(1694242945)\nGROUP BY cluster_name, namespace", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Misconfiguration Count by Cluster and Namespace", - "type": "bargauge" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "{{ .Values.datasources.uid }}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "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": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 105 + }, + "id": 20, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true }, - "filterable": true, - "inspect": false + "showUnfilled": true, + "valueMode": "color" }, - "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name, vul_severity", + "rawQuery": "SELECT cluster_name, vul_severity, count(*) \nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155614) AND vul_last_modified_date <= toDateTime(1694242014)\nGROUP BY cluster_name, vul_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Severity counts grouped by Cluster", + "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": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ] - } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 105 + }, + "id": 22, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name, misconfig_severity", + "rawQuery": "SELECT cluster_name, misconfig_severity, count(*)\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156239) AND EventTime <= toDateTime(1694242639)\nGROUP BY cluster_name, misconfig_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Severity counts grouped by Cluster", + "type": "bargauge" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 57 - }, - "id": 32, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel displays the total number Vulnerabilities under each namespace", + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 113 + }, + "id": 18, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.0.3", + "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name", + "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155665) AND vul_last_modified_date <= toDateTime(1694242065)\nGROUP BY cluster_name", + "refId": "A", + "round": "0s", + "skip_comments": true + } ], - "show": false + "title": "Vulnerability Count by Cluster", + "type": "gauge" }, - "showHeader": true - }, - "pluginVersion": "10.0.3", - "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\", \"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\" \nFROM \"default\".\"trivy_vul\"\nWHERE $timeFilterByColumn(vul_last_modified_date)\nORDER BY vul_last_modified_date DESC", - "rawQuery": "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\" \nFROM \"default\".\"trivy_vul\"\nWHERE vul_last_modified_date >= toDateTime(1694099993) AND vul_last_modified_date <= toDateTime(1694186393)\nORDER BY vul_last_modified_date DESC", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Trivy Vulnerabilities", - "type": "table" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "{{ .Values.datasources.uid }}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "This panel displays the total of misconfigurations from each clusters.", + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 113 + }, + "id": 16, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true }, - "filterable": true, - "inspect": false + "showThresholdLabels": false, + "showThresholdMarkers": true }, - "mappings": [], - "noValue": "Trivy Misconfigurations not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name", + "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156266) AND EventTime <= toDateTime(1694242666)\nGROUP BY cluster_name", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Count by Cluster", + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel provides a count of high vulnerabilities categorized by namespace. It helps to monitor and prioritize high security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ] - } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 118 + }, + "id": 29, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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 High_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS High_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155706) AND vul_last_modified_date <= toDateTime(1694242106) AND vul_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "High Vulnerability Count by Namespace and ClusterName", + "type": "bargauge" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 65 - }, - "id": 33, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel provides a count of high misconfigurations categorized by namespace. It helps to monitor and prioritize high security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 118 + }, + "id": 30, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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(misconfig_severity) AS High_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS High_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156303) AND EventTime <= toDateTime(1694242703) AND misconfig_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } ], - "show": false + "title": "High Misconfiguration Count by Namespace and ClusterName", + "type": "bargauge" }, - "showHeader": true - }, - "pluginVersion": "10.0.3", - "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\", \"EventTime\", \"namespace\", \"kind\", \"name\", \"misconfig_id\", \"misconfig_avdid\", \"misconfig_type\", \"misconfig_title\", \"misconfig_desc\", \"misconfig_msg\", \"misconfig_query\", \"misconfig_resolution\", \"misconfig_severity\", \"misconfig_status\" \nFROM \"default\".\"trivy_misconfig\"\nWHERE $timeFilterByColumn(EventTime)\nORDER BY EventTime DESC", - "rawQuery": "SELECT \"cluster_name\", \"EventTime\", \"namespace\", \"kind\", \"name\", \"misconfig_id\", \"misconfig_avdid\", \"misconfig_type\", \"misconfig_title\", \"misconfig_desc\", \"misconfig_msg\", \"misconfig_query\", \"misconfig_resolution\", \"misconfig_severity\", \"misconfig_status\" \nFROM \"default\".\"trivy_misconfig\"\nWHERE EventTime >= toDateTime(1694966455) AND EventTime <= toDateTime(1695052855)\nORDER BY EventTime DESC", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Trivy Misconfiguration", - "type": "table" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "{{ .Values.datasources.uid }}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "This panel provides a count of Low vulnerabilities categorized by namespace. It helps to monitor and prioritize Low security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 125 + }, + "id": 27, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true }, - "filterable": true, - "inspect": false + "showUnfilled": true, + "valueMode": "color" }, - "mappings": [], - "noValue": "Trivy Image not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "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 Low_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Low_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155745) AND vul_last_modified_date <= toDateTime(1694242145) AND vul_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Low Vulnerability Count by Namespace and ClusterName", + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel provides a count of low misconfigurations categorized by namespace. It helps to monitor and prioritize low security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ] - } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 125 + }, + "id": 28, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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(misconfig_severity) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156331) AND EventTime <= toDateTime(1694242731) AND misconfig_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Low Misconfiguration Count by Namespace and ClusterName", + "type": "bargauge" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 73 - }, - "id": 34, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "description": "This panel provides a count of Medium vulnerabilities categorized by namespace. It helps to monitor and prioritize Medium security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 132 + }, + "id": 25, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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 Medium_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Medium_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155776) AND vul_last_modified_date <= toDateTime(1694242176) AND vul_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } ], - "show": false + "title": "Medium Vulnerability Count by Namespace and ClusterName", + "type": "bargauge" }, - "showHeader": true - }, - "pluginVersion": "10.0.3", - "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\", \"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\" \nFROM \"default\".\"trivyimage\"\nWHERE $timeFilterByColumn(vul_last_modified_date)\nORDER BY vul_last_modified_date DESC", - "rawQuery": "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\" \nFROM \"default\".\"trivyimage\"\nWHERE vul_last_modified_date >= toDateTime(1693581675) AND vul_last_modified_date <= toDateTime(1694186475)\nORDER BY vul_last_modified_date DESC", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Trivy Image", - "type": "table" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "{{ .Values.datasources.uid }}" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "This panel provides a count of medium misconfigurations categorized by namespace. It helps to monitor and prioritize medium security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 132 + }, + "id": 26, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true }, - "filterable": true, - "inspect": false + "showUnfilled": true, + "valueMode": "color" }, - "mappings": [], - "noValue": "Trivy SBOM not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "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(misconfig_severity) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156357) AND EventTime <= toDateTime(1694242757) AND misconfig_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Medium Misconfiguration Count by Namespace and ClusterName", + "type": "bargauge" + }, + { + "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": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ] - } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 139 + }, + "id": 12, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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 $timeFilterByColumn(vul_last_modified_date) AND 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_last_modified_date >= toDateTime(1694156016) AND vul_last_modified_date <= toDateTime(1694242416) AND vul_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Critical Vulnerability Count by Namespace and ClusterName", + "type": "bargauge" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 81 - }, - "id": 35, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "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": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 139 + }, + "id": 14, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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 $timeFilterByColumn(EventTime) AND 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 EventTime >= toDateTime(1694156383) AND EventTime <= toDateTime(1694242783) AND misconfig_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } ], - "show": false + "title": "Critical Misconfiguration Count by Namespace and ClusterName", + "type": "bargauge" }, - "showHeader": true - }, - "pluginVersion": "10.0.3", - "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.trivysbom", - "rawQuery": "SELECT * FROM default.trivysbom", - "refId": "A", - "round": "0s", - "skip_comments": true + "description": "This panel displays the count of vulnerabilities in different clusters and namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 146 + }, + "id": 6, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(*) AS Vulnerabilities\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694156175) AND vul_last_modified_date <= toDateTime(1694242575)\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Count by Cluster and Namespace", + "type": "bargauge" + }, + { + "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": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 146 + }, + "id": 4, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(*) AS Misconfigurations\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156545) AND EventTime <= toDateTime(1694242945)\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Count by Cluster and Namespace", + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 154 + }, + "id": 32, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "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\", \"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\" \nFROM \"default\".\"trivy_vul\"\nWHERE $timeFilterByColumn(vul_last_modified_date)\nORDER BY vul_last_modified_date DESC", + "rawQuery": "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\" \nFROM \"default\".\"trivy_vul\"\nWHERE vul_last_modified_date >= toDateTime(1694099993) AND vul_last_modified_date <= toDateTime(1694186393)\nORDER BY vul_last_modified_date DESC", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Trivy Vulnerabilities", + "type": "table" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "{{ .Values.datasources.uid }}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 162 + }, + "id": 33, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "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\", \"EventTime\", \"namespace\", \"kind\", \"name\", \"misconfig_id\", \"misconfig_avdid\", \"misconfig_type\", \"misconfig_title\", \"misconfig_desc\", \"misconfig_msg\", \"misconfig_query\", \"misconfig_resolution\", \"misconfig_severity\", \"misconfig_status\" \nFROM \"default\".\"trivy_misconfig\"\nWHERE $timeFilterByColumn(EventTime)\nORDER BY EventTime DESC", + "rawQuery": "SELECT \"cluster_name\", \"EventTime\", \"namespace\", \"kind\", \"name\", \"misconfig_id\", \"misconfig_avdid\", \"misconfig_type\", \"misconfig_title\", \"misconfig_desc\", \"misconfig_msg\", \"misconfig_query\", \"misconfig_resolution\", \"misconfig_severity\", \"misconfig_status\" \nFROM \"default\".\"trivy_misconfig\"\nWHERE EventTime >= toDateTime(1694966455) AND EventTime <= toDateTime(1695052855)\nORDER BY EventTime DESC", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Trivy Misconfiguration", + "type": "table" } ], - "title": "Trivy_SBOM", - "type": "table" + "title": "Trivy Vulnerability and Misconfiguration", + "type": "row" } ], "refresh": "", @@ -1453,7 +2407,7 @@ data: "timezone": "", "title": "Trivy", "uid": "f9b0a865-f419-410a-b7d9-9a3f79a70d48", - "version": 1, + "version": 13, "weekStart": "" } {{- end }} \ No newline at end of file diff --git a/grafana/trivy-dashboard.json b/grafana/trivy-dashboard.json index 3bb3deef..db35cd83 100644 --- a/grafana/trivy-dashboard.json +++ b/grafana/trivy-dashboard.json @@ -21,141 +21,39 @@ "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 170, + "id": 106, "links": [], "liveNow": false, "panels": [ { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, "gridPos": { - "h": 8, - "w": 12, + "h": 1, + "w": 24, "x": 0, "y": 0 }, - "id": 36, - "options": { - "baidu": { - "callback": "bmapReady", - "key": "" - }, - "editor": { - "format": "auto", - "height": 600 - }, - "gaode": { - "key": "", - "plugin": "AMap.Scale,AMap.ToolBar" - }, - "getOption": "let severity = [];\nlet counts = [];\n\ndata.series.map((s) => {\n severity = s.fields.find((f) => f.name === 'vul_severity').values;\n counts = s.fields.find((f) => f.name === 'total_count').values;\n});\n\n// Create an empty array to store pie chart data\nconst pieChartData = [];\n\n// Define colors for pie slices\nconst pieSliceColors = ['#235894', '#FF0000', '#00FF00', '#FFFF00', '#FFA500'];\n\n// Map severity and counts to pie chart data\nseverity.forEach((sev, index) => {\n pieChartData.push({\n value: counts[index],\n name: sev,\n itemStyle: {\n opacity: 0.7,\n color: pieSliceColors[index % pieSliceColors.length],\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n });\n});\n\nreturn {\n backgroundColor: '#FFFFFF', // Set the background color to white\n tooltip: {},\n series: [\n {\n name: 'pie',\n type: 'pie',\n selectedMode: 'single',\n selectedOffset: 30,\n clockwise: true,\n label: {\n fontSize: 18,\n color: '#235894',\n },\n labelLine: {\n lineStyle: {\n color: '#235894',\n },\n },\n data: pieChartData, // Use the modified pie chart data\n itemStyle: {\n opacity: 0.7,\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n },\n ],\n};", - "google": { - "callback": "gmapReady", - "key": "" - }, - "map": "none", - "renderer": "canvas", - "themeEditor": { - "config": "{}", - "height": 400, - "name": "default" - } - }, - "targets": [ - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "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 vul_severity, count(*) AS total_count\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY vul_severity", - "rawQuery": "SELECT vul_severity, count(*) AS total_count\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694438766) AND vul_last_modified_date <= toDateTime(1694611566)\nGROUP BY vul_severity", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Vulnerability Severity Distribution", - "type": "volkovlabs-echarts-panel" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 0 - }, - "id": 37, - "options": { - "baidu": { - "callback": "bmapReady", - "key": "" - }, - "editor": { - "format": "auto", - "height": 600 - }, - "gaode": { - "key": "", - "plugin": "AMap.Scale,AMap.ToolBar" - }, - "getOption": "let severity = [];\nlet counts = [];\n\ndata.series.map((s) => {\n severity = s.fields.find((f) => f.name === 'misconfig_severity').values;\n counts = s.fields.find((f) => f.name === 'total_count').values;\n});\n\n// Create an empty array to store pie chart data\nconst pieChartData = [];\n\n// Define colors for pie slices\nconst pieSliceColors = ['#235894', '#FF0000', '#00FF00', '#FFFF00', '#FFA500'];\n\n// Map severity and counts to pie chart data\nseverity.forEach((sev, index) => {\n pieChartData.push({\n value: counts[index],\n name: sev,\n itemStyle: {\n opacity: 0.7,\n color: pieSliceColors[index % pieSliceColors.length],\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n });\n});\n\nreturn {\n backgroundColor: '#FFFFFF', // Set the background color to white\n tooltip: {},\n series: [\n {\n name: 'pie',\n type: 'pie',\n selectedMode: 'single',\n selectedOffset: 30,\n clockwise: true,\n label: {\n fontSize: 18,\n color: '#235894',\n },\n labelLine: {\n lineStyle: {\n color: '#235894',\n },\n },\n data: pieChartData, // Use the modified pie chart data\n itemStyle: {\n opacity: 0.7,\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n },\n ],\n};", - "google": { - "callback": "gmapReady", - "key": "" - }, - "map": "none", - "renderer": "canvas", - "themeEditor": { - "config": "{}", - "height": 400, - "name": "default" - } - }, - "targets": [ - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "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 misconfig_severity, count(*) AS total_count\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY misconfig_severity", - "rawQuery": "SELECT misconfig_severity, count(*) AS total_count\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694438912) AND EventTime <= toDateTime(1694611712)\nGROUP BY misconfig_severity", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Misconfiguration Severity Distribution", - "type": "volkovlabs-echarts-panel" + "id": 49, + "title": "Image Vulnerability and SBOM", + "type": "row" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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" + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { "mode": "absolute", "steps": [ @@ -163,34 +61,65 @@ "color": "green", "value": null }, + { + "color": "semi-dark-yellow", + "value": 10 + }, + { + "color": "orange", + "value": 25 + }, { "color": "red", - "value": 80 + "value": 50 + }, + { + "color": "semi-dark-red", + "value": 100 + }, + { + "color": "dark-red", + "value": 1000 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Counts" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 1 }, - "id": 20, + "id": 47, "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -204,29 +133,34 @@ "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name, vul_severity", - "rawQuery": "SELECT cluster_name, vul_severity, count(*) \nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155614) AND vul_last_modified_date <= toDateTime(1694242014)\nGROUP BY cluster_name, vul_severity", + "query": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'LOW'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", + "rawQuery": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'LOW'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Vulnerability Severity counts grouped by Cluster", - "type": "bargauge" + "title": "Highest Vulnerability Images with Low Severity", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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" + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { "mode": "absolute", "steps": [ @@ -234,34 +168,65 @@ "color": "green", "value": null }, + { + "color": "semi-dark-yellow", + "value": 10 + }, + { + "color": "orange", + "value": 25 + }, { "color": "red", - "value": 80 + "value": 50 + }, + { + "color": "semi-dark-red", + "value": 100 + }, + { + "color": "dark-red", + "value": 1000 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Counts" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 1 }, - "id": 22, + "id": 48, "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -275,62 +240,100 @@ "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name, misconfig_severity", - "rawQuery": "SELECT cluster_name, misconfig_severity, count(*)\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156239) AND EventTime <= toDateTime(1694242639)\nGROUP BY cluster_name, misconfig_severity", + "query": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'HIGH'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", + "rawQuery": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'HIGH'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Misconfiguration Severity counts grouped by Cluster", - "type": "bargauge" + "title": "Highest Vulnerability Images with High Severity", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "description": "This panel displays the total number Vulnerabilities under each namespace", "fieldConfig": { "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { - "mode": "percentage", + "mode": "absolute", "steps": [ { "color": "green", "value": null }, + { + "color": "semi-dark-yellow", + "value": 10 + }, { "color": "orange", - "value": 70 + "value": 25 }, { "color": "red", - "value": 85 + "value": 50 + }, + { + "color": "semi-dark-red", + "value": 100 + }, + { + "color": "dark-red", + "value": 1000 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Counts" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { - "h": 5, + "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 9 }, - "id": 18, + "id": 45, "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -344,62 +347,100 @@ "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name", - "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155665) AND vul_last_modified_date <= toDateTime(1694242065)\nGROUP BY cluster_name", + "query": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'MEDIUM'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", + "rawQuery": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'MEDIUM'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Vulnerability Count by Cluster", - "type": "gauge" + "title": "Highest Vulnerability Images with Medium Severity", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "description": "This panel displays the total of misconfigurations from each clusters.", "fieldConfig": { "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { - "mode": "percentage", + "mode": "absolute", "steps": [ { "color": "green", "value": null }, + { + "color": "semi-dark-yellow", + "value": 10 + }, { "color": "orange", - "value": 70 + "value": 25 }, { "color": "red", - "value": 85 + "value": 50 + }, + { + "color": "semi-dark-red", + "value": 100 + }, + { + "color": "dark-red", + "value": 1000 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Counts" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { - "h": 5, + "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 9 }, - "id": 16, + "id": 46, "options": { - "orientation": "auto", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showThresholdLabels": false, - "showThresholdMarkers": true + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -413,64 +454,81 @@ "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name", - "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156266) AND EventTime <= toDateTime(1694242666)\nGROUP BY cluster_name", + "query": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'CRITICAL'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", + "rawQuery": "SELECT cluster_name, artifact_name, vul_pkg_name, count(vul_severity) AS Counts\nFROM default.trivyimage\nWHERE vul_severity = 'CRITICAL'\nGROUP BY cluster_name, artifact_name, vul_pkg_name\nHAVING count(vul_severity) > 1\nORDER BY count(vul_severity) DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Misconfiguration Count by Cluster", - "type": "gauge" + "title": "Highest Vulnerability Images with Critical Severity", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "description": "This panel provides a count of high vulnerabilities categorized by namespace. It helps to monitor and prioritize high security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "light-blue", "value": null - }, - { - "color": "red", - "value": 80 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "vul_severity" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "basic", + "type": "color-background" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 21 + "y": 17 }, - "id": 29, + "id": 43, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -484,64 +542,81 @@ "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 High_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'HIGH'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS High_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155706) AND vul_last_modified_date <= toDateTime(1694242106) AND vul_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "query": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'LOW'", + "rawQuery": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'LOW'", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "High Vulnerability Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Low Vulnerability Images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "description": "This panel provides a count of high misconfigurations categorized by namespace. It helps to monitor and prioritize high security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "vul_severity" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "basic", + "type": "color-background" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 21 + "y": 17 }, - "id": 30, + "id": 44, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -555,64 +630,81 @@ "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(misconfig_severity) AS High_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'HIGH'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS High_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156303) AND EventTime <= toDateTime(1694242703) AND misconfig_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "query": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'MEDIUM'", + "rawQuery": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'MEDIUM'", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "High Misconfiguration Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Medium Vulnerability Images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "description": "This panel provides a count of Low vulnerabilities categorized by namespace. It helps to monitor and prioritize Low security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { "mode": "absolute", "steps": [ { - "color": "green", + "color": "super-light-orange", "value": null - }, - { - "color": "red", - "value": 80 } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "vul_severity" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "basic", + "type": "color-background" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 28 + "y": 25 }, - "id": 27, + "id": 41, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -626,64 +718,81 @@ "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 Low_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'LOW'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Low_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155745) AND vul_last_modified_date <= toDateTime(1694242145) AND vul_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "query": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'HIGH'", + "rawQuery": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'HIGH'", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Low Vulnerability Count by Namespace and ClusterName", - "type": "bargauge" + "title": "High Vulnerability Images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "description": "This panel provides a count of low misconfigurations categorized by namespace. It helps to monitor and prioritize low security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { "mode": "absolute", "steps": [ - { - "color": "green", - "value": null - }, { "color": "red", - "value": 80 + "value": null } ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "vul_severity" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "basic", + "type": "color-background" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 28 + "y": 25 }, - "id": 28, + "id": 42, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -697,29 +806,35 @@ "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(misconfig_severity) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'LOW'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156331) AND EventTime <= toDateTime(1694242731) AND misconfig_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "query": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'CRITICAL'", + "rawQuery": "SELECT cluster_name, artifact_name AS image_name, vul_id, vul_pkg_name, vul_severity\nFROM default.trivyimage\nWHERE vul_severity = 'CRITICAL'", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Low Misconfiguration Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Critical Vulnerability Images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "description": "This panel provides a count of Medium vulnerabilities categorized by namespace. It helps to monitor and prioritize Medium security issues across different namespaces.", "fieldConfig": { "defaults": { "color": { - "mode": "continuous-GrYlRd" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", "thresholds": { "mode": "absolute", "steps": [ @@ -737,24 +852,23 @@ "overrides": [] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 33 }, - "id": 25, + "id": 39, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -768,29 +882,32 @@ "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 Medium_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Medium_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155776) AND vul_last_modified_date <= toDateTime(1694242176) AND vul_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "query": "SELECT image_name, package_name, count(*) AS duplicates\nFROM default.trivysbom\nGROUP BY image_name,package_name\nHAVING count(*) > 1", + "rawQuery": "SELECT image_name, package_name, count(*) AS duplicates\nFROM default.trivysbom\nGROUP BY image_name,package_name\nHAVING count(*) > 1", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Medium Vulnerability Count by Namespace and ClusterName", - "type": "bargauge" + "title": "duplicate package for sbom images", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "description": "This panel provides a count of medium misconfigurations categorized by namespace. It helps to monitor and prioritize medium security issues across different namespaces.", "fieldConfig": { "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", "thresholds": { "mode": "absolute", "steps": [ @@ -805,27 +922,42 @@ ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "images" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + } + ] + } + ] }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 35 + "y": 33 }, - "id": 26, + "id": 40, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -839,39 +971,42 @@ "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(misconfig_severity) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156357) AND EventTime <= toDateTime(1694242757) AND misconfig_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "query": "SELECT vul_id, count(artifact_name) AS images\nFROM default.trivyimage\nGROUP BY vul_id", + "rawQuery": "SELECT vul_id, count(artifact_name) AS images\nFROM default.trivyimage\nGROUP BY vul_id", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Medium Misconfiguration Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Count of images across Vulnerability Id", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", + "noValue": "Trivy Image not available", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] } @@ -879,24 +1014,23 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 12, + "h": 8, + "w": 24, "x": 0, - "y": 42 + "y": 41 }, - "id": 12, + "id": 34, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -910,39 +1044,42 @@ "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 $timeFilterByColumn(vul_last_modified_date) AND 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_last_modified_date >= toDateTime(1694156016) AND vul_last_modified_date <= toDateTime(1694242416) AND vul_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "query": "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\" \nFROM \"default\".\"trivyimage\"\nWHERE $timeFilterByColumn(vul_last_modified_date)\nORDER BY vul_last_modified_date DESC", + "rawQuery": "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\" \nFROM \"default\".\"trivyimage\"\nWHERE vul_last_modified_date >= toDateTime(1693581675) AND vul_last_modified_date <= toDateTime(1694186475)\nORDER BY vul_last_modified_date DESC", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Critical Vulnerability Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Trivy Image", + "type": "table" }, { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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" + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false }, "mappings": [], - "noValue": "Trivy Misconfigurations not available", + "noValue": "Trivy SBOM not available", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null - }, - { - "color": "red", - "value": 80 } ] } @@ -950,24 +1087,23 @@ "overrides": [] }, "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 42 + "h": 8, + "w": 24, + "x": 0, + "y": 49 }, - "id": 14, + "id": 35, "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": true + "reducer": [ + "sum" + ], + "show": false }, - "showUnfilled": true, - "valueMode": "color" + "showHeader": true }, "pluginVersion": "10.0.3", "targets": [ @@ -980,451 +1116,1269 @@ "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 $timeFilterByColumn(EventTime) AND 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 EventTime >= toDateTime(1694156383) AND EventTime <= toDateTime(1694242783) AND misconfig_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "query": "SELECT * FROM default.trivysbom", + "rawQuery": "SELECT * FROM default.trivysbom", "refId": "A", "round": "0s", "skip_comments": true } ], - "title": "Critical Misconfiguration Count by Namespace and ClusterName", - "type": "bargauge" + "title": "Trivy_SBOM", + "type": "table" }, { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "description": "This panel displays the count of vulnerabilities in different clusters and namespaces.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, + "collapsed": true, "gridPos": { - "h": 8, - "w": 12, + "h": 1, + "w": 24, "x": 0, - "y": 49 - }, - "id": 6, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": true - }, - "showUnfilled": true, - "valueMode": "color" + "y": 57 }, - "pluginVersion": "10.0.3", - "targets": [ + "id": 38, + "panels": [ { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(*) AS Vulnerabilities\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694156175) AND vul_last_modified_date <= toDateTime(1694242575)\nGROUP BY cluster_name, namespace", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Vulnerability Count by Cluster and Namespace", - "type": "bargauge" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "description": "This panel displays the count of Misconfigurations in different clusters and namespaces.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 97 }, - "mappings": [], - "noValue": "Trivy Misconfigurations not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "id": 36, + "options": { + "baidu": { + "callback": "bmapReady", + "key": "" + }, + "editor": { + "format": "auto", + "height": 600 + }, + "gaode": { + "key": "", + "plugin": "AMap.Scale,AMap.ToolBar" + }, + "getOption": "let severity = [];\nlet counts = [];\n\ndata.series.map((s) => {\n severity = s.fields.find((f) => f.name === 'vul_severity').values;\n counts = s.fields.find((f) => f.name === 'total_count').values;\n});\n\n// Create an empty array to store pie chart data\nconst pieChartData = [];\n\n// Define colors for pie slices\nconst pieSliceColors = ['#235894', '#FF0000', '#00FF00', '#FFFF00', '#FFA500'];\n\n// Map severity and counts to pie chart data\nseverity.forEach((sev, index) => {\n pieChartData.push({\n value: counts[index],\n name: sev,\n itemStyle: {\n opacity: 0.7,\n color: pieSliceColors[index % pieSliceColors.length],\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n });\n});\n\nreturn {\n backgroundColor: '#FFFFFF', // Set the background color to white\n tooltip: {},\n series: [\n {\n name: 'pie',\n type: 'pie',\n selectedMode: 'single',\n selectedOffset: 30,\n clockwise: true,\n label: {\n fontSize: 18,\n color: '#235894',\n },\n labelLine: {\n lineStyle: {\n color: '#235894',\n },\n },\n data: pieChartData, // Use the modified pie chart data\n itemStyle: {\n opacity: 0.7,\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n },\n ],\n};", + "google": { + "callback": "gmapReady", + "key": "" + }, + "map": "none", + "renderer": "canvas", + "themeEditor": { + "config": "{}", + "height": 400, + "name": "default" + } + }, + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" }, - { - "color": "red", - "value": 80 - } - ] - } + "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 vul_severity, count(*) AS total_count\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY vul_severity", + "rawQuery": "SELECT vul_severity, count(*) AS total_count\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694438766) AND vul_last_modified_date <= toDateTime(1694611566)\nGROUP BY vul_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Severity Distribution", + "type": "volkovlabs-echarts-panel" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 49 - }, - "id": 4, - "options": { - "displayMode": "lcd", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [], - "fields": "", - "values": true + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 97 + }, + "id": 37, + "options": { + "baidu": { + "callback": "bmapReady", + "key": "" + }, + "editor": { + "format": "auto", + "height": 600 + }, + "gaode": { + "key": "", + "plugin": "AMap.Scale,AMap.ToolBar" + }, + "getOption": "let severity = [];\nlet counts = [];\n\ndata.series.map((s) => {\n severity = s.fields.find((f) => f.name === 'misconfig_severity').values;\n counts = s.fields.find((f) => f.name === 'total_count').values;\n});\n\n// Create an empty array to store pie chart data\nconst pieChartData = [];\n\n// Define colors for pie slices\nconst pieSliceColors = ['#235894', '#FF0000', '#00FF00', '#FFFF00', '#FFA500'];\n\n// Map severity and counts to pie chart data\nseverity.forEach((sev, index) => {\n pieChartData.push({\n value: counts[index],\n name: sev,\n itemStyle: {\n opacity: 0.7,\n color: pieSliceColors[index % pieSliceColors.length],\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n });\n});\n\nreturn {\n backgroundColor: '#FFFFFF', // Set the background color to white\n tooltip: {},\n series: [\n {\n name: 'pie',\n type: 'pie',\n selectedMode: 'single',\n selectedOffset: 30,\n clockwise: true,\n label: {\n fontSize: 18,\n color: '#235894',\n },\n labelLine: {\n lineStyle: {\n color: '#235894',\n },\n },\n data: pieChartData, // Use the modified pie chart data\n itemStyle: {\n opacity: 0.7,\n borderWidth: 3,\n borderColor: '#FFFFFF', // Set the border color to white\n },\n },\n ],\n};", + "google": { + "callback": "gmapReady", + "key": "" + }, + "map": "none", + "renderer": "canvas", + "themeEditor": { + "config": "{}", + "height": 400, + "name": "default" + } + }, + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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 misconfig_severity, count(*) AS total_count\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY misconfig_severity", + "rawQuery": "SELECT misconfig_severity, count(*) AS total_count\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694438912) AND EventTime <= toDateTime(1694611712)\nGROUP BY misconfig_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Severity Distribution", + "type": "volkovlabs-echarts-panel" }, - "showUnfilled": true, - "valueMode": "color" - }, - "pluginVersion": "10.0.3", - "targets": [ { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name, namespace", - "rawQuery": "SELECT cluster_name, namespace, count(*) AS Misconfigurations\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156545) AND EventTime <= toDateTime(1694242945)\nGROUP BY cluster_name, namespace", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Misconfiguration Count by Cluster and Namespace", - "type": "bargauge" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "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": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 105 + }, + "id": 20, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true }, - "filterable": true, - "inspect": false + "showUnfilled": true, + "valueMode": "color" }, - "mappings": [], - "noValue": "Trivy Vulnerabilities Not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name, vul_severity", + "rawQuery": "SELECT cluster_name, vul_severity, count(*) \nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155614) AND vul_last_modified_date <= toDateTime(1694242014)\nGROUP BY cluster_name, vul_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Severity counts grouped by Cluster", + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ] - } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 105 + }, + "id": 22, + "options": { + "displayMode": "gradient", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name, misconfig_severity", + "rawQuery": "SELECT cluster_name, misconfig_severity, count(*)\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156239) AND EventTime <= toDateTime(1694242639)\nGROUP BY cluster_name, misconfig_severity", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Severity counts grouped by Cluster", + "type": "bargauge" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 57 - }, - "id": 32, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "description": "This panel displays the total number Vulnerabilities under each namespace", + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 113 + }, + "id": 18, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name", + "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155665) AND vul_last_modified_date <= toDateTime(1694242065)\nGROUP BY cluster_name", + "refId": "A", + "round": "0s", + "skip_comments": true + } ], - "show": false + "title": "Vulnerability Count by Cluster", + "type": "gauge" }, - "showHeader": true - }, - "pluginVersion": "10.0.3", - "targets": [ { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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\", \"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\" \nFROM \"default\".\"trivy_vul\"\nWHERE $timeFilterByColumn(vul_last_modified_date)\nORDER BY vul_last_modified_date DESC", - "rawQuery": "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\" \nFROM \"default\".\"trivy_vul\"\nWHERE vul_last_modified_date >= toDateTime(1694099993) AND vul_last_modified_date <= toDateTime(1694186393)\nORDER BY vul_last_modified_date DESC", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Trivy Vulnerabilities", - "type": "table" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "This panel displays the total of misconfigurations from each clusters.", + "fieldConfig": { + "defaults": { + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green" + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 113 + }, + "id": 16, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true }, - "filterable": true, - "inspect": false + "showThresholdLabels": false, + "showThresholdMarkers": true }, - "mappings": [], - "noValue": "Trivy Misconfigurations not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name", + "rawQuery": "SELECT cluster_name, count(*) FROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156266) AND EventTime <= toDateTime(1694242666)\nGROUP BY cluster_name", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Count by Cluster", + "type": "gauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "description": "This panel provides a count of high vulnerabilities categorized by namespace. It helps to monitor and prioritize high security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ] - } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 118 + }, + "id": 29, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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 High_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS High_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155706) AND vul_last_modified_date <= toDateTime(1694242106) AND vul_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "High Vulnerability Count by Namespace and ClusterName", + "type": "bargauge" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 65 - }, - "id": 33, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "description": "This panel provides a count of high misconfigurations categorized by namespace. It helps to monitor and prioritize high security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 118 + }, + "id": 30, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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(misconfig_severity) AS High_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS High_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156303) AND EventTime <= toDateTime(1694242703) AND misconfig_severity = 'HIGH'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } ], - "show": false + "title": "High Misconfiguration Count by Namespace and ClusterName", + "type": "bargauge" }, - "showHeader": true - }, - "pluginVersion": "10.0.3", - "targets": [ { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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\", \"EventTime\", \"namespace\", \"kind\", \"name\", \"misconfig_id\", \"misconfig_avdid\", \"misconfig_type\", \"misconfig_title\", \"misconfig_desc\", \"misconfig_msg\", \"misconfig_query\", \"misconfig_resolution\", \"misconfig_severity\", \"misconfig_status\" \nFROM \"default\".\"trivy_misconfig\"\nWHERE $timeFilterByColumn(EventTime)\nORDER BY EventTime DESC", - "rawQuery": "SELECT \"cluster_name\", \"EventTime\", \"namespace\", \"kind\", \"name\", \"misconfig_id\", \"misconfig_avdid\", \"misconfig_type\", \"misconfig_title\", \"misconfig_desc\", \"misconfig_msg\", \"misconfig_query\", \"misconfig_resolution\", \"misconfig_severity\", \"misconfig_status\" \nFROM \"default\".\"trivy_misconfig\"\nWHERE EventTime >= toDateTime(1694966455) AND EventTime <= toDateTime(1695052855)\nORDER BY EventTime DESC", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Trivy Misconfiguration", - "type": "table" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "This panel provides a count of Low vulnerabilities categorized by namespace. It helps to monitor and prioritize Low security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 125 + }, + "id": 27, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true }, - "filterable": true, - "inspect": false + "showUnfilled": true, + "valueMode": "color" }, - "mappings": [], - "noValue": "Trivy Image not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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 Low_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Low_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155745) AND vul_last_modified_date <= toDateTime(1694242145) AND vul_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Low Vulnerability Count by Namespace and ClusterName", + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "description": "This panel provides a count of low misconfigurations categorized by namespace. It helps to monitor and prioritize low security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ] - } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 125 + }, + "id": 28, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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(misconfig_severity) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Low_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156331) AND EventTime <= toDateTime(1694242731) AND misconfig_severity = 'LOW'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Low Misconfiguration Count by Namespace and ClusterName", + "type": "bargauge" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 73 - }, - "id": 34, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "description": "This panel provides a count of Medium vulnerabilities categorized by namespace. It helps to monitor and prioritize Medium security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 132 + }, + "id": 25, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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 Medium_Severity\nFROM default.trivy_vul\nWHERE $timeFilterByColumn(vul_last_modified_date) AND vul_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(vul_severity) AS Medium_Severity\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694155776) AND vul_last_modified_date <= toDateTime(1694242176) AND vul_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } ], - "show": false + "title": "Medium Vulnerability Count by Namespace and ClusterName", + "type": "bargauge" }, - "showHeader": true - }, - "pluginVersion": "10.0.3", - "targets": [ { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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\", \"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\" \nFROM \"default\".\"trivyimage\"\nWHERE $timeFilterByColumn(vul_last_modified_date)\nORDER BY vul_last_modified_date DESC", - "rawQuery": "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\" \nFROM \"default\".\"trivyimage\"\nWHERE vul_last_modified_date >= toDateTime(1693581675) AND vul_last_modified_date <= toDateTime(1694186475)\nORDER BY vul_last_modified_date DESC", - "refId": "A", - "round": "0s", - "skip_comments": true - } - ], - "title": "Trivy Image", - "type": "table" - }, - { - "datasource": { - "type": "vertamedia-clickhouse-datasource", - "uid": "vertamedia-clickhouse-datasource" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" + "description": "This panel provides a count of medium misconfigurations categorized by namespace. It helps to monitor and prioritize medium security issues across different namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] }, - "custom": { - "align": "center", - "cellOptions": { - "type": "color-text" + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 132 + }, + "id": 26, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true }, - "filterable": true, - "inspect": false + "showUnfilled": true, + "valueMode": "color" }, - "mappings": [], - "noValue": "Trivy SBOM not available", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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(misconfig_severity) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE $timeFilterByColumn(EventTime) AND misconfig_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(misconfig_severity) AS Medium_Severity\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156357) AND EventTime <= toDateTime(1694242757) AND misconfig_severity = 'MEDIUM'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Medium Misconfiguration Count by Namespace and ClusterName", + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] } - ] - } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 139 + }, + "id": 12, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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 $timeFilterByColumn(vul_last_modified_date) AND 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_last_modified_date >= toDateTime(1694156016) AND vul_last_modified_date <= toDateTime(1694242416) AND vul_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Critical Vulnerability Count by Namespace and ClusterName", + "type": "bargauge" }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 81 - }, - "id": 35, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 139 + }, + "id": 14, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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 $timeFilterByColumn(EventTime) AND 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 EventTime >= toDateTime(1694156383) AND EventTime <= toDateTime(1694242783) AND misconfig_severity = 'CRITICAL'\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } ], - "show": false + "title": "Critical Misconfiguration Count by Namespace and ClusterName", + "type": "bargauge" }, - "showHeader": true - }, - "pluginVersion": "10.0.3", - "targets": [ { "datasource": { "type": "vertamedia-clickhouse-datasource", "uid": "vertamedia-clickhouse-datasource" }, - "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.trivysbom", - "rawQuery": "SELECT * FROM default.trivysbom", - "refId": "A", - "round": "0s", - "skip_comments": true + "description": "This panel displays the count of vulnerabilities in different clusters and namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 146 + }, + "id": 6, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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\nWHERE $timeFilterByColumn(vul_last_modified_date)\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(*) AS Vulnerabilities\nFROM default.trivy_vul\nWHERE vul_last_modified_date >= toDateTime(1694156175) AND vul_last_modified_date <= toDateTime(1694242575)\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Vulnerability Count by Cluster and Namespace", + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "description": "This panel displays the count of Misconfigurations in different clusters and namespaces.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 146 + }, + "id": 4, + "options": { + "displayMode": "lcd", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [], + "fields": "", + "values": true + }, + "showUnfilled": true, + "valueMode": "color" + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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\nWHERE $timeFilterByColumn(EventTime)\nGROUP BY cluster_name, namespace", + "rawQuery": "SELECT cluster_name, namespace, count(*) AS Misconfigurations\nFROM default.trivy_misconfig\nWHERE EventTime >= toDateTime(1694156545) AND EventTime <= toDateTime(1694242945)\nGROUP BY cluster_name, namespace", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Misconfiguration Count by Cluster and Namespace", + "type": "bargauge" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "noValue": "Trivy Vulnerabilities Not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 154 + }, + "id": 32, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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\", \"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\" \nFROM \"default\".\"trivy_vul\"\nWHERE $timeFilterByColumn(vul_last_modified_date)\nORDER BY vul_last_modified_date DESC", + "rawQuery": "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\" \nFROM \"default\".\"trivy_vul\"\nWHERE vul_last_modified_date >= toDateTime(1694099993) AND vul_last_modified_date <= toDateTime(1694186393)\nORDER BY vul_last_modified_date DESC", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Trivy Vulnerabilities", + "type": "table" + }, + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "noValue": "Trivy Misconfigurations not available", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 162 + }, + "id": 33, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.0.3", + "targets": [ + { + "datasource": { + "type": "vertamedia-clickhouse-datasource", + "uid": "vertamedia-clickhouse-datasource" + }, + "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\", \"EventTime\", \"namespace\", \"kind\", \"name\", \"misconfig_id\", \"misconfig_avdid\", \"misconfig_type\", \"misconfig_title\", \"misconfig_desc\", \"misconfig_msg\", \"misconfig_query\", \"misconfig_resolution\", \"misconfig_severity\", \"misconfig_status\" \nFROM \"default\".\"trivy_misconfig\"\nWHERE $timeFilterByColumn(EventTime)\nORDER BY EventTime DESC", + "rawQuery": "SELECT \"cluster_name\", \"EventTime\", \"namespace\", \"kind\", \"name\", \"misconfig_id\", \"misconfig_avdid\", \"misconfig_type\", \"misconfig_title\", \"misconfig_desc\", \"misconfig_msg\", \"misconfig_query\", \"misconfig_resolution\", \"misconfig_severity\", \"misconfig_status\" \nFROM \"default\".\"trivy_misconfig\"\nWHERE EventTime >= toDateTime(1694966455) AND EventTime <= toDateTime(1695052855)\nORDER BY EventTime DESC", + "refId": "A", + "round": "0s", + "skip_comments": true + } + ], + "title": "Trivy Misconfiguration", + "type": "table" } ], - "title": "Trivy_SBOM", - "type": "table" + "title": "Trivy Vulnerability and Misconfiguration", + "type": "row" } ], "refresh": "", @@ -1442,6 +2396,6 @@ "timezone": "", "title": "Trivy", "uid": "f9b0a865-f419-410a-b7d9-9a3f79a70d48", - "version": 1, + "version": 13, "weekStart": "" } \ No newline at end of file