Skip to content

Commit e2d4de4

Browse files
committed
diagd: log error message when reporting unhealthy
I noticed that there seem to be transient periods of unhealthiness, so let’s figure out which particular check is failing.
1 parent 128a7e9 commit e2d4de4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/diagd/diagd.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ func logic() error {
149149
mu.Lock()
150150
re := mJSON.Evaluate()
151151
mu.Unlock()
152-
if firstError(re) != "" {
152+
if err := firstError(re); err != "" {
153+
log.Printf("prometheus metric reporting unhealthy: %v", err)
153154
return 0
154155
}
155156
return 1

0 commit comments

Comments
 (0)