File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 reverse_proxy 127.0.0.1:19999
9494 }
9595
96+ redir /glances /glances/
97+ handle_path /glances* {
98+ reverse_proxy 127.0.0.1:5124
99+ }
100+
96101 handle {
97102 reverse_proxy 127.0.0.1:8082
98103 }
143148 } ;
144149 } ;
145150 }
151+ {
152+ "Glances" = {
153+ icon = "glances" ;
154+ href = "/glances/" ; # Matches the Caddy path
155+ description = "Real-time Monitor" ;
156+ widget = {
157+ type = "customapi" ;
158+ url = "http://127.0.0.1:5124/api/4/all" ;
159+ refreshInterval = 3000 ; # Refresh every 3 seconds
160+
161+ # We map the JSON data manually to avoid the parsing bug
162+ mappings = [
163+ {
164+ field = "cpu.total" ;
165+ label = "CPU" ;
166+ format = "percent" ;
167+ }
168+ {
169+ field = "mem.percent" ;
170+ label = "RAM" ;
171+ format = "percent" ;
172+ }
173+ ] ;
174+ } ;
175+ } ;
176+ }
146177 ] ;
147178 }
148179 ] ;
You can’t perform that action at this time.
0 commit comments