Catch panicing collectors (hello Nvidia Go Bindings) late.

This commit is contained in:
Thomas Roehl 2021-11-26 19:01:12 +01:00
parent cb8221e73c
commit 7a7ce0c1b3

View File

@ -243,9 +243,11 @@ func main() {
err = col.Init([]byte(conf)) err = col.Init([]byte(conf))
if err != nil { if err != nil {
log.Print("SKIP ", col.Name(), " (", err.Error(), ")") log.Print("SKIP ", col.Name(), " (", err.Error(), ")")
} else { } else if !col.Initialized() {
log.Print("Start ", col.Name()) log.Print("SKIP ", col.Name(), " (Not initialized)")
tmp = append(tmp, c) } else {
log.Print("Start ", col.Name())
tmp = append(tmp, c)
} }
} }
config.Collectors = tmp config.Collectors = tmp