Skip to content

Commit

Permalink
fix: traffic Balancing cannot get traffic from Trident
Browse files Browse the repository at this point in the history
  • Loading branch information
lzf575 committed Jan 17, 2025
1 parent 2f03bcd commit 147423e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/ingester/ext_metrics/decoder/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,16 @@ func (d *Decoder) StatsToExtMetrics(vtapID uint16, s *pb.Stats) (*dbwriter.ExtMe
writerDBID = dbwriter.DEEPFLOW_TENANT_DB_ID
}
}
// adapt to the name of the metric sent by Trident
if m.VTableName == "deepflow_agent_collect_sender" {
for i, name := range m.MetricsFloatNames {
if name == "tx_bytes" {
m.MetricsFloatNames = append(m.MetricsFloatNames, "tx-bytes")
m.MetricsFloatValues = append(m.MetricsFloatValues, m.MetricsFloatValues[i])
break
}
}
}
return m, writerDBID
}

Expand Down

0 comments on commit 147423e

Please sign in to comment.