Skip to content

Commit

Permalink
Empty port counters each time to detect port that went away
Browse files Browse the repository at this point in the history
  • Loading branch information
fihuer committed Nov 5, 2024
1 parent 0e7b377 commit 1c497ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions writer/prometheus_exporter/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func (w *PrometheusWriter) makeBatch(fabric infiniband.Fabric) error {
"src_port": strconv.Itoa(fabric.SourcePort),
}

// Completely reset counter vector to detect ports that went away
w.hca_port_vec.Reset()

for _, node := range fabric.Nodes {
if node.NodeType != infiniband.IB_NODE_SWITCH {
continue
Expand Down

0 comments on commit 1c497ca

Please sign in to comment.