Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit 13454c4

Browse files
committed
Monitoring support.
1 parent e1175e3 commit 13454c4

4 files changed

Lines changed: 853 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
9+
## [1.0.2] - 2024-12-17
10+
11+
### Added
12+
13+
- Added Prometheus Stack with Grafana dashboards
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
{
2+
"annotations": {
3+
"list": [
4+
{
5+
"builtIn": 1,
6+
"datasource": {
7+
"type": "datasource",
8+
"uid": "grafana"
9+
},
10+
"enable": true,
11+
"hide": true,
12+
"iconColor": "rgba(0, 211, 255, 1)",
13+
"name": "Annotations & Alerts",
14+
"type": "dashboard"
15+
}
16+
]
17+
},
18+
"description": "Cluster resource utilization dashboard",
19+
"editable": true,
20+
"fiscalYearStartMonth": 0,
21+
"graphTooltip": 1,
22+
"links": [],
23+
"panels": [
24+
{
25+
"datasource": {
26+
"type": "prometheus",
27+
"uid": "prometheus"
28+
},
29+
"fieldConfig": {
30+
"defaults": {
31+
"color": {
32+
"mode": "thresholds"
33+
},
34+
"mappings": [],
35+
"max": 100,
36+
"min": 0,
37+
"thresholds": {
38+
"mode": "absolute",
39+
"steps": [
40+
{
41+
"color": "green",
42+
"value": null
43+
},
44+
{
45+
"color": "yellow",
46+
"value": 60
47+
},
48+
{
49+
"color": "red",
50+
"value": 80
51+
}
52+
]
53+
},
54+
"unit": "percent"
55+
},
56+
"overrides": []
57+
},
58+
"gridPos": {
59+
"h": 8,
60+
"w": 12,
61+
"x": 0,
62+
"y": 0
63+
},
64+
"id": 1,
65+
"options": {
66+
"orientation": "auto",
67+
"reduceOptions": {
68+
"calcs": [
69+
"lastNotNull"
70+
],
71+
"fields": "",
72+
"values": false
73+
},
74+
"showThresholdLabels": false,
75+
"showThresholdMarkers": true
76+
},
77+
"pluginVersion": "11.4.0",
78+
"targets": [
79+
{
80+
"datasource": {
81+
"type": "prometheus",
82+
"uid": "prometheus"
83+
},
84+
"expr": "sum(container_memory_working_set_bytes{container!=\"\", node=~\"$node\", namespace=~\"$namespace\"}) / sum(kube_node_status_allocatable{resource=\"memory\", node=~\"$node\"}) * 100",
85+
"instant": false,
86+
"interval": "",
87+
"legendFormat": "Memory Usage",
88+
"refId": "A"
89+
}
90+
],
91+
"title": "Memory Utilization",
92+
"type": "gauge"
93+
},
94+
{
95+
"datasource": {
96+
"type": "prometheus",
97+
"uid": "prometheus"
98+
},
99+
"fieldConfig": {
100+
"defaults": {
101+
"color": {
102+
"mode": "thresholds"
103+
},
104+
"mappings": [],
105+
"max": 100,
106+
"min": 0,
107+
"thresholds": {
108+
"mode": "absolute",
109+
"steps": [
110+
{
111+
"color": "green",
112+
"value": null
113+
},
114+
{
115+
"color": "yellow",
116+
"value": 60
117+
},
118+
{
119+
"color": "red",
120+
"value": 80
121+
}
122+
]
123+
},
124+
"unit": "percent"
125+
},
126+
"overrides": []
127+
},
128+
"gridPos": {
129+
"h": 8,
130+
"w": 12,
131+
"x": 12,
132+
"y": 0
133+
},
134+
"id": 2,
135+
"options": {
136+
"orientation": "auto",
137+
"reduceOptions": {
138+
"calcs": [
139+
"lastNotNull"
140+
],
141+
"fields": "",
142+
"values": false
143+
},
144+
"showThresholdLabels": false,
145+
"showThresholdMarkers": true
146+
},
147+
"pluginVersion": "11.4.0",
148+
"targets": [
149+
{
150+
"datasource": {
151+
"type": "prometheus",
152+
"uid": "prometheus"
153+
},
154+
"expr": "sum(rate(container_cpu_usage_seconds_total{container!=\"\", node=~\"$node\", namespace=~\"$namespace\"}[5m])) / sum(kube_node_status_allocatable{resource=\"cpu\", node=~\"$node\"}) * 100",
155+
"instant": false,
156+
"interval": "",
157+
"legendFormat": "CPU Usage",
158+
"refId": "A"
159+
}
160+
],
161+
"title": "CPU Utilization",
162+
"type": "gauge"
163+
}
164+
],
165+
"refresh": "10s",
166+
"schemaVersion": 38,
167+
"style": "dark",
168+
"tags": [],
169+
"templating": {
170+
"list": [
171+
{
172+
"current": {
173+
"selected": true,
174+
"text": "All",
175+
"value": "$__all"
176+
},
177+
"datasource": {
178+
"type": "prometheus",
179+
"uid": "prometheus"
180+
},
181+
"definition": "label_values(kube_node_info, node)",
182+
"hide": 0,
183+
"includeAll": true,
184+
"label": "Node",
185+
"multi": false,
186+
"name": "node",
187+
"options": [],
188+
"query": "label_values(kube_node_info, node)",
189+
"refresh": 1,
190+
"regex": "",
191+
"skipUrlSync": false,
192+
"sort": 1,
193+
"type": "query"
194+
},
195+
{
196+
"current": {
197+
"selected": true,
198+
"text": "All",
199+
"value": "$__all"
200+
},
201+
"datasource": {
202+
"type": "prometheus",
203+
"uid": "prometheus"
204+
},
205+
"definition": "label_values(kube_namespace_status_phase, namespace)",
206+
"hide": 0,
207+
"includeAll": true,
208+
"label": "Namespace",
209+
"multi": false,
210+
"name": "namespace",
211+
"options": [],
212+
"query": "label_values(kube_namespace_status_phase, namespace)",
213+
"refresh": 1,
214+
"regex": "",
215+
"skipUrlSync": false,
216+
"sort": 1,
217+
"type": "query"
218+
}
219+
]
220+
},
221+
"time": {
222+
"from": "now-1h",
223+
"to": "now"
224+
},
225+
"timepicker": {
226+
"refresh_intervals": [
227+
"5s",
228+
"10s",
229+
"30s",
230+
"1m",
231+
"5m",
232+
"15m",
233+
"30m",
234+
"1h",
235+
"2h",
236+
"1d"
237+
]
238+
},
239+
"timezone": "browser",
240+
"title": "Cluster Resource Utilization",
241+
"uid": "cluster-utilization",
242+
"version": 1,
243+
"weekStart": ""
244+
}

0 commit comments

Comments
 (0)