From 615c48b81dcf43af2a0b5aebd26291730999f491 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Mon, 19 Mar 2018 15:12:42 +0100 Subject: [PATCH] Export node cpu metrics in whole cores --- metrics/sinks/stackdriver/stackdriver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metrics/sinks/stackdriver/stackdriver.go b/metrics/sinks/stackdriver/stackdriver.go index b81617b6d5..ebaafc854e 100644 --- a/metrics/sinks/stackdriver/stackdriver.go +++ b/metrics/sinks/stackdriver/stackdriver.go @@ -645,10 +645,10 @@ func (sink *StackdriverSink) TranslateMetric(timestamp time.Time, labels map[str nodeLabels := sink.getNodeResourceLabels(labels) switch name { case core.MetricNodeCpuCapacity.MetricDescriptor.Name: - point := sink.doublePoint(timestamp, timestamp, float64(value.FloatValue)) + point := sink.doublePoint(timestamp, timestamp, float64(value.FloatValue)/1000) return createTimeSeries("k8s_node", nodeLabels, cpuTotalCoresMD, point) case core.MetricNodeCpuAllocatable.MetricDescriptor.Name: - point := sink.doublePoint(timestamp, timestamp, float64(value.FloatValue)) + point := sink.doublePoint(timestamp, timestamp, float64(value.FloatValue)/1000) return createTimeSeries("k8s_node", nodeLabels, cpuAllocatableCoresMD, point) case core.MetricCpuUsage.MetricDescriptor.Name: point := sink.doublePoint(timestamp, collectionStartTime, float64(value.IntValue)/float64(time.Second/time.Nanosecond))