fixed some errors from linter
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package metrics
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"rbd_exporter/RBDFactory"
|
||||
"rbd_exporter/rbdfactory"
|
||||
"rbd_exporter/mytypes"
|
||||
"rbd_exporter/logger"
|
||||
"time"
|
||||
@@ -11,7 +10,6 @@ import (
|
||||
|
||||
|
||||
func GetMetrics(cephConn mytypes.CephConnector) {
|
||||
|
||||
metrics := InitMetrics()
|
||||
prometheus.MustRegister(
|
||||
metrics.Total_rbd_requested_size_per_pool,
|
||||
@@ -30,7 +28,7 @@ func GetMetrics(cephConn mytypes.CephConnector) {
|
||||
}
|
||||
|
||||
for _, v := range poolList {
|
||||
x, _ := RBDFactory.PoolFactory(cephConn, v)
|
||||
x, _ := rbdfactory.PoolFactory(cephConn, v)
|
||||
result = append(result, x)
|
||||
}
|
||||
|
||||
@@ -39,9 +37,8 @@ func GetMetrics(cephConn mytypes.CephConnector) {
|
||||
if !v.HasRBD {continue}
|
||||
FillMetrics(v,metrics)
|
||||
}
|
||||
fmt.Println("====================")
|
||||
logger.Logger.Debug("====================")
|
||||
// fmt.Println(result)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,5 +76,4 @@ func FillMetrics(pool mytypes.Pool,metrics *mytypes.Metrics) {
|
||||
metrics.Total_rbd_requested_size_per_pool.WithLabelValues(pool.Name,
|
||||
).Set(
|
||||
float64(totalSizePerPool))
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user