Merge pull request #2457 from grafana/dev

Dev to main
This commit is contained in:
Michael Derynck 2023-07-06 11:13:31 -06:00 committed by GitHub
commit 61245a4cf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 409 additions and 10 deletions

View file

@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
## v1.3.7 (2023-07-06)
### Changed
- OnCall Metrics dashboard update ([#2400](https://github.com/grafana/oncall/pull/2400))
## v1.3.6 (2023-07-05)

View file

@ -1,4 +1,4 @@
django==3.2.19
django==3.2.20
djangorestframework==3.12.4
slackclient==1.3.0
whitenoise==5.3.0

View file

@ -514,9 +514,14 @@ if SILK_PROFILER_ENABLED:
SILKY_AUTHENTICATION = True
SILKY_AUTHORISATION = True
SILKY_PYTHON_PROFILER_BINARY = getenv_boolean("SILKY_PYTHON_PROFILER_BINARY", default=False)
SILKY_MAX_RECORDED_REQUESTS = 10**4
SILKY_PYTHON_PROFILER = True
SILKY_IGNORE_PATHS = ["/health/", "/ready/"]
# see the following GitHub issue comment for why the following two settings are set the way they are
# https://github.com/jazzband/django-silk/issues/265#issuecomment-705482767
SILKY_MAX_RECORDED_REQUESTS_CHECK_PERCENT = 0.01
SILKY_MAX_RECORDED_REQUESTS = 100_000
if "SILKY_PYTHON_PROFILER_RESULT_PATH" in os.environ:
SILKY_PYTHON_PROFILER_RESULT_PATH = os.environ.get("SILKY_PYTHON_PROFILER_RESULT_PATH")

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"
}
],