Matthew R. Kasun 2 years ago
parent
commit
d54fb0823e
3 changed files with 3 additions and 1 deletions
  1. 1 0
      models/structs.go
  2. 1 1
      netclient/functions/mqpublish.go
  3. 1 0
      servercfg/serverconf.go

+ 1 - 0
models/structs.go

@@ -218,6 +218,7 @@ type ServerConfig struct {
 	Version     string `yaml:"version"`
 	MQPort      string `yaml:"mqport"`
 	Server      string `yaml:"server"`
+	Is_EE       bool   `yaml:"isee"`
 }
 
 // User.NameInCharset - returns if name is in charset below or not

+ 1 - 1
netclient/functions/mqpublish.go

@@ -114,7 +114,7 @@ func checkin(currentRun int) {
 		}
 		Hello(&nodeCfg)
 		checkCertExpiry(&nodeCfg)
-		if currentRun >= 5 {
+		if currentRun >= 5 && nodeCfg.Server.Is_EE {
 			logger.Log(0, "collecting metrics for node", nodeCfg.Node.Name)
 			publishMetrics(&nodeCfg)
 		}

+ 1 - 0
servercfg/serverconf.go

@@ -101,6 +101,7 @@ func GetServerInfo() models.ServerConfig {
 	}
 	cfg.Version = GetVersion()
 	cfg.Server = GetServer()
+	cfg.Is_EE = GetServerConfig().IsEE == "yes"
 
 	return cfg
 }