Skip to content

Commit

Permalink
update dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
jritter committed Mar 16, 2024
1 parent a252177 commit 67eeccc
Showing 1 changed file with 98 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,11 @@ spec:
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 1,
"id": 3,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -90,7 +87,7 @@ spec:
{
"id": "color",
"value": {
"fixedColor": "semi-dark-green",
"fixedColor": "green",
"mode": "fixed"
}
}
Expand All @@ -105,7 +102,7 @@ spec:
{
"id": "color",
"value": {
"fixedColor": "semi-dark-red",
"fixedColor": "red",
"mode": "fixed"
}
}
Expand All @@ -121,21 +118,16 @@ spec:
},
"id": 2,
"options": {
"displayLabels": [
"percent"
],
"displayLabels": ["percent"],
"legend": {
"displayMode": "list",
"placement": "bottom",
"values": [
"percent"
]
"showLegend": true,
"values": ["percent"]
},
"pieType": "pie",
"pieType": "donut",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
Expand All @@ -146,23 +138,21 @@ spec:
},
"targets": [
{
"datasource": {
"type": "prometheus"
},
"editorMode": "code",
"expr": "count_values(\"openscap_result\", openscap_results)",
"disableTextWrap": false,
"editorMode": "builder",
"expr": "count_values(\"openscap_result\", openscap_results{target=~\"$target\", severity=~\"$severity\"})",
"fullMetaSearch": false,
"includeNullMetadata": true,
"legendFormat": "__auto",
"range": true,
"refId": "A"
"refId": "A",
"useBackend": false
}
],
"title": "Overall Check status",
"type": "piechart"
},
{
"datasource": {
"type": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -194,46 +184,48 @@ spec:
"id": 4,
"options": {
"displayMode": "gradient",
"maxVizHeight": 300,
"minVizHeight": 10,
"minVizWidth": 0,
"namePlacement": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"showUnfilled": true
"showUnfilled": true,
"sizing": "auto",
"valueMode": "color"
},
"pluginVersion": "9.0.5",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "prometheus"
},
"disableTextWrap": false,
"editorMode": "code",
"expr": "count by (severity) (openscap_results == 0)",
"expr": "count by(severity) (openscap_results{target=~\"$target\"} == 0)",
"fullMetaSearch": false,
"includeNullMetadata": true,
"legendFormat": "__auto",
"range": true,
"refId": "A"
"refId": "A",
"useBackend": false
}
],
"title": "Failed Rules by Severity",
"type": "bargauge"
},
{
"datasource": {
"type": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"cellOptions": {
"type": "auto"
},
"inspect": false
},
"mappings": [],
Expand Down Expand Up @@ -286,31 +278,32 @@ spec:
},
"id": 6,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"reducer": ["sum"],
"show": false
},
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.0.5",
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "prometheus"
},
"editorMode": "code",
"disableTextWrap": false,
"editorMode": "builder",
"exemplar": false,
"expr": "openscap_results == 0",
"expr": "openscap_results{target=~\"$target\", severity=~\"$severity\"} == 0",
"format": "table",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": true,
"interval": "",
"legendFormat": "__auto",
"range": false,
"refId": "A"
"refId": "A",
"useBackend": false
}
],
"title": "Failed Rules",
Expand Down Expand Up @@ -340,19 +333,70 @@ spec:
"type": "table"
}
],
"schemaVersion": 36,
"style": "dark",
"refresh": "",
"schemaVersion": 39,
"tags": [],
"templating": {
"list": []
"list": [
{
"allValue": ".+",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"definition": "label_values(openscap_results,target)",
"hide": 0,
"includeAll": true,
"label": "OpenSCAP Target",
"multi": false,
"name": "target",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(openscap_results,target)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": ".+",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"definition": "label_values(openscap_results,severity)",
"hide": 0,
"includeAll": true,
"label": "Severity",
"multi": false,
"name": "severity",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(openscap_results,severity)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "SCAPinoculars Metrics",
"title": "SCAPinoculars OpenSCAP Dashboard",
"version": 9,
"weekStart": ""
}
}

0 comments on commit 67eeccc

Please sign in to comment.