@@ -92,7 +92,8 @@ type IncidentView struct {
9292type GroupView struct {
9393 Name string // empty = ungrouped
9494 Up int
95- Total int
95+ Total int // enabled monitors only
96+ Disabled int
9697 Monitors []MonitorView
9798}
9899
@@ -164,6 +165,10 @@ func (s *Server) overview() overviewData {
164165 }
165166 g := & d .Groups [gi ]
166167 g .Monitors = append (g .Monitors , v )
168+ if v .Status == "disabled" {
169+ g .Disabled ++
170+ continue // disabled monitors don't count toward up/total health
171+ }
167172 g .Total ++
168173 if v .Status == "up" {
169174 g .Up ++
@@ -181,6 +186,10 @@ func (s *Server) overview() overviewData {
181186
182187func (s * Server ) monitorView (m config.Monitor ) MonitorView {
183188 v := MonitorView {Name : m .Name , Type : m .Type , Status : "pending" , Latency : "—" , Uptime24h : "—" }
189+ if ! m .IsEnabled () {
190+ v .Status = "disabled"
191+ return v // no checks run, nothing to read from the store
192+ }
184193
185194 results , err := s .st .RecentResults (m .Name , tickCount )
186195 if err != nil {
@@ -229,12 +238,15 @@ func (s *Server) detail(name string) (detailData, bool) {
229238 Type : mon .Type ,
230239 Status : "pending" , Uptime24h : "—" , Uptime30d : "—" ,
231240 }
241+ if ! mon .IsEnabled () {
242+ d .Status = "disabled"
243+ }
232244 rows , err := s .st .RecentResults (name , historyCount )
233245 if err != nil {
234246 slog .Error ("loading results" , "monitor" , name , "error" , err )
235247 }
236248 d .Rows = rows
237- if len (rows ) > 0 {
249+ if mon . IsEnabled () && len (rows ) > 0 {
238250 if rows [0 ].OK {
239251 d .Status = "up"
240252 } else {
0 commit comments