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

@@ -16,9 +16,11 @@ type InfinibandCollector struct {
MetricCollector
}
func (m *InfinibandCollector) Init() {
func (m *InfinibandCollector) Init() error {
m.name = "InfinibandCollector"
m.setup()
_, err := ioutil.ReadFile(string(LIDFILE))
return err
}
func (m *InfinibandCollector) Read(interval time.Duration) {