From effc47576dccce1cbea64a43f22637d9edfc07b4 Mon Sep 17 00:00:00 2001 From: Yash Mehrotra Date: Wed, 1 Nov 2023 14:01:49 +0530 Subject: [PATCH] chore: use value field for cluster properties --- fixtures/topology/k8s-system.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fixtures/topology/k8s-system.yaml b/fixtures/topology/k8s-system.yaml index b7edd6cb6..f6a433ccc 100644 --- a/fixtures/topology/k8s-system.yaml +++ b/fixtures/topology/k8s-system.yaml @@ -16,23 +16,21 @@ spec: type: EKS properties: - name: cpu - headline: true - unit: millicores lookup: prometheus: - query: '1000 * max(rate(container_cpu_usage_seconds_total{container!=""}[5m]))' url: 'http://prometheus-k8s.monitoring:9090' display: - expr: results[0].value + expr: | + [{'name': 'cpu', 'value': int(results[0].value), 'headline': true, 'unit': 'millicores'}].toJSON() - name: memory - headline: true - unit: bytes lookup: prometheus: - query: 'max(avg_over_time(container_memory_working_set_bytes{container!=""}[5m]))' url: 'http://prometheus-k8s.monitoring:9090' display: - expr: results[0].value + expr: | + [{'name': 'memory', 'value': int(results[0].value), 'headline': true, 'unit': 'bytes'}].toJSON() components: - name: nodes icon: server