mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-06-11 06:17:29 +02:00
Update cclog calls in latest IB Collector
This commit is contained in:
@@ -225,9 +225,9 @@ func (m *InfinibandCollector) Read(interval time.Duration, output chan lp.CCMess
|
|||||||
// Read counter file
|
// Read counter file
|
||||||
line, err := os.ReadFile(counterDef.path)
|
line, err := os.ReadFile(counterDef.path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cclog.ComponentError(
|
cclog.ComponentErrorf(
|
||||||
m.name,
|
m.name,
|
||||||
fmt.Sprintf("Read(): Failed to read from file '%s': %v", counterDef.path, err))
|
"Read(): Failed to read from file '%s': %v", counterDef.path, err)
|
||||||
// Current counter can not be saved as last state
|
// Current counter can not be saved as last state
|
||||||
counterDef.lastStateAvailable = false
|
counterDef.lastStateAvailable = false
|
||||||
continue
|
continue
|
||||||
@@ -237,9 +237,9 @@ func (m *InfinibandCollector) Read(interval time.Duration, output chan lp.CCMess
|
|||||||
// convert counter to uint64
|
// convert counter to uint64
|
||||||
vRawCounter, err := strconv.ParseUint(data, 10, 64)
|
vRawCounter, err := strconv.ParseUint(data, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cclog.ComponentError(
|
cclog.ComponentErrorf(
|
||||||
m.name,
|
m.name,
|
||||||
fmt.Sprintf("Read(): Failed to convert Infininiband metrice %s='%s' to uint64: %v", counterDef.name, data, err))
|
"Read(): Failed to convert Infininiband metrice %s='%s' to uint64: %v", counterDef.name, data, err)
|
||||||
// Current counter can not be saved as last state
|
// Current counter can not be saved as last state
|
||||||
counterDef.lastStateAvailable = false
|
counterDef.lastStateAvailable = false
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user