0 Votes

Code source wiki de CPU

Modifié par john le 2026/09/26 17:01

Masquer les derniers auteurs
john 2.1 1 Page //cpu// : supervision du serveur principal à partir de [[Glances>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Glances.WebHome]]. Les widgets ##gl-*## interrogent l'API de Glances lancé en mode web (##GLANCES_OPT=-w##), sans authentification et avec CORS autorisé : ni identifiant ni ##useProxy##. ##limit## règle le nombre de points des historiques. Déploiement et configuration commune : [[Dashy>>Wiki Batcave John.Infrastructure.ServeurPrincipal.Dashy.WebHome]].
john 1.1 2
john 2.1 3 {{toc/}}
john 1.1 4
john 2.1 5 == pageInfo ==
6
john 1.1 7 {{code language="yaml"}}
8 pageInfo:
9 title: CPU
10 description: Resource Usage Monitoring
11 navLinks:
12 - title: Home
13 path: /
john 2.1 14 {{/code}}
15
16 == pages ==
17
18 {{code language="yaml"}}
john 1.1 19 pages:
20 - name: bookmarks
21 path: bookmark.yml
22 - name: news
23 path: news.yml
24 - name: cpu
25 path: cpu.yml
26 {{/code}}
27
28 == Sections ==
29
john 2.1 30 === CPU Usage ===
john 1.1 31
john 2.1 32 {{code language="yaml"}}
33 sections:
34 - name: CPU Usage
35 icon: fas fa-tachometer
36 displayData:
37 rows: 2
38 widgets:
39 - type: gl-current-cpu
40 options:
41 hostname: https://glances.<DOMAINE>
42 id: 0_765_glcurrentcpu
43 - type: gl-current-cores
44 options:
45 hostname: https://glances.<DOMAINE>
46 id: 1_765_glcurrentcores
47 {{/code}}
john 1.1 48
john 2.1 49 === CPU History ===
john 1.1 50
john 2.1 51 {{code language="yaml"}}
52 sections:
53 - name: CPU History
54 icon: fas fa-microchip
55 displayData:
56 cols: 2
57 widgets:
58 - type: gl-cpu-history
59 options:
60 hostname: https://glances.<DOMAINE>
61 limit: 60
62 id: 0_1018_glcpuhistory
63 {{/code}}
john 1.1 64
john 2.1 65 === Disk Space ===
john 1.1 66
67 {{code language="yaml"}}
john 2.1 68 sections:
69 - name: Disk Space
70 icon: fas fa-hdd
71 widgets:
72 - type: gl-disk-space
john 1.1 73 options:
john 2.1 74 hostname: https://glances.<DOMAINE>
75 id: 0_919_gldiskspace
john 1.1 76 {{/code}}
77
john 2.1 78 === Network Interfaces ===
john 1.1 79
80 {{code language="yaml"}}
john 2.1 81 sections:
82 - name: Network Interfaces
83 icon: fas fa-ethernet
84 widgets:
85 - type: gl-network-interfaces
86 options:
87 hostname: https://glances.<DOMAINE>
88 limit: 500
89 id: 0_1806_glnetworkinterfaces
90 {{/code}}
91
92 === Network Activity ===
93
94 {{code language="yaml"}}
95 sections:
96 - name: Network Activity
97 icon: fas fa-exchange
98 displayData:
99 cols: 2
100 widgets:
101 - type: gl-network-traffic
102 options:
103 hostname: https://glances.<DOMAINE>
104 limit: 500
105 {{/code}}
106
107 === Disk IO ===
108
109 {{code language="yaml"}}
110 sections:
111 - name: Disk IO
112 icon: fas fa-disc-drive
113 widgets:
114 - type: gl-disk-io
115 options:
116 hostname: https://glances.<DOMAINE>
117 id: 0_579_gldiskio
118 {{/code}}
119
120 === Memory Usage ===
121
122 {{code language="yaml"}}
123 sections:
124 - name: Memory Usage
125 icon: fas fa-memory
126 widgets:
127 - type: gl-current-mem
128 options:
129 hostname: https://glances.<DOMAINE>
130 id: 0_1166_glcurrentmem
131 {{/code}}
132
133 === System Load ===
134
135 {{code language="yaml"}}
136 sections:
137 - name: System Load
138 icon: fas fa-tasks-alt
139 widgets:
140 - type: gl-system-load
141 options:
142 hostname: https://glances.<DOMAINE>
143 id: 0_1061_glsystemload
144 {{/code}}
145
146 === System Alerts ===
147
148 {{code language="yaml"}}
149 sections:
150 - name: System Alerts
151 icon: fas fa-sensor-alert
152 widgets:
153 - type: gl-alerts
154 options:
155 hostname: https://glances.<DOMAINE>
156 id: 0_1296_glalerts
157 {{/code}}
158
159 == Fichier complet ==
160
161 Le fichier ##cpu.yml## en un seul bloc, à copier tel quel dans ##user-data##.
162
163 {{html wiki="true"}}
164 <details><summary>Afficher cpu.yml complet</summary>
165
166 {{code language="yaml"}}
167 pageInfo:
168 title: CPU
169 description: Resource Usage Monitoring
170 navLinks:
171 - title: Home
172 path: /
173 pages:
174 - name: bookmarks
175 path: bookmark.yml
176 - name: news
177 path: news.yml
178 - name: cpu
179 path: cpu.yml
180 sections:
181 - name: CPU Usage
182 icon: fas fa-tachometer
183 displayData:
184 rows: 2
185 widgets:
186 - type: gl-current-cpu
187 options:
188 hostname: https://glances.<DOMAINE>
189 id: 0_765_glcurrentcpu
190 - type: gl-current-cores
191 options:
192 hostname: https://glances.<DOMAINE>
193 id: 1_765_glcurrentcores
194
195 - name: CPU History
196 icon: fas fa-microchip
197 displayData:
198 cols: 2
199 widgets:
john 1.1 200 - type: gl-cpu-history
201 options:
john 2.1 202 hostname: https://glances.<DOMAINE>
john 1.1 203 limit: 60
john 2.1 204 id: 0_1018_glcpuhistory
205
206 - name: Disk Space
207 icon: fas fa-hdd
208 widgets:
209 - type: gl-disk-space
210 options:
211 hostname: https://glances.<DOMAINE>
212 id: 0_919_gldiskspace
213
214 - name: Network Interfaces
215 icon: fas fa-ethernet
216 widgets:
217 - type: gl-network-interfaces
218 options:
219 hostname: https://glances.<DOMAINE>
220 limit: 500
221 id: 0_1806_glnetworkinterfaces
222
223 - name: Network Activity
224 icon: fas fa-exchange
225 displayData:
226 cols: 2
227 widgets:
228 - type: gl-network-traffic
229 options:
230 hostname: https://glances.<DOMAINE>
231 limit: 500
232
233 - name: Disk IO
234 icon: fas fa-disc-drive
235 widgets:
236 - type: gl-disk-io
237 options:
238 hostname: https://glances.<DOMAINE>
239 id: 0_579_gldiskio
240
241 - name: Memory Usage
242 icon: fas fa-memory
243 widgets:
244 - type: gl-current-mem
245 options:
246 hostname: https://glances.<DOMAINE>
247 id: 0_1166_glcurrentmem
248
249 - name: System Load
250 icon: fas fa-tasks-alt
251 widgets:
252 - type: gl-system-load
253 options:
254 hostname: https://glances.<DOMAINE>
255 id: 0_1061_glsystemload
256
257 - name: System Alerts
258 icon: fas fa-sensor-alert
259 widgets:
260 - type: gl-alerts
261 options:
262 hostname: https://glances.<DOMAINE>
263 id: 0_1296_glalerts
john 1.1 264 {{/code}}
265
john 2.1 266 </details>
267 {{/html}}
john 1.1 268