|
@@ -104,7 +104,9 @@ func customResourceScorer(nodeName string) int64 {
|
|
|
Addr: "http://" + cfg.Server.Host + ":" + cfg.Server.Port + "",
|
|
|
})
|
|
|
if err != nil {
|
|
|
- fmt.Println("Error while creating InfluxDB client: ", err.Error())
|
|
|
+ klog.Infof("Error while creating InfluxDB client: %v ", err.Error())
|
|
|
+ } else {
|
|
|
+ klog.Infof("Connected Successfully to InfluxDB")
|
|
|
}
|
|
|
|
|
|
// close the connection in the end of execution
|
|
@@ -117,8 +119,10 @@ 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 {
|
|
|
- fmt.Println(response.Results)
|
|
|
+ klog.Infof("%v", response.Results)
|
|
|
}
|
|
|
+ } else {
|
|
|
+ klog.Infof("Something went wrong with InfluxDB metrics extraction: %v", ok)
|
|
|
}
|
|
|
|
|
|
// //Close the database connection in the end of the execution
|