Bläddra i källkod

customize influxdb results

Achilleas Tzenetopoulos 5 år sedan
förälder
incheckning
6bc25a8685

+ 1 - 1
kubernetes-v1.15.4/pkg/scheduler/algorithm/priorities/custom_resource_allocation.go

@@ -121,7 +121,7 @@ func customResourceScorer(nodeName string) int64 {
 		command := fmt.Sprintf("SELECT ipc from system_metrics where uuid = '%s' order by time desc limit 1", curr_uuid)
 		q := client.NewQuery(command, "evolve", "")
 		if response, err := c.Query(q); err == nil && response.Error() == nil {
-			klog.Infof("%v", response.Results[0].Series[0].Values[1])
+			klog.Infof("%v", response.Results[0].Series[0].Values[0][1])
 		} else if err != nil {
 			klog.Infof("Error: %v", err)
 		}