vultr: ram is in mb, not bytes

Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
This commit is contained in:
Julien Pivotto 2022-05-24 18:19:05 +02:00 committed by Julien Pivotto
parent c9d4e5fc94
commit 1afe72f0af
3 changed files with 5 additions and 5 deletions

View file

@ -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 = ","

View file

@ -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"),
},

View file

@ -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.