Fix: Add missing hostname tag

This commit is contained in:
Holger Obermaier
2022-01-28 19:31:27 +01:00
parent 4e408f9490
commit d2e02ed36d
2 changed files with 12 additions and 9 deletions

View File

@@ -5,7 +5,6 @@ import (
"flag"
"os"
"os/signal"
"strings"
"syscall"
"github.com/ClusterCockpit/cc-metric-collector/collectors"
@@ -45,7 +44,6 @@ func LoadCentralConfiguration(file string, config *CentralConfigFile) error {
}
type RuntimeConfig struct {
Hostname string
Interval time.Duration
Duration time.Duration
CliArgs map[string]string
@@ -213,13 +211,6 @@ func mainFunc() int {
}
rcfg.Duration = time.Duration(rcfg.ConfigFile.Duration) * time.Second
rcfg.Hostname, err = os.Hostname()
if err != nil {
cclog.Error(err.Error())
return 1
}
// Drop domain part of host name
rcfg.Hostname = strings.SplitN(rcfg.Hostname, `.`, 2)[0]
// err = CreatePidfile(rcfg.CliArgs["pidfile"])
// Set log file