Grafana dashboard: Klustair
Description: KubeAudit and Trivy scan results collected by Klustair https://www.klustair.com/

KubeAudit and Trivy scan results collected by Klustair
https://www.klustair.com/

{
  "__inputs": [
    {
      "name": "DS_POSTGRESQL",
      "label": "PostgreSQL",
      "description": "",
      "type": "datasource",
      "pluginId": "postgres",
      "pluginName": "PostgreSQL"
    },
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.5.3"
    },
    {
      "type": "datasource",
      "id": "postgres",
      "name": "PostgreSQL",
      "version": "1.0.0"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "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": "KubeAudit and Trivy scan results collected by Klustair https://www.klustair.com/",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1653317093842,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "y": 0
      },
      "id": 31,
      "options": {
        "content": "<center><br>\n<img src=\"https://raw.githubusercontent.com/mms-gianni/klustair-frontend/master/docs/img/klustair.png\" alt=\"Klustair Logo\" style=\"width:150px;height:100px;\"> \n</center>",
        "mode": "html"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": false,
          "rawSql": "SELECT\n  $__time(time_column),\n  value1\nFROM\n  metric_table\nWHERE\n  $__timeFilter(time_column)\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "gridPos": {
        "h": 4,
        "w": 9,
        "x": 3,
        "y": 0
      },
      "id": 18,
      "options": {
        "content": "# Klustair Dashboard\n\n--------------------\nKubeAudit and Trivy scan results collected by Klustair \\\nhttps://www.klustair.com/",
        "mode": "markdown"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": false,
          "rawSql": "SELECT\n  $__time(time_column),\n  value1\nFROM\n  metric_table\nWHERE\n  $__timeFilter(time_column)\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "transparent": true,
      "type": "text"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 12,
        "y": 0
      },
      "id": 8,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT count(DISTINCT name) FROM k_namespaces WHERE name != ''\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Namespaces",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-blue",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 15,
        "y": 0
      },
      "id": 12,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT count(DISTINCT podname) FROM k_pods WHERE podname != ''\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Pods",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "grey",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 18,
        "y": 0
      },
      "id": 9,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT count(DISTINCT name) FROM k_containers WHERE name != ''\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Containers",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "grey",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 21,
        "y": 0
      },
      "id": 15,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT count(DISTINCT fulltag) FROM k_images WHERE fulltag != ''\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Images",
      "type": "stat"
    },
    {
      "collapsed": false,
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 4
      },
      "id": 6,
      "panels": [],
      "title": "Audit - Filtered",
      "type": "row"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "displayName": "$__cell_{0}",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "grey",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 5,
        "x": 0,
        "y": 5
      },
      "id": 19,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(Distinct A.container) AS \"value\", \n  A.container,\n  B.checktime\nFROM k_audits A\nJOIN k_reports B ON A.report_uid = B.uid\nWHERE\n  A.resource_name in (${ResourceName}) and A.resource_namespace in (${Namespace}) and B.checktime in ('${Report}') and audit_type= 'container'\nGROUP BY A.container, B.checktime\nORDER BY value, A.container",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Audited Container Count",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "audit_type": true,
              "checktime": true,
              "name": true,
              "resource_name": true
            },
            "indexByName": {
              "checktime": 2,
              "type": 0,
              "value": 1
            },
            "renameByName": {
              "type": "Audit Type",
              "value": "Value"
            }
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "displayName": "$__cell_{0}",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-orange",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 5,
        "x": 5,
        "y": 5
      },
      "id": 16,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(audit_type) AS \"value\"\nFROM k_audits A\nJOIN k_reports B ON A.report_uid = B.uid\nWHERE\n  A.resource_name in (${ResourceName}) and A.resource_namespace in (${Namespace}) and B.checktime in ('${Report}')\n  OR A.resource_name in (${Namespace}) and B.checktime in ('${Report}')\nGROUP BY audit_type\nORDER BY value",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Total Audit Count",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "audit_type": true,
              "checktime": false
            },
            "indexByName": {
              "checktime": 2,
              "type": 0,
              "value": 1
            },
            "renameByName": {
              "type": "Audit Type",
              "value": "Value"
            }
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-orange",
                "value": null
              },
              {
                "color": "light-red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "custom.width",
                "value": 350
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 15,
        "w": 14,
        "x": 10,
        "y": 5
      },
      "id": 4,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 1,
        "showHeader": true
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(audit_name) AS \"value\", \n  audit_name AS type, audit_type\nFROM k_audits A\nJOIN k_reports B ON A.report_uid = B.uid\nWHERE\n  A.resource_name in (${ResourceName}) and A.resource_namespace in (${Namespace}) and B.checktime in ('${Report}')\n  OR A.resource_name in (${Namespace}) and B.checktime in ('${Report}')\nGROUP BY audit_name, audit_type\nORDER BY audit_type, value desc",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Audits by Name",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "checktime": true
            },
            "indexByName": {
              "audit_type": 1,
              "type": 0,
              "value": 2
            },
            "renameByName": {
              "audit_type": "Type",
              "type": "Name",
              "value": "Count"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "displayName": "$__cell_{0}",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "grey",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "custom.width",
                "value": 300
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 0,
        "y": 9
      },
      "id": 2,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(audit_type) AS \"value\", \n  audit_type AS type,\n  B.checktime\nFROM k_audits A\nJOIN k_reports B ON A.report_uid = B.uid\nWHERE\n  A.resource_name in (${ResourceName}) and A.resource_namespace in (${Namespace}) and B.checktime in ('${Report}')\n  OR A.resource_name in (${Namespace}) and B.checktime in ('${Report}')\nGROUP BY audit_type, B.checktime\nORDER BY value desc, audit_type",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Audit Type",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "checktime": true
            },
            "indexByName": {
              "checktime": 2,
              "type": 0,
              "value": 1
            },
            "renameByName": {
              "type": "Audit Type",
              "value": "Value"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "grey",
                "value": null
              },
              {
                "color": "light-red",
                "value": 100
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "custom.width",
                "value": 300
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 10,
        "x": 0,
        "y": 15
      },
      "id": 3,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(severity_level) AS \"value\", \n  severity_level AS type,\n  B.checktime\nFROM k_audits A\nJOIN k_reports B ON A.report_uid = B.uid\nWHERE\n  A.resource_name in (${ResourceName}) and A.resource_namespace in (${Namespace}) and B.checktime in ('${Report}')\n  OR A.resource_name in (${Namespace}) and B.checktime in ('${Report}')\nGROUP BY severity_level, B.checktime\nORDER BY value desc, severity_level",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Severity Level",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "checktime": true
            },
            "indexByName": {
              "checktime": 2,
              "type": 0,
              "value": 1
            },
            "renameByName": {
              "type": "Severity",
              "value": "Value"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "datasource": {
        "type": "prometheus",
        "uid": "prometheus"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 20
      },
      "id": 25,
      "panels": [],
      "title": "Trivy - Filtered",
      "type": "row"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "displayName": "Total",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-red",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 5,
        "x": 0,
        "y": 21
      },
      "id": 26,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  count(Distinct vulnerability_id)\nFROM k_vuln A\nJOIN k_reports B ON A.report_uid = B.uid\nJOIN k_images C ON A.image_uid = C.uid\nJOIN k_containers D ON C.fulltag = D.image\nJOIN k_pods E ON D.pod_uid = E.uid\nJOIN k_namespaces F ON E.namespace_uid = F.uid\nJOIN k_audits G ON F.uid = G.namespace_uid\nWHERE\n  G.resource_name in (${ResourceName}) and G.resource_namespace in (${Namespace}) and B.checktime in ('${Report}')\nGROUP BY vulnerability_id\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "CVEs Individual Vulnerabilities Count",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "audit_type": true,
              "checktime": false
            },
            "indexByName": {
              "checktime": 2,
              "type": 0,
              "value": 1
            },
            "renameByName": {
              "total": "",
              "type": "Audit Type",
              "value": "Value"
            }
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "displayName": "Total",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-purple",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 5,
        "x": 5,
        "y": 21
      },
      "id": 27,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT total\nFROM k_vulnsummary A\nJOIN k_reports B ON A.report_uid = B.uid\nJOIN k_images C ON A.image_uid = C.uid\nJOIN k_containers D ON C.fulltag = D.image\nJOIN k_pods E ON D.pod_uid = E.uid\nJOIN k_namespaces F ON E.namespace_uid = F.uid\nJOIN k_audits G ON F.uid = G.namespace_uid\nWHERE\n  G.resource_name in (${ResourceName}) and G.resource_namespace in (${Namespace}) and B.checktime in ('${Report}')\nGROUP BY total",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "Total Vulnerabilities Count",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "audit_type": true,
              "checktime": false
            },
            "indexByName": {
              "checktime": 2,
              "type": 0,
              "value": 1
            },
            "renameByName": {
              "type": "Audit Type",
              "value": "Value"
            }
          }
        }
      ],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "grey",
                "value": null
              },
              {
                "color": "light-red",
                "value": 100
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Total (sum)"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "custom.width",
                "value": 350
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 14,
        "x": 10,
        "y": 21
      },
      "id": 28,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  total, severity,\n  E.container, E.resource_namespace\nFROM k_vulnsummary A\nFULL JOIN k_reports B ON A.report_uid = B.uid\nFULL JOIN k_images C ON A.image_uid = C.uid\nFULL JOIN k_containers D ON C.fulltag = D.image\nFULL JOIN k_audits E ON D.name = E.container\nWHERE\n  E.resource_name in (${ResourceName}) and E.resource_namespace in (${Namespace}) and B.checktime in ('${Report}') and total > 0\nGROUP BY E.resource_namespace, total, severity, E.container\nORDER BY E.resource_namespace, severity desc, total desc",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "CVEs Vulnerabilities By Severity and Container",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "audit_type": true,
              "checktime": false
            },
            "indexByName": {
              "container": 3,
              "resource_namespace": 0,
              "severity": 1,
              "total": 2
            },
            "renameByName": {
              "resource_namespace": "Namespace",
              "severity": "Severity",
              "total": "Total",
              "type": "Audit Type",
              "value": "Value"
            }
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Namespace": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Severity": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Total": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "container": {
                "aggregations": [],
                "operation": "groupby"
              },
              "severity": {
                "aggregations": [],
                "operation": "groupby"
              },
              "total": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              }
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "light-red",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Total (sum)"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 10,
        "x": 0,
        "y": 25
      },
      "id": 30,
      "links": [],
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "$__interval",
                "none"
              ],
              "type": "time"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\n  total, severity\nFROM k_vulnsummary A\nFULL JOIN k_reports B ON A.report_uid = B.uid\nFULL JOIN k_images C ON A.image_uid = C.uid\nFULL JOIN k_containers D ON C.fulltag = D.image\nFULL JOIN k_audits E ON D.name = E.container\nWHERE\n  E.resource_name in (${ResourceName}) and E.resource_namespace in (${Namespace}) and B.checktime in ('${Report}') and total > 0\nGROUP BY severity, total\nORDER BY severity desc, total desc",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "value"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "k_audits",
          "timeColumn": "audit_time",
          "timeColumnType": "timestamptz",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ],
          "datasource": "${DS_PROMETHEUS}"
        }
      ],
      "title": "CVEs Vulnerabilities By Severity",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {
              "severity": 0,
              "total": 1
            },
            "renameByName": {
              "severity": "Severity",
              "total": "Total"
            }
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Severity": {
                "aggregations": [],
                "operation": "groupby"
              },
              "Total": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "severity": {
                "aggregations": [],
                "operation": "groupby"
              },
              "total": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              }
            }
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": false,
  "schemaVersion": 36,
  "style": "dark",
  "tags": [
    "vulnerability",
    "audit",
    "security"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "postgres",
          "uid": "${DS_POSTGRESQL}"
        },
        "definition": "SELECT to_char(checktime, 'YYYY-MM-DD\"T\"HH24:MI:SS.US\"Z\"') FROM k_reports",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "Report",
        "options": [],
        "query": "SELECT to_char(checktime, 'YYYY-MM-DD\"T\"HH24:MI:SS.US\"Z\"') FROM k_reports",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 2,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "postgres",
          "uid": "${DS_POSTGRESQL}"
        },
        "definition": "SELECT DISTINCT name FROM k_namespaces",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "Namespace",
        "options": [],
        "query": "SELECT DISTINCT name FROM k_namespaces",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "postgres",
          "uid": "${DS_POSTGRESQL}"
        },
        "definition": "SELECT\nresource_name FROM k_audits WHERE resource_namespace in (${Namespace})",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "ResourceName",
        "options": [],
        "query": "SELECT\nresource_name FROM k_audits WHERE resource_namespace in (${Namespace})",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "hidden": true
  },
  "timezone": "",
  "title": "Klustair",
  "uid": "pqkChFTGz",
  "version": 2,
  "weekStart": "",
  "gnetId": 13414
}