Update oncall metrics dashboard (#2400)

# What this PR does
- Add new panels to OnCall Metrics dashboard with the new metric
"user_was_notified_of_alert_groups"
- Remove unused param for dashboard tab from plugin.json
- Fix old panels

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
This commit is contained in:
Yulya Artyukhina 2023-07-06 12:38:04 +02:00 committed by GitHub
parent 8c8c1fa5fc
commit 0810d8a967
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 401 additions and 7 deletions

View file

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Changed
- OnCall Metrics dashboard update ([#2400](https://github.com/grafana/oncall/pull/2400))
## v1.3.6 (2023-07-05)
### Fixed

View file

@ -673,7 +673,7 @@
"editorMode": "code",
"excludeNullMetadata": false,
"exemplar": false,
"expr": "increase(max_over_time(sum by (integration) (avg without(pod, instance) ($alert_groups_total{slug=~\"$instance\", team=~\"$team\", integration=~\"$integration\"}))[1h:])[1h:])",
"expr": "increase(max_over_time(sum by (integration) (avg without(pod, instance) ($alert_groups_total{slug=~\"$instance\", team=~\"$team\", integration=~\"$integration\"}))[30m:])[1h:])",
"fullMetaSearch": false,
"instant": false,
"legendFormat": "__auto",
@ -1054,9 +1054,368 @@
"x": 0,
"y": 55
},
"id": 38,
"panels": [],
"title": "Notified alert groups by Users (based on all Integrations)",
"type": "row"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 80,
"gradientMode": "opacity",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byValue",
"options": {
"op": "gte",
"reducer": "allIsZero",
"value": 0
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": true,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 56
},
"id": 36,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"disableTextWrap": false,
"editorMode": "code",
"excludeNullMetadata": false,
"exemplar": false,
"expr": "increase(max_over_time(sum by (username) (avg without(pod, instance) ($user_was_notified_of_alert_groups_total{slug=~\"$instance\"}))[30m:])[1h:])",
"fullMetaSearch": false,
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "New alert groups notifications during time period",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"cellOptions": {
"mode": "gradient",
"type": "gauge",
"valueDisplayMode": "color"
},
"filterable": false,
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Username"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"type": "auto"
}
},
{
"id": "custom.width",
"value": 300
}
]
}
]
},
"gridPos": {
"h": 11,
"w": 12,
"x": 0,
"y": 66
},
"id": 35,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": ["sum"],
"show": false
},
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.5.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"exemplar": false,
"expr": "sort_desc(max_over_time(sum by(username) (avg without(pod, instance)($user_was_notified_of_alert_groups_total{slug=~\"$instance\"}))[1d:]))",
"format": "table",
"instant": true,
"legendFormat": "__auto",
"range": false,
"refId": "A"
}
],
"title": "New alert groups notifications in total",
"transformations": [
{
"id": "seriesToRows",
"options": {}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"username": false
},
"indexByName": {},
"renameByName": {
"Metric": "Integration",
"Value": "Alert groups",
"team": "Team",
"username": "Username"
}
}
}
],
"type": "table"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"cellOptions": {
"type": "gauge"
},
"filterable": false,
"inspect": false
},
"decimals": 0,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Username"
},
"properties": [
{
"id": "custom.cellOptions",
"value": {
"type": "auto"
}
},
{
"id": "custom.width",
"value": 300
}
]
}
]
},
"gridPos": {
"h": 11,
"w": 12,
"x": 12,
"y": 66
},
"id": 37,
"options": {
"cellHeight": "sm",
"footer": {
"countRows": false,
"fields": "",
"reducer": ["sum"],
"show": false
},
"showHeader": true,
"sortBy": []
},
"pluginVersion": "9.5.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"editorMode": "code",
"exemplar": false,
"expr": "sort_desc(increase(max_over_time(sum by (username) (avg without(pod, instance) ($user_was_notified_of_alert_groups_total{slug=~\"$instance\"}))[1h:])[$__range:]))",
"format": "table",
"instant": true,
"legendFormat": "__auto",
"range": false,
"refId": "A"
}
],
"title": "New alert groups notifications for period",
"transformations": [
{
"id": "seriesToRows",
"options": {}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"username": false
},
"indexByName": {},
"renameByName": {
"Metric": "Integration",
"Value": "Alert groups",
"team": "Team",
"username": "Username"
}
}
}
],
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 77
},
"id": 12,
"panels": [],
"title": "Users data",
"title": "Teams data",
"type": "row"
},
{
@ -1116,7 +1475,7 @@
"h": 11,
"w": 12,
"x": 0,
"y": 56
"y": 78
},
"id": 22,
"options": {
@ -1232,7 +1591,7 @@
"h": 11,
"w": 12,
"x": 12,
"y": 56
"y": 78
},
"id": 23,
"options": {
@ -1313,6 +1672,11 @@
"type": "datasource"
},
{
"current": {
"selected": true,
"text": ["oncall_alert_groups_total", "grafanacloud_oncall_instance_alert_groups_total"],
"value": ["oncall_alert_groups_total", "grafanacloud_oncall_instance_alert_groups_total"]
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
@ -1321,7 +1685,7 @@
"hide": 2,
"includeAll": false,
"label": "alert_groups_total",
"multi": false,
"multi": true,
"name": "alert_groups_total",
"options": [],
"query": {
@ -1401,6 +1765,33 @@
"type": "query"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "metrics(user_was_notified_of_alert_groups_total)",
"hide": 2,
"includeAll": false,
"label": "user_was_notified_of_alert_groups_total",
"multi": false,
"name": "user_was_notified_of_alert_groups_total",
"options": [],
"query": {
"query": "metrics(user_was_notified_of_alert_groups_total)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": ["All"],
"value": ["$__all"]
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
@ -1488,6 +1879,6 @@
},
"timezone": "browser",
"title": "OnCall Metrics",
"version": 0,
"version": 1,
"weekStart": ""
}

View file

@ -113,7 +113,6 @@
{
"type": "dashboard",
"path": "dashboards/oncall_metrics_dashboard.json",
"addToNav": true,
"name": "OnCall Metrics"
}
],