Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
kube-prometheus
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
prometheus-operator
kube-prometheus
Commits
49835437
Commit
49835437
authored
6 years ago
by
Matthias Loibl
Browse files
Options
Downloads
Patches
Plain Diff
Add AlertmanagerMembersInconsistent alerting rule
parent
95dd9a95
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
jsonnet/kube-prometheus/alerts/alertmanager.libsonnet
+15
-0
15 additions, 0 deletions
jsonnet/kube-prometheus/alerts/alertmanager.libsonnet
jsonnet/kube-prometheus/alerts/tests.yaml
+44
-0
44 additions, 0 deletions
jsonnet/kube-prometheus/alerts/tests.yaml
with
59 additions
and
0 deletions
jsonnet/kube-prometheus/alerts/alertmanager.libsonnet
+
15
−
0
View file @
49835437
...
@@ -30,6 +30,21 @@
...
@@ -30,6 +30,21 @@
severity
:
'warning'
,
severity
:
'warning'
,
},
},
},
},
{
alert
:
'AlertmanagerMembersInconsistent'
,
annotations
:{
message
:
'Alertmanager has not found all other members of the cluster.'
,
},
expr
:
|||
alertmanager_cluster_members{%(alertmanagerSelector)s}
!= on (service)
count by (service) (alertmanager_cluster_members{%(alertmanagerSelector)s})
|||
%
$
.
_config
,
'for'
:
'5m'
,
labels
:
{
severity
:
'critical'
,
},
},
],
],
},
},
],
],
...
...
This diff is collapsed.
Click to expand it.
jsonnet/kube-prometheus/alerts/tests.yaml
0 → 100644
+
44
−
0
View file @
49835437
# TODO(metalmatze): This file is temporarily saved here for later reference
# until we find out how to integrate the tests into our jsonnet stack.
rule_files
:
-
rules.yaml
evaluation_interval
:
1m
tests
:
-
interval
:
1m
input_series
:
-
series
:
'
alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.0",namespace="monitoring",pod="alertmanager-main-0",service="alertmanager-main"}'
values
:
'
3
3
3
3
3
2
2
2
2
2
2
1
1
1
1
1
1
0
0
0
0
0
0'
-
series
:
'
alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.1",namespace="monitoring",pod="alertmanager-main-1",service="alertmanager-main"}'
values
:
'
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3'
-
series
:
'
alertmanager_cluster_members{job="alertmanager-main",instance="10.10.10.2",namespace="monitoring",pod="alertmanager-main-2",service="alertmanager-main"}'
values
:
'
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3'
alert_rule_test
:
-
eval_time
:
5m
alertname
:
AlertmanagerMembersInconsistent
-
eval_time
:
11m
alertname
:
AlertmanagerMembersInconsistent
exp_alerts
:
-
exp_labels
:
service
:
'
alertmanager-main'
severity
:
critical
exp_annotations
:
message
:
'
Alertmanager
has
not
found
all
other
members
of
the
cluster.'
-
eval_time
:
17m
alertname
:
AlertmanagerMembersInconsistent
exp_alerts
:
-
exp_labels
:
service
:
'
alertmanager-main'
severity
:
critical
exp_annotations
:
message
:
'
Alertmanager
has
not
found
all
other
members
of
the
cluster.'
-
eval_time
:
23m
alertname
:
AlertmanagerMembersInconsistent
exp_alerts
:
-
exp_labels
:
service
:
'
alertmanager-main'
severity
:
critical
exp_annotations
:
message
:
'
Alertmanager
has
not
found
all
other
members
of
the
cluster.'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment