Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: revert new grafana alertmanager dashboard #391

Merged
merged 1 commit into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions changelogs/fragments/250.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
---
major_changes:
- grafana - add Alertmanager datasource to Grafana to allow direct alert management via Grafana
- grafana - update 'Prometheus Alerts' dashboard to include new alert panel interface for active alerts
trivial:
- grafana - Reverted new Alertmanager dashboard in Grafana for now until it can be fully integrated into other Crunchy products that use it
189 changes: 134 additions & 55 deletions grafana/common/Prometheus_Alerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,78 +3,164 @@
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": false,
"fiscalYearStartMonth": 0,
"gnetId": null,
"graphTooltip": 0,
"id": 8,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "crunchyprometheus"
},
"columns": [],
"datasource": null,
"fontSize": "100%",
"gridPos": {
"h": 8,
"h": 7,
"w": 24,
"x": 0,
"y": 0
},
"id": 5,
"options": {
"alertInstanceLabelFilter": "",
"alertName": "",
"dashboardAlerts": false,
"datasource": "PROMETHEUS",
"groupBy": [],
"groupMode": "default",
"maxItems": 20,
"sortOrder": 1,
"stateFilter": {
"error": true,
"firing": true,
"noData": false,
"normal": false,
"pending": true
},
"viewMode": "list"
"id": 2,
"links": [],
"options": {},
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
"col": 0,
"desc": true
},
"styles": [
{
"alias": "Time",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"link": false,
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"colorMode": "row",
"colors": [
"rgba(50, 172, 45, 0.97)",
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 0,
"link": false,
"mappingType": 1,
"pattern": "severity_num",
"thresholds": [
"200",
"300"
],
"type": "string",
"unit": "none"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "__name__",
"thresholds": [],
"type": "hidden",
"unit": "short"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "alertstate",
"thresholds": [],
"type": "hidden",
"unit": "short"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "Value",
"thresholds": [],
"type": "hidden",
"unit": "short"
},
{
"alias": "",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
"mappingType": 1,
"pattern": "alert_value",
"thresholds": [],
"type": "number",
"unit": "none"
}
],
"targets": [
{
"expr": "ALERTS{alertstate=\"firing\"}",
"format": "table",
"instant": true,
"interval": "",
"intervalFactor": 4,
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"title": "Active Alerts",
"type": "alertlist"
"transform": "table",
"type": "table"
},
{
"columns": [],
"datasource": {
"type": "prometheus",
"uid": "crunchyprometheus"
},
"datasource": null,
"fontSize": "100%",
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 8
"y": 7
},
"id": 3,
"links": [],
"options": {},
"pageSize": null,
"scroll": true,
"showHeader": true,
"sort": {
Expand All @@ -84,15 +170,13 @@
"styles": [
{
"alias": "Time",
"align": "auto",
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"link": false,
"pattern": "Time",
"type": "date"
},
{
"alias": "",
"align": "auto",
"colorMode": "row",
"colors": [
"rgba(50, 172, 45, 0.97)",
Expand All @@ -113,7 +197,7 @@
},
{
"alias": "",
"align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
Expand All @@ -129,7 +213,7 @@
},
{
"alias": "",
"align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
Expand All @@ -145,7 +229,7 @@
},
{
"alias": "",
"align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
Expand All @@ -161,7 +245,7 @@
},
{
"alias": "",
"align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
Expand All @@ -178,10 +262,6 @@
],
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "crunchyprometheus"
},
"expr": "ALERTS{alertstate=\"firing\"}",
"format": "table",
"instant": false,
Expand All @@ -194,11 +274,11 @@
"timeFrom": "1w",
"title": "Alert History (1 week)",
"transform": "table",
"type": "table-old"
"type": "table"
}
],
"refresh": "5m",
"schemaVersion": 37,
"schemaVersion": 21,
"style": "dark",
"tags": [],
"templating": {
Expand All @@ -224,6 +304,5 @@
"timezone": "",
"title": "Prometheus Alerts",
"uid": "QTsttxNmk",
"version": 1,
"weekStart": ""
"version": 2
}
19 changes: 1 addition & 18 deletions grafana/common/crunchy_grafana_datasource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,14 @@
# config file version
apiVersion: 1

deleteDatasources:
- name: PROMETHEUS
orgId: 1
- name: ALERTMANAGER
orgId: 1

datasources:
- name: PROMETHEUS
uid: crunchyprometheus
uid: PDC1078F23EBDF0E5
type: prometheus
access: proxy
url: http://localhost:9090
isDefault: True
editable: False
orgId: 1
version: 1
jsonData:
manageAlerts: 'true'
alertmanagerUid: 'crunchyalertmanager'
- name: ALERTMANAGER
uid: crunchyalertmanager
type: alertmanager
url: http://localhost:9093
access: proxy
jsonData:
implementation: 'prometheus'
handleGrafanaManagedAlerts: 'false'

2 changes: 1 addition & 1 deletion hugo/content/grafana/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pgMonitor comes with several dashboards ready to be used with automatic provisio
|OS Overview | Overview.json| Provides an overview that shows the up status of each system monitored by pgMonitor. |
|||
|ETCD Details | ETCD_Details.json | Provides details on the status of the ETCD cluster monitored by pgMonitor. |
|Prometheus Alerts | Prometheus_Alerts.json| Provides a summary list of current and recent alerts that have fired in Prometheus. Interaction with the Alertmanager to silence alerts is possible from the Alerting menu in Grafana. |
|Prometheus Alerts | Prometheus_Alerts.json| Provides a summary list of current and recent alerts that have fired in Prometheus. |

## Installation {#installation}

Expand Down