mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 23:19:06 +01:00
Check that at least one sink is running
This commit is contained in:
parent
8e7143a20a
commit
a3ac8f2ead
@ -76,11 +76,17 @@ func (sm *sinkManager) Init(wg *sync.WaitGroup, sinkConfigFile string) error {
|
|||||||
for name, raw := range rawConfigs {
|
for name, raw := range rawConfigs {
|
||||||
err = sm.AddOutput(name, raw)
|
err = sm.AddOutput(name, raw)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cclog.ComponentError("SinkManager", err.Error())
|
cclog.ComponentError("SinkManager", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check that at least one sink is running
|
||||||
|
if !(len(sm.sinks) > 0) {
|
||||||
|
cclog.ComponentError("SinkManager", "Found no usable sinks")
|
||||||
|
return fmt.Errorf("Found no usable sinks")
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user