diff --git a/src/__tests__/unit/lib/azure-importer/index.test.ts b/src/__tests__/unit/lib/azure-importer/index.test.ts index f905fb0..a67869e 100644 --- a/src/__tests__/unit/lib/azure-importer/index.test.ts +++ b/src/__tests__/unit/lib/azure-importer/index.test.ts @@ -102,7 +102,7 @@ describe('lib/azure-importer: ', () => { 'azure-subscription-id': '9de7e19f-8a18-4e73-9451-45fc74e7d0d3', 'azure-resource-group': 'vm1_group', 'azure-vm-name': 'vm1', - 'cpu/utilization': '3.14', + 'cpu/utilization': 3.14, 'memory/available/GB': 0.5, 'memory/used/GB': 0.5, 'memory/capacity/GB': 1, @@ -144,7 +144,7 @@ describe('lib/azure-importer: ', () => { 'azure-subscription-id': '9de7e19f-8a18-4e73-9451-45fc74e7d0d3', 'azure-resource-group': 'vm1_group', 'azure-vm-name': 'vm1', - 'cpu/utilization': '3.14', + 'cpu/utilization': 3.14, 'memory/available/GB': 0.5, 'memory/used/GB': 0.5, 'memory/capacity/GB': 1, diff --git a/src/lib/azure-importer/index.ts b/src/lib/azure-importer/index.ts index 57f4682..02785e0 100644 --- a/src/lib/azure-importer/index.ts +++ b/src/lib/azure-importer/index.ts @@ -70,7 +70,7 @@ export const AzureImporter = (): PluginInterface => { ) => { return rawResults.timestamps.map((timestamp, index) => ({ 'cloud/vendor': 'azure', - 'cpu/utilization': rawResults.cpuUtilizations[index], + 'cpu/utilization': parseFloat(rawResults.cpuUtilizations[index]), 'memory/available/GB': parseFloat(rawResults.memAvailable[index]) * 1e-9, 'memory/used/GB': parseFloat(rawMetadataResults.totalMemoryGB) -