mirror of
https://github.com/kyverno/policy-reporter.git
synced 2024-12-14 11:57:32 +00:00
Monitoring Improvements
This commit is contained in:
parent
a55318e01a
commit
a9f8523554
7 changed files with 199 additions and 63 deletions
64
README.md
64
README.md
|
@ -164,14 +164,70 @@ The Helm Chart includes optional Sub Chart for the [MonitoringStack](https://git
|
|||
* Change the `namespace` to your required monitoring namespace by changing `monitoring.namespace` (default: `cattle-dashboards`)
|
||||
* With `monitoring.serviceMonitor.labels` you can add additional labels to the `ServiceMonitor`. This helps to match the `serviceMonitorSelector` configuration of your Prometheus resource
|
||||
|
||||
|
||||
If you are not using the MonitoringStack you can import the dashboards from [Grafana](https://grafana.com/orgs/policyreporter/dashboards)
|
||||
|
||||
Example Installation
|
||||
### Example Installation
|
||||
```bash
|
||||
helm install policy-reporter policy-reporter/policy-reporter --set monitoring.enabled=true --set monitoring.namespace=cattle-dashboards -n policy-reporter --create-namespace
|
||||
```
|
||||
|
||||
### Customized Dashboards
|
||||
|
||||
The Monitoring Subchart offers several values for changing the height or disabling different components of the individual dashboards.
|
||||
|
||||
To change a value of this subchart you have to prefix each option with `monitoring.`
|
||||
|
||||
Example
|
||||
|
||||
```bash
|
||||
helm install policy-reporter policy-reporter/policy-reporter --set monitoring.enabled=true --set monitoring.policyReportDetails.secondStatusRow.enabled=false -n policy-reporter --create-namespace
|
||||
```
|
||||
|
||||
#### PolicyReport Details Dashboard
|
||||
|
||||
| Value | Default |
|
||||
|-------|---------|
|
||||
| policyReportDetails.firstStatusRow.height | 6 |
|
||||
| policyReportDetails.secondStatusRow.enabled | true |
|
||||
| policyReportDetails.secondStatusRow.height | 2 |
|
||||
| policyReportDetails.statusTimeline.enabled | true |
|
||||
| policyReportDetails.statusTimeline.height | 8 |
|
||||
| policyReportDetails.passTable.enabled | true |
|
||||
| policyReportDetails.passTable.height | 8 |
|
||||
| policyReportDetails.failTable.enabled | true |
|
||||
| policyReportDetails.failTable.height | 8 |
|
||||
| policyReportDetails.warningTable.enabled | true |
|
||||
| policyReportDetails.warningTable.height | 4 |
|
||||
| policyReportDetails.errorTable.enabled | true |
|
||||
| policyReportDetails.errorTable.height | 4 |
|
||||
|
||||
#### ClusterPolicyReport Details Dashboard
|
||||
|
||||
| Value | Default |
|
||||
|-------|---------|
|
||||
| clusterPolicyReportDetails.statusRow.height | 6 |
|
||||
| clusterPolicyReportDetails.statusTimeline.enabled | true |
|
||||
| clusterPolicyReportDetails.statusTimeline.height | 8 |
|
||||
| clusterPolicyReportDetails.passTable.enabled | true |
|
||||
| clusterPolicyReportDetails.passTable.height | 8 |
|
||||
| clusterPolicyReportDetails.failTable.enabled | true |
|
||||
| clusterPolicyReportDetails.failTable.height | 8 |
|
||||
| clusterPolicyReportDetails.warningTable.enabled | true |
|
||||
| clusterPolicyReportDetails.warningTable.height | 4 |
|
||||
| clusterPolicyReportDetails.errorTable.enabled | true |
|
||||
| clusterPolicyReportDetails.errorTable.height | 4 |
|
||||
|
||||
#### PolicyReport Overview Dashboard
|
||||
|
||||
| Value | Default |
|
||||
|-------|---------|
|
||||
| policyReportOverview.failingSummaryRow.height | 8 |
|
||||
| policyReportOverview.failingTimeline.height | 10 |
|
||||
| policyReportOverview.failingPolicyRuleTable.height | 10 |
|
||||
| policyReportOverview.failingClusterPolicyRuleTable.height | 10 |
|
||||
|
||||
#### Grafana Dashboard Import
|
||||
|
||||
If you are not using the MonitoringStack you can import the dashboards from [Grafana](https://grafana.com/orgs/policyreporter/dashboards)
|
||||
|
||||
### Dashboard Preview
|
||||
|
||||
![PolicyReporter Grafana Dashboard](https://github.com/fjogeleit/policy-reporter/blob/main/docs/images/policy-reports-dashboard.png?raw=true)
|
||||
|
|
|
@ -3,7 +3,7 @@ name: policy-reporter
|
|||
description: K8s PolicyReporter watches for wgpolicyk8s.io/v1alpha1.PolicyReport resources. It creates Prometheus Metrics and can send rule validation events to different targets like Loki, Elasticsearch, Slack or Discord
|
||||
|
||||
type: application
|
||||
version: 0.14.1
|
||||
version: 0.15.0
|
||||
appVersion: 0.11.1
|
||||
|
||||
dependencies:
|
||||
|
|
|
@ -3,5 +3,5 @@ name: monitoring
|
|||
description: Policy Reporter Monitoring with predefined ServiceMonitor and Grafana Dashboards
|
||||
|
||||
type: application
|
||||
version: 0.2.0
|
||||
version: 0.3.0
|
||||
appVersion: 0.0.0
|
||||
|
|
|
@ -89,7 +89,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.statusRow.height }},
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
|
@ -145,7 +145,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.statusRow.height }},
|
||||
"w": 6,
|
||||
"x": 6,
|
||||
"y": 0
|
||||
|
@ -201,7 +201,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.statusRow.height }},
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
|
@ -257,7 +257,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.statusRow.height }},
|
||||
"w": 6,
|
||||
"x": 18,
|
||||
"y": 0
|
||||
|
@ -291,8 +291,9 @@ data:
|
|||
"timeShift": null,
|
||||
"title": "Policy Error Status",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- if .Values.clusterPolicyReportDetails.statusTimeline.enabled }}
|
||||
,{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
|
@ -306,7 +307,7 @@ data:
|
|||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.statusTimeline.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
|
@ -316,17 +317,19 @@ data:
|
|||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"current": true,
|
||||
"hideEmpty": true,
|
||||
"hideZero": true,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"nullPointMode": "null as zero",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.1.5",
|
||||
"pointradius": 2,
|
||||
|
@ -386,8 +389,10 @@ data:
|
|||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.clusterPolicyReportDetails.passTable.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
|
@ -411,7 +416,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.passTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 15
|
||||
|
@ -451,8 +456,10 @@ data:
|
|||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.clusterPolicyReportDetails.failTable.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
|
@ -476,7 +483,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.failTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 23
|
||||
|
@ -516,8 +523,10 @@ data:
|
|||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.clusterPolicyReportDetails.warningTable.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
|
@ -538,7 +547,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.warningTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 31
|
||||
|
@ -578,8 +587,10 @@ data:
|
|||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.clusterPolicyReportDetails.errorTable.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
|
@ -600,7 +611,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"h": {{ .Values.clusterPolicyReportDetails.errorTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 36
|
||||
|
@ -641,6 +652,7 @@ data:
|
|||
],
|
||||
"type": "table"
|
||||
}
|
||||
{{- end }}
|
||||
],
|
||||
"schemaVersion": 26,
|
||||
"style": "dark",
|
||||
|
|
|
@ -80,7 +80,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"h": {{ .Values.policyReportOverview.failingSummaryRow.height }},
|
||||
"w": 15,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
|
@ -139,7 +139,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"h": {{ .Values.policyReportOverview.failingSummaryRow.height }},
|
||||
"w": 9,
|
||||
"x": 15,
|
||||
"y": 0
|
||||
|
@ -190,7 +190,7 @@ data:
|
|||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"h": {{ .Values.policyReportOverview.failingTimeline.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 10
|
||||
|
@ -198,19 +198,21 @@ data:
|
|||
"hiddenSeries": false,
|
||||
"id": 11,
|
||||
"legend": {
|
||||
"alignAsTable": false,
|
||||
"alignAsTable": true,
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"current": true,
|
||||
"hideEmpty": true,
|
||||
"hideZero": true,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"nullPointMode": "null as zero",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.1.5",
|
||||
"pointradius": 2,
|
||||
|
@ -254,6 +256,7 @@ data:
|
|||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"decimals": 0,
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
|
@ -300,7 +303,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"h": {{ .Values.policyReportOverview.failingPolicyRuleTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 18
|
||||
|
@ -374,7 +377,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"h": {{ .Values.policyReportOverview.failingClusterPolicyRuleTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 28
|
||||
|
|
|
@ -89,7 +89,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"h": {{ .Values.policyReportDetails.firstStatusRow.height }},
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
|
@ -143,7 +143,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"h": {{ .Values.policyReportDetails.firstStatusRow.height }},
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
|
@ -175,8 +175,9 @@ data:
|
|||
"timeShift": null,
|
||||
"title": "Policy Fail Status",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- if .Values.policyReportDetails.secondStatusRow.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {},
|
||||
|
@ -197,7 +198,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"h": {{ .Values.policyReportDetails.secondStatusRow.height }},
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
|
@ -251,7 +252,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"h": {{ .Values.policyReportDetails.secondStatusRow.height }},
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
|
@ -283,8 +284,10 @@ data:
|
|||
"timeShift": null,
|
||||
"title": "Policy Error Status",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.policyReportDetails.statusTimeline.enabled }}
|
||||
,{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
|
@ -298,7 +301,7 @@ data:
|
|||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"h": {{ .Values.policyReportDetails.statusTimeline.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 11
|
||||
|
@ -308,17 +311,19 @@ data:
|
|||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"current": true,
|
||||
"hideEmpty": true,
|
||||
"hideZero": true,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"nullPointMode": "null as zero",
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.1.5",
|
||||
"pointradius": 2,
|
||||
|
@ -378,8 +383,10 @@ data:
|
|||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.policyReportDetails.passTable.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
|
@ -403,7 +410,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"h": {{ .Values.policyReportDetails.passTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 19
|
||||
|
@ -443,8 +450,10 @@ data:
|
|||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.policyReportDetails.failTable.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
|
@ -468,7 +477,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"h": {{ .Values.policyReportDetails.failTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 27
|
||||
|
@ -508,8 +517,10 @@ data:
|
|||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.policyReportDetails.warningTable.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
|
@ -530,7 +541,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"h": {{ .Values.policyReportDetails.warningTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 35
|
||||
|
@ -570,8 +581,10 @@ data:
|
|||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
}
|
||||
{{- end }}
|
||||
{{- if .Values.policyReportDetails.errorTable.enabled }}
|
||||
,{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
|
@ -592,7 +605,7 @@ data:
|
|||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"h": {{ .Values.policyReportDetails.errorTable.height }},
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 40
|
||||
|
@ -633,6 +646,7 @@ data:
|
|||
],
|
||||
"type": "table"
|
||||
}
|
||||
{{- end }}
|
||||
],
|
||||
"schemaVersion": 26,
|
||||
"style": "dark",
|
||||
|
|
|
@ -2,4 +2,55 @@ namespace: cattle-dashboards
|
|||
|
||||
serviceMonitor:
|
||||
# labels to match the serviceMonitorSelector of the Prometheus Resource
|
||||
labels: {}
|
||||
labels: {}
|
||||
|
||||
policyReportDetails:
|
||||
firstStatusRow:
|
||||
height: 6
|
||||
secondStatusRow:
|
||||
enabled: true
|
||||
height: 2
|
||||
statusTimeline:
|
||||
enabled: true
|
||||
height: 8
|
||||
passTable:
|
||||
enabled: true
|
||||
height: 8
|
||||
failTable:
|
||||
enabled: true
|
||||
height: 8
|
||||
warningTable:
|
||||
enabled: true
|
||||
height: 4
|
||||
errorTable:
|
||||
enabled: true
|
||||
height: 4
|
||||
|
||||
clusterPolicyReportDetails:
|
||||
statusRow:
|
||||
height: 6
|
||||
statusTimeline:
|
||||
enabled: true
|
||||
height: 8
|
||||
passTable:
|
||||
enabled: true
|
||||
height: 8
|
||||
failTable:
|
||||
enabled: true
|
||||
height: 8
|
||||
warningTable:
|
||||
enabled: true
|
||||
height: 4
|
||||
errorTable:
|
||||
enabled: true
|
||||
height: 4
|
||||
|
||||
policyReportOverview:
|
||||
failingSummaryRow:
|
||||
height: 8
|
||||
failingTimeline:
|
||||
height: 10
|
||||
failingPolicyRuleTable:
|
||||
height: 10
|
||||
failingClusterPolicyRuleTable:
|
||||
height: 10
|
||||
|
|
Loading…
Reference in a new issue