dont publish server metrics

This commit is contained in:
afeiszli 2022-09-13 16:35:14 -04:00
parent 90bb3884e6
commit e637c3d550

View file

@ -6,6 +6,7 @@ import (
"fmt"
"time"
"github.com/gravitl/netmaker/ee"
"github.com/gravitl/netmaker/logger"
"github.com/gravitl/netmaker/logic"
"github.com/gravitl/netmaker/logic/pro/metrics"
@ -184,6 +185,9 @@ func ServerStartNotify() error {
// function to collect and store metrics for server nodes
func collectServerMetrics(networks []models.Network) {
if !ee.IsEnterprise() {
return
}
if len(networks) > 0 {
for i := range networks {
currentNetworkNodes, err := logic.GetNetworkNodes(networks[i].NetID)