mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-12-19 05:36:17 +01:00
Add ccStartup
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
ccconf "github.com/ClusterCockpit/cc-lib/ccConfig"
|
||||
cclog "github.com/ClusterCockpit/cc-lib/ccLogger"
|
||||
lp "github.com/ClusterCockpit/cc-lib/ccMessage"
|
||||
start "github.com/ClusterCockpit/cc-lib/ccStartup"
|
||||
mr "github.com/ClusterCockpit/cc-metric-collector/internal/metricRouter"
|
||||
mct "github.com/ClusterCockpit/cc-metric-collector/pkg/multiChanTicker"
|
||||
)
|
||||
@@ -216,6 +217,14 @@ func mainFunc() int {
|
||||
return 1
|
||||
}
|
||||
|
||||
startupConf := ccconf.GetPackageConfig("startup")
|
||||
if len(collectorConf) > 0 {
|
||||
err := start.CCStartup(startupConf)
|
||||
if err != nil {
|
||||
cclog.Errorf("Sending startup topology failed: %s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
// Set log file
|
||||
// if logfile := rcfg.CliArgs["logfile"]; logfile != "stderr" {
|
||||
// cclog.SetOutput(logfile)
|
||||
|
||||
Reference in New Issue
Block a user