-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request grafana/cortex-jsonnet#207 from grafana/alertmanag…
…er-dashboard Add a dashboard for the Alertmanager
- Loading branch information
Showing
3 changed files
with
90 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
local utils = import 'mixin-utils/utils.libsonnet'; | ||
|
||
(import 'dashboard-utils.libsonnet') { | ||
|
||
'alertmanager.json': | ||
($.dashboard('Cortex / Alertmanager') + { uid: 'a76bee5913c97c918d9e56a3cc88cc28' }) | ||
.addClusterSelectorTemplates() | ||
.addRow( | ||
($.row('Headlines') + { | ||
height: '100px', | ||
showTitle: false, | ||
}) | ||
.addPanel( | ||
$.panel('Total Alerts') + | ||
$.statPanel('sum(cortex_alertmanager_alerts{%s})' % $.jobMatcher('alertmanager'), format='short') | ||
) | ||
.addPanel( | ||
$.panel('Total Silences') + | ||
$.statPanel('sum(cortex_alertmanager_silences{%s})' % $.jobMatcher('alertmanager'), format='short') | ||
) | ||
) | ||
.addRow( | ||
$.row('Alerts Received') | ||
.addPanel( | ||
$.panel('APS') + | ||
$.queryPanel( | ||
[ | ||
||| | ||
sum(rate(cortex_alertmanager_alerts_received_total{%s}[$__interval])) | ||
- | ||
sum(rate(cortex_alertmanager_alerts_invalid_total{%s}[$__interval])) | ||
||| % [$.jobMatcher('alertmanager'), $.jobMatcher('alertmanager')], | ||
'sum(rate(cortex_alertmanager_alerts_invalid_total{%s}[$__interval]))' % $.jobMatcher('alertmanager'), | ||
], | ||
['success', 'failed'] | ||
) | ||
) | ||
) | ||
.addRow( | ||
$.row('Alert Notifications') | ||
.addPanel( | ||
$.panel('NPS') + | ||
$.queryPanel( | ||
[ | ||
||| | ||
sum(rate(cortex_alertmanager_notifications_total{%s}[$__interval])) | ||
- | ||
sum(rate(cortex_alertmanager_notifications_failed_total{%s}[$__interval])) | ||
||| % [$.jobMatcher('alertmanager'), $.jobMatcher('alertmanager')], | ||
'sum(rate(cortex_alertmanager_notifications_failed_total{%s}[$__interval]))' % $.jobMatcher('alertmanager'), | ||
], | ||
['success', 'failed'] | ||
) | ||
) | ||
.addPanel( | ||
$.panel('NPS by integration') + | ||
$.queryPanel( | ||
[ | ||
||| | ||
( | ||
sum(rate(cortex_alertmanager_notifications_total{%s}[$__interval])) by(integration) | ||
- | ||
sum(rate(cortex_alertmanager_notifications_failed_total{%s}[$__interval])) by(integration) | ||
) > 0 | ||
or on () vector(0) | ||
||| % [$.jobMatcher('alertmanager'), $.jobMatcher('alertmanager')], | ||
'sum(rate(cortex_alertmanager_notifications_failed_total{%s}[$__interval])) by(integration)' % $.jobMatcher('alertmanager'), | ||
], | ||
['success - {{ integration }}', 'failed - {{ integration }}'] | ||
) | ||
) | ||
.addPanel( | ||
$.panel('Latency') + | ||
$.latencyPanel('cortex_alertmanager_notification_latency_seconds', '{%s}' % $.jobMatcher('alertmanager')) | ||
) | ||
) | ||
.addRow( | ||
$.row('Configuration API (gateway) + Alertmanager UI') | ||
.addPanel( | ||
$.panel('QPS') + | ||
$.qpsPanel('cortex_request_duration_seconds_count{%s, route=~"api_v1_alerts|alertmanager"}' % $.jobMatcher($._config.job_names.gateway)) | ||
) | ||
.addPanel( | ||
$.panel('Latency') + | ||
utils.latencyRecordingRulePanel('cortex_request_duration_seconds', $.jobSelector($._config.job_names.gateway) + [utils.selector.re('route', 'api_v1_alerts|alertmanager')]) | ||
) | ||
), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters