mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
|
{
|
||
|
_config+:: {
|
||
|
grafanaRequestsFailingThresholdPercent: 50,
|
||
|
},
|
||
|
|
||
|
prometheusAlerts+:: {
|
||
|
groups+: [
|
||
|
{
|
||
|
name: 'GrafanaAlerts',
|
||
|
rules: [
|
||
|
{
|
||
|
alert: 'GrafanaRequestsFailing',
|
||
|
expr: |||
|
||
|
100 * namespace_job_handler_statuscode:grafana_http_request_duration_seconds_count:rate5m{handler!~"/api/datasources/proxy/:id.*|/api/ds/query|/api/tsdb/query", status_code=~"5.."}
|
||
|
/ ignoring (status_code)
|
||
|
sum without (status_code) (namespace_job_handler_statuscode:grafana_http_request_duration_seconds_count:rate5m{handler!~"/api/datasources/proxy/:id.*|/api/ds/query|/api/tsdb/query"})
|
||
|
> %(grafanaRequestsFailingThresholdPercent)s
|
||
|
||| % $._config,
|
||
|
labels: {
|
||
|
severity: 'warning',
|
||
|
},
|
||
|
annotations: {
|
||
|
message: '{{ $labels.namespace }}/{{ $labels.job }}/{{ $labels.handler }} is experiencing {{ $value | humanize }}% errors',
|
||
|
},
|
||
|
'for': '5m',
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
}
|