diff --git a/dashboards/service/trivy.json b/dashboards/service/trivy.json index 168af99..3b41857 100644 --- a/dashboards/service/trivy.json +++ b/dashboards/service/trivy.json @@ -25,7 +25,7 @@ "graphTooltip": 0, "panels": [ { - "collapsed": true, + "collapsed": false, "gridPos": { "h": 1, "w": 24, @@ -33,740 +33,735 @@ "y": 0 }, "id": 12, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Total number by type of security issues identified in the cluster", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Critical" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "High" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Medium" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Low" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unknown" - }, - "properties": [ - { - "id": "color", - "value": { - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 1 - }, - "id": 21, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities)", - "instant": true, - "legendFormat": "Vulnerabilities", - "range": false, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_resource_configaudits)", - "hide": false, - "instant": true, - "legendFormat": "Misconfiguration", - "range": false, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_exposedsecrets)", - "hide": false, - "instant": true, - "legendFormat": "Exposed Secrets", - "range": false, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_clusterrole_clusterrbacassessments)", - "hide": false, - "instant": true, - "legendFormat": "RBAC Assessment", - "range": false, - "refId": "D" - } - ], - "title": "Number and Type of Security Issues", - "type": "stat" - } - ], + "panels": [], "title": "Quick Overview", "type": "row" }, { - "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Total number by type of security issues identified in the cluster", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Critical" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "High" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Medium" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Low" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Unknown" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "fixed" + } + } + ] + } + ] + }, "gridPos": { - "h": 1, + "h": 9, "w": 24, "x": 0, "y": 1 }, - "id": 2, - "panels": [ + "id": 21, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.0.0", + "targets": [ { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "", - "fieldConfig": { - "defaults": { - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Critical" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "red", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "High" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "orange", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Medium" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "dark-yellow", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Low" - }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "green", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Unknown" - }, - "properties": [ - { - "id": "color", - "value": { - "mode": "fixed" - } - } - ] - } - ] - }, - "gridPos": { - "h": 9, - "w": 24, - "x": 0, - "y": 2 - }, - "id": 19, - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"Critical\"})", - "instant": true, - "legendFormat": "Critical", - "range": false, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"High\"})", - "hide": false, - "instant": true, - "legendFormat": "High", - "range": false, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"Medium\"})", - "hide": false, - "instant": true, - "legendFormat": "Medium", - "range": false, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"Low\"})", - "hide": false, - "instant": true, - "legendFormat": "Low", - "range": false, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"Unknown\"})", - "hide": false, - "instant": true, - "legendFormat": "Unknown", - "range": false, - "refId": "E" - } - ], - "title": "Severity Breakdown of all Vulnerabilities", - "type": "stat" + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities)", + "instant": true, + "legendFormat": "Vulnerabilities", + "range": false, + "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 3, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 20 - }, - "id": 27, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum(trivy_image_vulnerabilities) by (namespace)", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Number of Vulnerabilities by namespace", - "type": "timeseries" + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_resource_configaudits)", + "hide": false, + "instant": true, + "legendFormat": "Misconfiguration", + "range": false, + "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "left", - "cellOptions": { - "type": "color-text" - }, - "filterable": true, - "inspect": false - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "super-light-yellow", - "value": 1 - }, - { - "color": "orange", - "value": 100 - }, - { - "color": "red", - "value": 500 - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Image" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "type": "json-view" - } - }, - { - "id": "custom.width", - "value": 350 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "image_tag" - }, - "properties": [ - { - "id": "custom.cellOptions", - "value": { - "type": "json-view" - } - } - ] - } - ] + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_exposedsecrets)", + "hide": false, + "instant": true, + "legendFormat": "Exposed Secrets", + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "gridPos": { - "h": 14, - "w": 24, - "x": 0, - "y": 28 - }, - "id": 23, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": true, - "fields": "", - "reducer": ["sum"], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [] - }, - "pluginVersion": "11.4.0", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"Critical\"}) by (image_repository,image_tag)", - "format": "table", - "instant": true, - "range": false, - "refId": "A" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"High\"}) by (image_repository,image_tag)", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"Medium\"}) by (image_repository,image_tag)", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "C" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"Low\"}) by (image_repository,image_tag)", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "D" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "exemplar": false, - "expr": "sum(trivy_image_vulnerabilities{severity=\"Unknown\"}) by (image_repository,image_tag)", - "format": "table", - "hide": false, - "instant": true, - "range": false, - "refId": "E" - } - ], - "title": "Vulnerability by Image", - "transformations": [ - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "image_repository", - "image_tag", - "Value #A", - "Value #B", - "Value #C", - "Value #D", - "Value #E" - ] - } - } - }, - { - "id": "seriesToColumns", - "options": { - "byField": "image_repository" - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "image_repository", - "Value #A", - "Value #B", - "Value #C", - "Value #D", - "Value #E", - "image_tag 1" - ] - } - } - }, - { - "id": "organize", - "options": { - "excludeByName": { - "image_tag": false - }, - "indexByName": {}, - "renameByName": { - "Value #A": "Critical", - "Value #B": "High", - "Value #C": "Medium", - "Value #D": "Low", - "Value #E": "Unknown", - "image_repository": "Image", - "image_tag": "Tag" - } - } - } - ], - "type": "table" + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_clusterrole_clusterrbacassessments)", + "hide": false, + "instant": true, + "legendFormat": "RBAC Assessment", + "range": false, + "refId": "D" } ], + "title": "Number and Type of Security Issues", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 2, + "panels": [], "title": "Vulnerabilities", "type": "row" }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Critical" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "High" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Medium" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "dark-yellow", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Low" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Unknown" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 24, + "x": 0, + "y": 11 + }, + "id": 19, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"Critical\"})", + "instant": true, + "legendFormat": "Critical", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"High\"})", + "hide": false, + "instant": true, + "legendFormat": "High", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"Medium\"})", + "hide": false, + "instant": true, + "legendFormat": "Medium", + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"Low\"})", + "hide": false, + "instant": true, + "legendFormat": "Low", + "range": false, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"Unknown\"})", + "hide": false, + "instant": true, + "legendFormat": "Unknown", + "range": false, + "refId": "E" + } + ], + "title": "Severity Breakdown of all Vulnerabilities", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 3, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 20 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum(trivy_image_vulnerabilities) by (namespace)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Number of Vulnerabilities by namespace", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "type": "color-text" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "super-light-yellow", + "value": 1 + }, + { + "color": "orange", + "value": 100 + }, + { + "color": "red", + "value": 500 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Image" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "json-view" + } + }, + { + "id": "custom.width", + "value": 350 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "image_tag" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "json-view" + } + } + ] + } + ] + }, + "gridPos": { + "h": 14, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 23, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "enablePagination": true, + "fields": "", + "reducer": ["sum"], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "12.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"Critical\"}) by (image_repository,image_tag)", + "format": "table", + "instant": true, + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"High\"}) by (image_repository,image_tag)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"Medium\"}) by (image_repository,image_tag)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"Low\"}) by (image_repository,image_tag)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(trivy_image_vulnerabilities{severity=\"Unknown\"}) by (image_repository,image_tag)", + "format": "table", + "hide": false, + "instant": true, + "range": false, + "refId": "E" + } + ], + "title": "Vulnerability by Image", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "image_repository", + "image_tag", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E" + ] + } + } + }, + { + "id": "seriesToColumns", + "options": { + "byField": "image_repository" + } + }, + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "image_repository", + "Value #A", + "Value #B", + "Value #C", + "Value #D", + "Value #E", + "image_tag 1" + ] + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "image_tag": false + }, + "indexByName": {}, + "renameByName": { + "Value #A": "Critical", + "Value #B": "High", + "Value #C": "Medium", + "Value #D": "Low", + "Value #E": "Unknown", + "image_repository": "Image", + "image_tag": "Tag" + } + } + } + ], + "type": "table" + }, { "collapsed": true, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 2 + "y": 42 }, "id": 4, "panels": [ @@ -783,8 +778,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -875,7 +869,7 @@ "h": 9, "w": 24, "x": 0, - "y": 3 + "y": 52 }, "id": 28, "options": { @@ -964,7 +958,7 @@ "h": 1, "w": 24, "x": 0, - "y": 3 + "y": 43 }, "id": 8, "panels": [ @@ -1072,7 +1066,7 @@ "h": 9, "w": 24, "x": 0, - "y": 53 + "y": 102 }, "id": 29, "options": { @@ -1172,7 +1166,7 @@ "h": 1, "w": 24, "x": 0, - "y": 4 + "y": 44 }, "id": 6, "panels": [ @@ -1237,7 +1231,7 @@ "h": 8, "w": 12, "x": 0, - "y": 54 + "y": 103 }, "id": 30, "options": { @@ -1280,7 +1274,7 @@ { "current": { "text": "Prometheus", - "value": "prometheus" + "value": "kube-prometheus-stack" }, "includeAll": false, "label": "Datasource", @@ -1300,5 +1294,5 @@ "timezone": "browser", "title": "Trivy", "uid": "4b07f87ce6bc61e77627666d9f663946", - "version": 10 + "version": 11 }