diff --git a/src/core/metrics/metrics_util.go b/src/core/metrics/metrics_util.go index 288cca013..43b2ea738 100644 --- a/src/core/metrics/metrics_util.go +++ b/src/core/metrics/metrics_util.go @@ -140,7 +140,6 @@ func GetCalculationMap() map[string]string { "system.mem.shared": "avg", "system.mem.total": "avg", "system.mem.used": "avg", - "system.mem.used.all": "avg", "system.load.1": "avg", "system.load.15": "avg", "system.load.5": "avg", diff --git a/src/core/metrics/sources/mem.go b/src/core/metrics/sources/mem.go index c208ec026..77e801ca8 100644 --- a/src/core/metrics/sources/mem.go +++ b/src/core/metrics/sources/mem.go @@ -52,8 +52,7 @@ func (c *VirtualMemory) Collect(ctx context.Context, wg *sync.WaitGroup, m chan< simpleMetrics := c.convertSamplesToSimpleMetrics(map[string]float64{ "total": float64(memstats.Total), - "used": float64(memstats.Total - memstats.Available), - "used.all": float64(memstats.Used), + "used": float64(memstats.Used), "cached": float64(memstats.Cached), "buffered": float64(memstats.Buffers), "shared": float64(memstats.Shared), diff --git a/src/core/metrics/sources/mem_test.go b/src/core/metrics/sources/mem_test.go index 901819d33..1847f453f 100644 --- a/src/core/metrics/sources/mem_test.go +++ b/src/core/metrics/sources/mem_test.go @@ -79,7 +79,6 @@ func TestVirtualMemoryCollect(t *testing.T) { "test.mem.shared", "test.mem.total", "test.mem.used", - "test.mem.used.all", } assert.Equal(t, expected, actualMetricNames) diff --git a/test/integration/api/api_test.go b/test/integration/api/api_test.go index 1f648d9b5..8536683b5 100644 --- a/test/integration/api/api_test.go +++ b/test/integration/api/api_test.go @@ -90,10 +90,6 @@ func TestAPI_Metrics(t *testing.T) { value, _ := strconv.ParseFloat(metric[1], 64) assert.Greater(t, value, float64(0)) - case strings.Contains(metric[0], "system_mem_used_all"): - value, _ := strconv.ParseFloat(metric[1], 64) - assert.Greater(t, value, float64(0)) - case strings.Contains(metric[0], "container_cpu_cores"): value, _ := strconv.ParseFloat(metric[1], 64) assert.Greater(t, value, float64(0)) diff --git a/test/integration/grpc/grpc_config_apply_test.go b/test/integration/grpc/grpc_config_apply_test.go index 426dc0b90..dd68e186c 100644 --- a/test/integration/grpc/grpc_config_apply_test.go +++ b/test/integration/grpc/grpc_config_apply_test.go @@ -150,8 +150,9 @@ messageLoop: for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { // Send config apply message - - err := commandService.SendConfigApply(nginxId, tt.nginxConfigFileName, tt.messageId) + response, err := utils.ExecuteCommand(testContainer, []string{"ps", "-ef", "|", "grep", "nginx"}) + t.Logf("response: %v", response) + err = commandService.SendConfigApply(nginxId, tt.nginxConfigFileName, tt.messageId) assert.NoError(t, err) // Validate that the config apply is successful diff --git a/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/metrics_util.go b/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/metrics_util.go index 288cca013..43b2ea738 100644 --- a/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/metrics_util.go +++ b/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/metrics_util.go @@ -140,7 +140,6 @@ func GetCalculationMap() map[string]string { "system.mem.shared": "avg", "system.mem.total": "avg", "system.mem.used": "avg", - "system.mem.used.all": "avg", "system.load.1": "avg", "system.load.15": "avg", "system.load.5": "avg", diff --git a/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/mem.go b/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/mem.go index c208ec026..77e801ca8 100644 --- a/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/mem.go +++ b/test/performance/vendor/github.com/nginx/agent/v2/src/core/metrics/sources/mem.go @@ -52,8 +52,7 @@ func (c *VirtualMemory) Collect(ctx context.Context, wg *sync.WaitGroup, m chan< simpleMetrics := c.convertSamplesToSimpleMetrics(map[string]float64{ "total": float64(memstats.Total), - "used": float64(memstats.Total - memstats.Available), - "used.all": float64(memstats.Used), + "used": float64(memstats.Used), "cached": float64(memstats.Cached), "buffered": float64(memstats.Buffers), "shared": float64(memstats.Shared),