From d6dbfbfc28f16e4b11c5bac45c3c412e90e8a69c Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Wed, 8 Aug 2018 08:09:48 +0200 Subject: [PATCH] Update the name of the maximum VM metric Signed-off-by: Simon Pasquier --- prometheus/process_collector.go | 2 +- prometheus/process_collector_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/prometheus/process_collector.go b/prometheus/process_collector.go index b10048a..5ab2b1c 100644 --- a/prometheus/process_collector.go +++ b/prometheus/process_collector.go @@ -74,7 +74,7 @@ func NewProcessCollectorPIDFn( nil, nil, ), maxVsize: NewDesc( - ns+"process_max_virtual_memory_bytes", + ns+"process_virtual_memory_max_bytes", "Maximum amount of virtual memory available in bytes.", nil, nil, ), diff --git a/prometheus/process_collector_test.go b/prometheus/process_collector_test.go index ddbc9bd..a678c62 100644 --- a/prometheus/process_collector_test.go +++ b/prometheus/process_collector_test.go @@ -43,14 +43,14 @@ func TestProcessCollector(t *testing.T) { regexp.MustCompile("\nprocess_cpu_seconds_total [0-9]"), regexp.MustCompile("\nprocess_max_fds [1-9]"), regexp.MustCompile("\nprocess_open_fds [1-9]"), - regexp.MustCompile("\nprocess_max_virtual_memory_bytes (-1|[1-9])"), + regexp.MustCompile("\nprocess_virtual_memory_max_bytes (-1|[1-9])"), regexp.MustCompile("\nprocess_virtual_memory_bytes [1-9]"), regexp.MustCompile("\nprocess_resident_memory_bytes [1-9]"), regexp.MustCompile("\nprocess_start_time_seconds [0-9.]{10,}"), regexp.MustCompile("\nfoobar_process_cpu_seconds_total [0-9]"), regexp.MustCompile("\nfoobar_process_max_fds [1-9]"), regexp.MustCompile("\nfoobar_process_open_fds [1-9]"), - regexp.MustCompile("\nfoobar_process_max_virtual_memory_bytes (-1|[1-9])"), + regexp.MustCompile("\nfoobar_process_virtual_memory_max_bytes (-1|[1-9])"), regexp.MustCompile("\nfoobar_process_virtual_memory_bytes [1-9]"), regexp.MustCompile("\nfoobar_process_resident_memory_bytes [1-9]"), regexp.MustCompile("\nfoobar_process_start_time_seconds [0-9.]{10,}"),