From 1afe72f0afc29f638371a3a3243455a0150323ff Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Tue, 24 May 2022 18:19:05 +0200 Subject: [PATCH] vultr: ram is in mb, not bytes Signed-off-by: Julien Pivotto --- discovery/vultr/vultr.go | 2 +- discovery/vultr/vultr_test.go | 6 +++--- docs/configuration/configuration.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/discovery/vultr/vultr.go b/discovery/vultr/vultr.go index 5c26c5d31..2f489e7d4 100644 --- a/discovery/vultr/vultr.go +++ b/discovery/vultr/vultr.go @@ -49,7 +49,7 @@ const ( vultrInstanceLabelHostname = vultrInstanceLabel + "hostname" vultrInstanceLabelServerStatus = vultrInstanceLabel + "server_status" vultrInstanceLabelVCPU = vultrInstanceLabel + "vcpu_count" - vultrInstanceLabelMemory = vultrInstanceLabel + "ram_bytes" + vultrInstanceLabelMemory = vultrInstanceLabel + "ram_mb" vultrInstanceLabelBandwidth = vultrInstanceLabel + "allowed_bandwidth_gb" vultrInstanceLabelDisk = vultrInstanceLabel + "disk_gb" separator = "," diff --git a/discovery/vultr/vultr_test.go b/discovery/vultr/vultr_test.go index 272accbc2..b72954153 100644 --- a/discovery/vultr/vultr_test.go +++ b/discovery/vultr/vultr_test.go @@ -80,7 +80,7 @@ func TestVultrSDRefresh(t *testing.T) { "__meta_vultr_instance_hostname": model.LabelValue("np-2-eae38a19b0f3"), "__meta_vultr_instance_server_status": model.LabelValue("ok"), "__meta_vultr_instance_vcpu_count": model.LabelValue("2"), - "__meta_vultr_instance_ram_bytes": model.LabelValue("4096"), + "__meta_vultr_instance_ram_mb": model.LabelValue("4096"), "__meta_vultr_instance_disk_gb": model.LabelValue("128"), "__meta_vultr_instance_allowed_bandwidth_gb": model.LabelValue("3000"), }, @@ -98,7 +98,7 @@ func TestVultrSDRefresh(t *testing.T) { "__meta_vultr_instance_hostname": model.LabelValue("np-2-fd0714b5fe42"), "__meta_vultr_instance_server_status": model.LabelValue("ok"), "__meta_vultr_instance_vcpu_count": model.LabelValue("2"), - "__meta_vultr_instance_ram_bytes": model.LabelValue("4096"), + "__meta_vultr_instance_ram_mb": model.LabelValue("4096"), "__meta_vultr_instance_disk_gb": model.LabelValue("128"), "__meta_vultr_instance_allowed_bandwidth_gb": model.LabelValue("3000"), }, @@ -116,7 +116,7 @@ func TestVultrSDRefresh(t *testing.T) { "__meta_vultr_instance_hostname": model.LabelValue("np-2-d04e7829fa43"), "__meta_vultr_instance_server_status": model.LabelValue("ok"), "__meta_vultr_instance_vcpu_count": model.LabelValue("2"), - "__meta_vultr_instance_ram_bytes": model.LabelValue("4096"), + "__meta_vultr_instance_ram_mb": model.LabelValue("4096"), "__meta_vultr_instance_disk_gb": model.LabelValue("128"), "__meta_vultr_instance_allowed_bandwidth_gb": model.LabelValue("3000"), }, diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 3ceee1acb..4dd8209eb 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -2562,7 +2562,7 @@ The following meta labels are available on targets during [relabeling](#relabel_ * `__meta_vultr_instance_hostname` : The hostname for this instance. * `__meta_vultr_instance_server_status` : The server health status. * `__meta_vultr_instance_vcpu_count` : Number of vCPUs. -* `__meta_vultr_instance_ram_bytes` : The amount of RAM in MB. +* `__meta_vultr_instance_ram_mb` : The amount of RAM in MB. * `__meta_vultr_instance_disk_gb` : The size of the disk in GB. * `__meta_vultr_instance_allowed_bandwidth_gb` : Monthly bandwidth quota in GB.