"content":"# Kyverno\nA Kubernetes-native policy management engine\n\n#### About this dashboard\n\nThis dashboard represents generic insights that can be extracted from a cluster with Kyverno running.\n\n#### For more details around the metrics\n\nCheckout the [official docs of Kyverno metrics](https://kyverno.io/docs/monitoring/)",
"mode":"markdown"
},
"pluginVersion":"11.2.0",
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"refId":"A"
}
],
"transparent":true,
"type":"text"
},
{
"collapsed":false,
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"gridPos":{
"h":1,
"w":24,
"x":0,
"y":6
},
"id":12,
"panels":[],
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"refId":"A"
}
],
"title":"Latest Status",
"type":"row"
},
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"fieldConfig":{
"defaults":{
"color":{
"mode":"thresholds"
},
"mappings":[],
"max":100,
"min":0,
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"text",
"value":null
},
{
"color":"green",
"value":0
},
{
"color":"#eab839",
"value":25
},
{
"color":"red",
"value":50
},
{
"color":"red",
"value":100
}
]
},
"unit":"percent"
},
"overrides":[]
},
"gridPos":{
"h":6,
"w":6,
"x":0,
"y":7
},
"id":29,
"options":{
"minVizHeight":75,
"minVizWidth":75,
"orientation":"auto",
"reduceOptions":{
"calcs":[
"lastNotNull"
],
"fields":"",
"values":false
},
"showThresholdLabels":false,
"showThresholdMarkers":true,
"sizing":"auto",
"text":{}
},
"pluginVersion":"11.2.0",
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"exemplar":true,
"expr":"sum(increase(kyverno_policy_results_total{rule_result=\"fail\", cluster=~\"$cluster\"}[24h]) or vector(0))*100/sum(increase(kyverno_policy_results_total{cluster=~\"$cluster\"}[24h]))",
"expr":"sum(sum(increase(kyverno_policy_results_total{rule_result=\"fail\", cluster=~\"$cluster\"}[5m])) by (policy_name, policy_type)) by (policy_type)",
"interval":"",
"legendFormat":"Policy Type: {{policy_type}}",
"refId":"A"
}
],
"title":"Policy Failures",
"type":"timeseries"
},
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"fieldConfig":{
"defaults":{
"color":{
"mode":"palette-classic"
},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":10,
"gradientMode":"none",
"hideFrom":{
"legend":false,
"tooltip":false,
"viz":false
},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{
"type":"linear"
},
"showPoints":"never",
"spanNulls":false,
"stacking":{
"group":"A",
"mode":"none"
},
"thresholdsStyle":{
"mode":"off"
}
},
"mappings":[],
"min":0,
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
},
"unit":"short"
},
"overrides":[
{
"matcher":{
"id":"byName",
"options":"pass"
},
"properties":[
{
"id":"color",
"value":{
"fixedColor":"rgb(43, 219, 23)",
"mode":"fixed"
}
},
{
"id":"custom.lineStyle",
"value":{
"dash":[
10,
10
],
"fill":"dash"
}
}
]
},
{
"matcher":{
"id":"byName",
"options":"fail"
},
"properties":[
{
"id":"color",
"value":{
"fixedColor":"#F2495C",
"mode":"fixed"
}
}
]
}
]
},
"gridPos":{
"h":8,
"w":8,
"x":0,
"y":25
},
"id":31,
"options":{
"legend":{
"calcs":[
"lastNotNull",
"max",
"min"
],
"displayMode":"table",
"placement":"bottom",
"showLegend":true
},
"tooltip":{
"mode":"multi",
"sort":"none"
}
},
"pluginVersion":"8.1.0",
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"exemplar":true,
"expr":"sum(sum(increase(kyverno_policy_results_total{rule_execution_cause=\"admission_request\", cluster=~\"$cluster\"}[5m])) by (policy_name, rule_result)) by (rule_result)",
"expr":"sum(sum(increase(kyverno_policy_results_total{rule_execution_cause=\"background_scan\", cluster=~\"$cluster\"}[5m])) by (policy_name, rule_result)) by (rule_result)",
"expr":"count(count(kyverno_policy_rule_info_total{policy_background_mode=\"true\", cluster=~\"$cluster\"}==1) by (policy_name, policy_type)) by (policy_type)",
"interval":"",
"legendFormat":"Policy Type: {{policy_type}}",
"refId":"A"
}
],
"title":"Active Policies running in background mode",
"type":"timeseries"
},
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"fieldConfig":{
"defaults":{
"color":{
"mode":"palette-classic"
},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":10,
"gradientMode":"none",
"hideFrom":{
"legend":false,
"tooltip":false,
"viz":false
},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{
"type":"linear"
},
"showPoints":"never",
"spanNulls":false,
"stacking":{
"group":"A",
"mode":"none"
},
"thresholdsStyle":{
"mode":"off"
}
},
"mappings":[],
"min":0,
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
},
"unit":"short"
},
"overrides":[]
},
"gridPos":{
"h":8,
"w":8,
"x":0,
"y":42
},
"id":21,
"options":{
"legend":{
"calcs":[
"lastNotNull",
"max",
"min"
],
"displayMode":"table",
"placement":"bottom",
"showLegend":true
},
"tooltip":{
"mode":"multi",
"sort":"none"
}
},
"pluginVersion":"8.1.0",
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"exemplar":true,
"expr":"count(count(kyverno_policy_rule_info_total{policy_namespace!=\"-\", cluster=~\"$cluster\"}==1) by (policy_name, policy_namespace)) by (policy_namespace)",
"expr":"count(count(kyverno_policy_rule_info_total{cluster=~\"$cluster\"}==1) by (rule_type, rule_name)) by (rule_type)",
"interval":"",
"legendFormat":"Rule Type: {{rule_type}}",
"refId":"A"
}
],
"title":"Active Rules (by rule type)",
"type":"timeseries"
},
{
"collapsed":false,
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"gridPos":{
"h":1,
"w":24,
"x":0,
"y":50
},
"id":34,
"panels":[],
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"refId":"A"
}
],
"title":"Policy-Rule Execution Latency",
"type":"row"
},
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"fieldConfig":{
"defaults":{
"color":{
"mode":"palette-classic"
},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":10,
"gradientMode":"none",
"hideFrom":{
"legend":false,
"tooltip":false,
"viz":false
},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{
"type":"linear"
},
"showPoints":"never",
"spanNulls":false,
"stacking":{
"group":"A",
"mode":"none"
},
"thresholdsStyle":{
"mode":"off"
}
},
"mappings":[],
"min":0,
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
},
"unit":"s"
},
"overrides":[]
},
"gridPos":{
"h":8,
"w":9,
"x":0,
"y":51
},
"id":36,
"options":{
"legend":{
"calcs":[
"lastNotNull",
"max",
"min"
],
"displayMode":"table",
"placement":"bottom",
"showLegend":true
},
"tooltip":{
"mode":"multi",
"sort":"none"
}
},
"pluginVersion":"8.1.0",
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"exemplar":true,
"expr":"sum(rate(kyverno_policy_execution_duration_seconds_sum{cluster=~\"$cluster\"}[5m])) by (rule_type) / sum(rate(kyverno_policy_execution_duration_seconds_count{cluster=~\"$cluster\"}[5m])) by (rule_type)",
"interval":"",
"legendFormat":"Rule Type: {{rule_type}}",
"refId":"A"
}
],
"title":"Average Rule Execution Latency Over Time",
"type":"timeseries"
},
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"fieldConfig":{
"defaults":{
"color":{
"mode":"palette-classic"
},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":10,
"gradientMode":"none",
"hideFrom":{
"legend":false,
"tooltip":false,
"viz":false
},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{
"type":"linear"
},
"showPoints":"never",
"spanNulls":false,
"stacking":{
"group":"A",
"mode":"none"
},
"thresholdsStyle":{
"mode":"off"
}
},
"mappings":[],
"min":0,
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
},
"unit":"clocks"
},
"overrides":[
{
"matcher":{
"id":"byName",
"options":"cluster"
},
"properties":[
{
"id":"color",
"value":{
"fixedColor":"#5794F2",
"mode":"fixed"
}
}
]
},
{
"matcher":{
"id":"byName",
"options":"namespaced"
},
"properties":[
{
"id":"color",
"value":{
"fixedColor":"#F2495C",
"mode":"fixed"
}
}
]
}
]
},
"gridPos":{
"h":8,
"w":9,
"x":9,
"y":51
},
"id":37,
"options":{
"legend":{
"calcs":[
"lastNotNull",
"max",
"min"
],
"displayMode":"table",
"placement":"bottom",
"showLegend":true
},
"tooltip":{
"mode":"multi",
"sort":"none"
}
},
"pluginVersion":"8.1.0",
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"exemplar":true,
"expr":"sum(rate(kyverno_policy_execution_duration_seconds_sum{cluster=~\"$cluster\"}[5m])) by (policy_type) / sum(rate(kyverno_policy_execution_duration_seconds_count{cluster=~\"$cluster\"}[5m])) by (policy_type)",
"interval":"",
"legendFormat":"Policy Type: {{policy_type}}",
"refId":"A"
}
],
"title":"Average Policy Execution Latency Over Time",
"expr":"avg(sum(kyverno_policy_execution_duration_seconds_sum{cluster=~\"$cluster\"}) by (policy_name, policy_type) / sum(kyverno_policy_execution_duration_seconds_count{cluster=~\"$cluster\"}) by (policy_name, policy_type))",
"interval":"",
"legendFormat":"",
"refId":"A"
}
],
"title":"Overall Average Policy Execution Latency",
"type":"stat"
},
{
"collapsed":false,
"datasource":null,
"gridPos":{
"h":1,
"w":24,
"x":0,
"y":59
},
"id":52,
"panels":[],
"targets":[
{
"datasource":null,
"refId":"A"
}
],
"title":"Admission Review Latency",
"type":"row"
},
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"fieldConfig":{
"defaults":{
"color":{
"mode":"palette-classic"
},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":10,
"gradientMode":"none",
"hideFrom":{
"legend":false,
"tooltip":false,
"viz":false
},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{
"type":"linear"
},
"showPoints":"never",
"spanNulls":false,
"stacking":{
"group":"A",
"mode":"none"
},
"thresholdsStyle":{
"mode":"off"
}
},
"mappings":[],
"min":0,
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
},
"unit":"s"
},
"overrides":[]
},
"gridPos":{
"h":8,
"w":9,
"x":0,
"y":60
},
"id":53,
"options":{
"legend":{
"calcs":[
"lastNotNull",
"max",
"min"
],
"displayMode":"table",
"placement":"bottom",
"showLegend":true
},
"tooltip":{
"mode":"multi",
"sort":"none"
}
},
"pluginVersion":"8.1.0",
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"exemplar":true,
"expr":"sum(rate(kyverno_admission_review_duration_seconds_sum{cluster=~\"$cluster\"}[5m])) by (resource_request_operation) / sum(rate(kyverno_admission_review_duration_seconds_count{cluster=~\"$cluster\"}[5m])) by (resource_request_operation)",
"title":"Avg - Admission Review Duration Over Time (by operation)",
"transparent":true,
"type":"timeseries"
},
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"fieldConfig":{
"defaults":{
"color":{
"mode":"palette-classic"
},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":10,
"gradientMode":"none",
"hideFrom":{
"legend":false,
"tooltip":false,
"viz":false
},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{
"type":"linear"
},
"showPoints":"never",
"spanNulls":false,
"stacking":{
"group":"A",
"mode":"none"
},
"thresholdsStyle":{
"mode":"off"
}
},
"mappings":[],
"min":0,
"thresholds":{
"mode":"absolute",
"steps":[
{
"color":"green",
"value":null
},
{
"color":"red",
"value":80
}
]
},
"unit":"s"
},
"overrides":[]
},
"gridPos":{
"h":8,
"w":9,
"x":9,
"y":60
},
"id":54,
"options":{
"legend":{
"calcs":[
"lastNotNull",
"max",
"min"
],
"displayMode":"table",
"placement":"bottom",
"showLegend":true
},
"tooltip":{
"mode":"multi",
"sort":"none"
}
},
"pluginVersion":"8.1.0",
"targets":[
{
"datasource":{
"uid":"${DS_PROMETHEUS_KYVERNO}"
},
"exemplar":true,
"expr":"sum(rate(kyverno_admission_review_duration_seconds_sum{cluster=~\"$cluster\"}[5m])) by (resource_kind) / sum(rate(kyverno_admission_review_duration_seconds_count{cluster=~\"$cluster\"}[5m])) by (resource_kind)",