mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-02-13 22:51:45 +01:00
Fix: interface{} can be replaced by any
This commit is contained in:
@@ -617,7 +617,6 @@ func (m *LikwidCollector) calcEventsetMetrics(evset LikwidEventsetConfig, interv
|
|||||||
evset.metrics[tid][metric.Name] = value
|
evset.metrics[tid][metric.Name] = value
|
||||||
// Now we have the result, send it with the proper tags
|
// Now we have the result, send it with the proper tags
|
||||||
if !math.IsNaN(value) && metric.Publish {
|
if !math.IsNaN(value) && metric.Publish {
|
||||||
fields := map[string]interface{}{"value": value}
|
|
||||||
y, err :=
|
y, err :=
|
||||||
lp.NewMessage(
|
lp.NewMessage(
|
||||||
metric.Name,
|
metric.Name,
|
||||||
@@ -625,7 +624,9 @@ func (m *LikwidCollector) calcEventsetMetrics(evset LikwidEventsetConfig, interv
|
|||||||
"type": metric.Type,
|
"type": metric.Type,
|
||||||
},
|
},
|
||||||
m.meta,
|
m.meta,
|
||||||
fields,
|
map[string]any{
|
||||||
|
"value": value,
|
||||||
|
},
|
||||||
now,
|
now,
|
||||||
)
|
)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
@@ -663,7 +664,7 @@ func (m *LikwidCollector) calcEventsetMetrics(evset LikwidEventsetConfig, interv
|
|||||||
"type-id": fmt.Sprintf("%d", coreID),
|
"type-id": fmt.Sprintf("%d", coreID),
|
||||||
},
|
},
|
||||||
m.meta,
|
m.meta,
|
||||||
map[string]interface{}{
|
map[string]any{
|
||||||
"value": value,
|
"value": value,
|
||||||
},
|
},
|
||||||
now,
|
now,
|
||||||
@@ -700,7 +701,7 @@ func (m *LikwidCollector) calcEventsetMetrics(evset LikwidEventsetConfig, interv
|
|||||||
"type-id": fmt.Sprintf("%d", socketID),
|
"type-id": fmt.Sprintf("%d", socketID),
|
||||||
},
|
},
|
||||||
m.meta,
|
m.meta,
|
||||||
map[string]interface{}{
|
map[string]any{
|
||||||
"value": value,
|
"value": value,
|
||||||
},
|
},
|
||||||
now,
|
now,
|
||||||
@@ -734,7 +735,7 @@ func (m *LikwidCollector) calcEventsetMetrics(evset LikwidEventsetConfig, interv
|
|||||||
"type": "node",
|
"type": "node",
|
||||||
},
|
},
|
||||||
m.meta,
|
m.meta,
|
||||||
map[string]interface{}{
|
map[string]any{
|
||||||
"value": totalNodeValue,
|
"value": totalNodeValue,
|
||||||
},
|
},
|
||||||
now,
|
now,
|
||||||
@@ -792,7 +793,7 @@ func (m *LikwidCollector) calcGlobalMetrics(groups []LikwidEventsetConfig, inter
|
|||||||
"type": metric.Type,
|
"type": metric.Type,
|
||||||
},
|
},
|
||||||
m.meta,
|
m.meta,
|
||||||
map[string]interface{}{
|
map[string]any{
|
||||||
"value": value,
|
"value": value,
|
||||||
},
|
},
|
||||||
now,
|
now,
|
||||||
|
|||||||
Reference in New Issue
Block a user