mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +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 {
|
||||
err = sm.AddOutput(name, raw)
|
||||
if err != nil {
|
||||
cclog.ComponentError("SinkManager", err.Error())
|
||||
cclog.ComponentError("SinkManager", err)
|
||||
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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user