Return error at Init for skip collectors early

This commit is contained in:
Thomas Roehl
2021-05-14 19:21:16 +02:00
parent 9b59429a93
commit 6b6e28d4c7
9 changed files with 19 additions and 9 deletions

View File

@@ -13,9 +13,10 @@ type CpustatCollector struct {
MetricCollector
}
func (m *CpustatCollector) Init() {
func (m *CpustatCollector) Init() error {
m.name = "CpustatCollector"
m.setup()
return nil
}
func ParseStatLine(line string, out map[string]interface{}) {