Grafana dashboard: Trivy: Image Vulnerabilities
Description: Access https://github.com/lucasafonsokremer/trivy-vulnerability-exporter


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.1.2"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:7",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Access https://github.com/lucasafonsokremer/trivy-vulnerability-exporter",
  "editable": true,
  "gnetId": 17080,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1664396545435,
  "links": [],
  "panels": [
    {
      "datasource": null,
      "description": "",
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 62,
      "options": {
        "content": "<p style=\"text-align: center\">This project is maintained by https://github.com/lucasafonsokremer/trivy-vulnerability-exporter</p>           ",
        "mode": "html"
      },
      "pluginVersion": "8.1.2",
      "title": "Reference",
      "type": "text"
    },
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 2
      },
      "id": 60,
      "panels": [],
      "title": "Workload: details",
      "type": "row"
    },
    {
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "right",
            "displayMode": "auto"
          },
          "decimals": 2,
          "displayName": "",
          "mappings": [
            {
              "options": {
                "CRITICAL": {
                  "color": "dark-red",
                  "index": 0
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": ""
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "vulnerabilityId"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "auto"
              },
              {
                "id": "custom.filterable",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "severity"
            },
            "properties": [
              {
                "id": "custom.filterable",
                "value": true
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 19,
        "w": 24,
        "x": 0,
        "y": 3
      },
      "id": 68,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "severity"
          }
        ]
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "trivy_image_vulnerabilities{image=\"$image\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "$image",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value": true,
              "__name__": true,
              "app_kubernetes_io_instance": true,
              "app_kubernetes_io_name": true,
              "controller_revision_hash": true,
              "fixedVersion": true,
              "image": true,
              "instance": true,
              "job": true,
              "kubernetes_namespace": true,
              "kubernetes_pod_name": true,
              "layer": true,
              "namespace": true,
              "statefulset_kubernetes_io_pod_name": true,
              "workloadKind": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "",
  "schemaVersion": 30,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "trivy_image_vulnerabilities",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "image",
        "multi": false,
        "name": "image",
        "options": [],
        "query": {
          "query": "trivy_image_vulnerabilities",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "/.*image=\"([^\"]*).*/",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Trivy: Image Vulnerabilities",
  "uid": "gfoC-7VVz",
  "version": 1
}