-
-#### Installing the Inventory Dashboard
-
-1. Execute [this query]../views/resource.sql) to add the `k8s_resources` view.
-2. Add the CloudQuery postgres database as a data source to Grafana (`Configuration -> Data Sources -> Add Data Source`)
-3. Import [../dashboards/grafana/asset_inventory.json](../dashboards/grafana/asset_inventory.json) into Grafana (`Import -> Upload JSON File`).
-
-### Kubernetes Compliance and CSPM (Cloud Security Posture Management) Dashboard
-
-
-
-#### Installing the Compliance Dashboard
-
-1. Execute one more of the Kubernetes [policies](../policies/).
-2. Add the CloudQuery postgres database as a data source to Grafana (`Configuration -> Data Sources -> Add Data Source`)
-3. Import [../dashboards/grafana/compliance.json](../dashboards/grafana/compliance.json) into Grafana (`Import -> Upload JSON File`).
diff --git a/plugins/source/k8s/dashboards/grafana/asset_inventory.json b/plugins/source/k8s/dashboards/grafana/asset_inventory.json
deleted file mode 100644
index 735fac91534361..00000000000000
--- a/plugins/source/k8s/dashboards/grafana/asset_inventory.json
+++ /dev/null
@@ -1,431 +0,0 @@
-{
- "__inputs": [
- {
- "name": "DS_POSTGRESQL",
- "label": "PostgreSQL",
- "description": "",
- "type": "datasource",
- "pluginId": "postgres",
- "pluginName": "PostgreSQL"
- }
- ],
- "__elements": [],
- "__requires": [
- {
- "type": "panel",
- "id": "barchart",
- "name": "Bar chart",
- "version": ""
- },
- {
- "type": "grafana",
- "id": "grafana",
- "name": "Grafana",
- "version": "8.4.7"
- },
- {
- "type": "panel",
- "id": "piechart",
- "name": "Pie chart",
- "version": ""
- },
- {
- "type": "datasource",
- "id": "postgres",
- "name": "PostgreSQL",
- "version": "1.0.0"
- },
- {
- "type": "panel",
- "id": "stat",
- "name": "Stat",
- "version": ""
- },
- {
- "type": "panel",
- "id": "table",
- "name": "Table",
- "version": ""
- }
- ],
- "annotations": {
- "list": [
- {
- "builtIn": 1,
- "datasource": "-- Grafana --",
- "enable": true,
- "hide": true,
- "iconColor": "rgba(0, 211, 255, 1)",
- "name": "Annotations & Alerts",
- "target": {
- "limit": 100,
- "matchAny": false,
- "tags": [],
- "type": "dashboard"
- },
- "type": "dashboard"
- }
- ]
- },
- "editable": true,
- "fiscalYearStartMonth": 0,
- "graphTooltip": 0,
- "id": null,
- "iteration": 1653764777747,
- "links": [],
- "liveNow": false,
- "panels": [
- {
- "datasource": "${DS_POSTGRESQL}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 7,
- "x": 0,
- "y": 0
- },
- "id": 6,
- "options": {
- "colorMode": "value",
- "graphMode": "area",
- "justifyMode": "auto",
- "orientation": "auto",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": false
- },
- "textMode": "auto"
- },
- "pluginVersion": "8.4.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "select count(*) from k8s_resources where context in (${contexts}) and _cq_table in (${cq_tables}) ;",
- "refId": "A"
- }
- ],
- "title": "Total Resources",
- "type": "stat"
- },
- {
- "datasource": "${DS_POSTGRESQL}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "hideFrom": {
- "legend": false,
- "tooltip": false,
- "viz": false
- }
- },
- "mappings": []
- },
- "overrides": []
- },
- "gridPos": {
- "h": 9,
- "w": 8,
- "x": 7,
- "y": 0
- },
- "id": 8,
- "options": {
- "displayLabels": [
- "percent"
- ],
- "legend": {
- "displayMode": "list",
- "placement": "bottom"
- },
- "pieType": "pie",
- "reduceOptions": {
- "calcs": [
- "lastNotNull"
- ],
- "fields": "",
- "values": true
- },
- "tooltip": {
- "mode": "single",
- "sort": "none"
- }
- },
- "pluginVersion": "8.4.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "select context, count(*) from k8s_resources where _cq_table in (${cq_tables}) group by context order by count desc;",
- "refId": "A"
- }
- ],
- "title": "Total Resources by Context",
- "type": "piechart"
- },
- {
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "thresholds"
- },
- "custom": {
- "align": "auto",
- "displayMode": "auto"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- },
- {
- "color": "red",
- "value": 80
- }
- ]
- }
- },
- "overrides": [
- {
- "matcher": {
- "id": "byName",
- "options": "_cq_table"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 326
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "context"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 188
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "_cq_sync_time"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 270
- }
- ]
- },
- {
- "matcher": {
- "id": "byName",
- "options": "_cq_id"
- },
- "properties": [
- {
- "id": "custom.width",
- "value": 293
- }
- ]
- }
- ]
- },
- "gridPos": {
- "h": 12,
- "w": 24,
- "x": 0,
- "y": 9
- },
- "id": 2,
- "options": {
- "footer": {
- "fields": "",
- "reducer": [
- "sum"
- ],
- "show": false
- },
- "showHeader": true,
- "sortBy": []
- },
- "pluginVersion": "8.4.7",
- "targets": [
- {
- "datasource": {
- "type": "postgres",
- "uid": "${DS_POSTGRESQL}"
- },
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "select _cq_id, _cq_table, context, uid, _cq_sync_time from k8s_resources where context in (${contexts}) and _cq_table in (${cq_tables}) ;",
- "refId": "A",
- "select": [
- [
- {
- "params": [
- "value"
- ],
- "type": "column"
- }
- ]
- ],
- "timeColumn": "time",
- "where": [
- {
- "name": "$__timeFilter",
- "params": [],
- "type": "macro"
- }
- ]
- }
- ],
- "title": "Kubernetes Resources",
- "type": "table"
- },
- {
- "datasource": "${DS_POSTGRESQL}",
- "fieldConfig": {
- "defaults": {
- "color": {
- "mode": "palette-classic"
- },
- "custom": {
- "align": "auto",
- "displayMode": "auto"
- },
- "mappings": [],
- "thresholds": {
- "mode": "absolute",
- "steps": [
- {
- "color": "green",
- "value": null
- }
- ]
- }
- },
- "overrides": []
- },
- "gridPos": {
- "h": 12,
- "w": 6,
- "x": 0,
- "y": 21
- },
- "id": 4,
- "options": {
- "footer": {
- "fields": "",
- "reducer": [
- "sum"
- ],
- "show": false
- },
- "showHeader": true
- },
- "pluginVersion": "8.4.7",
- "targets": [
- {
- "format": "table",
- "group": [],
- "metricColumn": "none",
- "rawQuery": true,
- "rawSql": "select _cq_table, count(*) from k8s_resources where context in (${contexts}) group by _cq_table order by count desc;",
- "refId": "A"
- }
- ],
- "title": "Count by Resource Type",
- "type": "table"
- }
- ],
- "schemaVersion": 35,
- "style": "dark",
- "tags": [],
- "templating": {
- "list": [
- {
- "current": {},
- "datasource": {
- "type": "postgres",
- "uid": "${DS_POSTGRESQL}"
- },
- "definition": "select distinct(context) from k8s_resources",
- "hide": 0,
- "includeAll": true,
- "multi": true,
- "name": "contexts",
- "options": [],
- "query": "select distinct(context) from k8s_resources",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "type": "query"
- },
- {
- "current": {},
- "definition": "select distinct(_cq_table) from k8s_resources;",
- "hide": 0,
- "includeAll": true,
- "multi": true,
- "name": "cq_tables",
- "options": [],
- "query": "select distinct(_cq_table) from k8s_resources;",
- "refresh": 1,
- "regex": "",
- "skipUrlSync": false,
- "sort": 0,
- "type": "query",
- "datasource": "${DS_POSTGRESQL}"
- }
- ]
- },
- "time": {
- "from": "now-6h",
- "to": "now"
- },
- "timepicker": {},
- "timezone": "",
- "title": "Kubernetes Asset Inventory",
- "uid": "eiYa2uch6R",
- "version": 2,
- "weekStart": ""
-}
\ No newline at end of file
diff --git a/plugins/source/k8s/dashboards/grafana/asset_inventory.png b/plugins/source/k8s/dashboards/grafana/asset_inventory.png
deleted file mode 100644
index cbcaa7c4e9cf9c8049881240ba7573f4e28044cc..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 185306
zcmcfoWmuHm7dH%#f{22MASDRW9WvAm-QC^o&>-C@-6ae#ba!`3NX^iVgmiZb_>9;6
zzu)8i_H@%N@M6shh(O_K5$ps+`-#RE)9&oE 9ZrmF<(Lq}P=rK#A{!&N1-{nQ5QhvPZThyi@*Uo0Zs|0%Q=$1j_>1KPBPQ
z6l|*sNiE6kONqe8_}w(GEwp4)fll5d+1?F2rA&6)QgRWgR)(tNQkIKH3iffVP9ay%
z;^I3)^%T;R5?%@ojzNb>W1mNGv5mGQ0i=`eQ1gpxY4L$a_0;@=<^msM@r$IU 0-#~sVaMQ*Auhl<~rLH@PoxTNkZx|4zJFXdVKC(cCS?ldr2ixsGC(+j~-)_AB
zvfF)`PJ7R8)DzWlY1Z+jR8&cEv(!CIRuPSX5IEe%cF8tG^9J`cwa140k*&E2KNQ~I_%+{1zEEG0pSp2i^E<^m;N%N~_
zICd|I(ckgX^E()pb4)cy(Ykk{Ukb@f>0LO>*r@gD#fgW`->*E7<~u>1bdka6xA9~B
zf&LWBmX%{&j?qUslndqx%_|wxj`z
z*oFlOT;IrJ#_E$zC8GiO5%Sv^@=js*Zmj8Vt3sc8BOfb66ptWirS2vXoB1&ch?Hf2
z5cxCWy=;4g`90~QyHBd{>@rE$9|8f99TE5L-0E<0^8;T1XRi{0Eh5pwJzZ+7G4M$i
zxSTYJo4P7r3cwAfpa$v)^PB5?YY)Qn_9QflS~-t`U-NG~s
ed4hx+P6kIwh+JHdEHg8<6e`+_o6HttFtdT9J@B8E