File tree Expand file tree Collapse file tree
docker/grafana/provisioning/alerting Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Alert rules as code. Loaded at Grafana startup (and via the admin reload API).
2+ #
3+ # No notification policy / contact point is provisioned yet: until the team picks
4+ # a channel and an owner, a firing rule is visible in Grafana under Alerting >
5+ # Alert rules only. Routing it is a ~10 minute follow-up once that decision lands.
6+ #
7+ # noDataState is OK on purpose: the underlying metrics come from cAdvisor, which
8+ # ships in the same release as this file — but on an environment where cAdvisor
9+ # is not (yet) running, the rule must stay green instead of flapping on NoData.
10+
11+ apiVersion : 1
12+
13+ groups :
14+ - orgId : 1
15+ name : vs-capacity
16+ folder : Validation Service
17+ interval : 1m
18+ rules :
19+ - uid : worker-mem-80
20+ title : Worker memory above 80% of its limit
21+ condition : C
22+ data :
23+ - refId : A
24+ relativeTimeRange :
25+ from : 600
26+ to : 0
27+ datasourceUid : prometheus
28+ model :
29+ editorMode : code
30+ expr : max(container_memory_working_set_bytes{container_label_com_docker_swarm_service_name="validate_worker"} / container_spec_memory_limit_bytes{container_label_com_docker_swarm_service_name="validate_worker"})
31+ instant : true
32+ intervalMs : 1000
33+ legendFormat : __auto
34+ maxDataPoints : 43200
35+ range : false
36+ refId : A
37+ - refId : C
38+ relativeTimeRange :
39+ from : 600
40+ to : 0
41+ datasourceUid : __expr__
42+ model :
43+ conditions :
44+ - evaluator :
45+ params :
46+ - 0.8
47+ type : gt
48+ operator :
49+ type : and
50+ query :
51+ params :
52+ - C
53+ reducer :
54+ params : []
55+ type : last
56+ type : query
57+ datasource :
58+ type : __expr__
59+ uid : __expr__
60+ expression : A
61+ refId : C
62+ type : threshold
63+ noDataState : OK
64+ execErrState : OK
65+ for : 5m
66+ annotations :
67+ summary : >-
68+ A validate_worker replica is using more than 80% of its container
69+ memory limit. The sum of concurrent checks is approaching the fence —
70+ look at large uploads in flight before the kernel starts killing.
71+ labels :
72+ severity : warning
73+ isPaused : false
You can’t perform that action at this time.
0 commit comments