Compare commits
2 Commits
0d19d50d62
...
15216782d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15216782d1 | ||
|
|
067e324cca |
9
debian/changelog
vendored
9
debian/changelog
vendored
@@ -1,3 +1,12 @@
|
|||||||
|
govpp-snmp-agentx (1.1.3-1) bookworm; urgency=medium
|
||||||
|
|
||||||
|
* Use fallback packet counters when VPP unicast stats are unavailable
|
||||||
|
* Fix unicast packet reporting for interfaces without detailed stats collection
|
||||||
|
* Add VPP configuration comments for stats-collect feature requirements
|
||||||
|
* Improve packet counter accuracy across different VPP configurations
|
||||||
|
|
||||||
|
-- Pim van Pelt <pim@ipng.ch> Mon, 24 Jun 2025 00:00:00 +0000
|
||||||
|
|
||||||
govpp-snmp-agentx (1.1.2-1) bookworm; urgency=medium
|
govpp-snmp-agentx (1.1.2-1) bookworm; urgency=medium
|
||||||
|
|
||||||
* Add startup version logging to INFO log level
|
* Add startup version logging to INFO log level
|
||||||
|
|||||||
@@ -294,7 +294,12 @@ func (m *InterfaceMIB) addIfEntry(iface *api.InterfaceCounters, idx int) {
|
|||||||
// ifInUcastPkts (.11)
|
// ifInUcastPkts (.11)
|
||||||
item = m.handler.Add(fmt.Sprintf("%s.11.%d", ifEntryOID, idx))
|
item = m.handler.Add(fmt.Sprintf("%s.11.%d", ifEntryOID, idx))
|
||||||
item.Type = pdu.VariableTypeCounter32
|
item.Type = pdu.VariableTypeCounter32
|
||||||
|
// iface.Rx*cast.Packets is only set if "set interface feature X stats-collect-rx arc device-input" is configured
|
||||||
|
if iface.RxUnicast.Packets == 0 {
|
||||||
|
item.Value = uint32(iface.Rx.Packets)
|
||||||
|
} else {
|
||||||
item.Value = uint32(iface.RxUnicast.Packets)
|
item.Value = uint32(iface.RxUnicast.Packets)
|
||||||
|
}
|
||||||
|
|
||||||
// ifInNUcastPkts (.12) - multicast + broadcast
|
// ifInNUcastPkts (.12) - multicast + broadcast
|
||||||
item = m.handler.Add(fmt.Sprintf("%s.12.%d", ifEntryOID, idx))
|
item = m.handler.Add(fmt.Sprintf("%s.12.%d", ifEntryOID, idx))
|
||||||
@@ -324,7 +329,12 @@ func (m *InterfaceMIB) addIfEntry(iface *api.InterfaceCounters, idx int) {
|
|||||||
// ifOutUcastPkts (.17)
|
// ifOutUcastPkts (.17)
|
||||||
item = m.handler.Add(fmt.Sprintf("%s.17.%d", ifEntryOID, idx))
|
item = m.handler.Add(fmt.Sprintf("%s.17.%d", ifEntryOID, idx))
|
||||||
item.Type = pdu.VariableTypeCounter32
|
item.Type = pdu.VariableTypeCounter32
|
||||||
|
// iface.Tx*cast.Packets is only set if "set interface feature X stats-collect-tx arc interface-output" is configured
|
||||||
|
if iface.TxUnicast.Packets == 0 {
|
||||||
|
item.Value = uint32(iface.Tx.Packets)
|
||||||
|
} else {
|
||||||
item.Value = uint32(iface.TxUnicast.Packets)
|
item.Value = uint32(iface.TxUnicast.Packets)
|
||||||
|
}
|
||||||
|
|
||||||
// ifOutNUcastPkts (.18) - multicast + broadcast
|
// ifOutNUcastPkts (.18) - multicast + broadcast
|
||||||
item = m.handler.Add(fmt.Sprintf("%s.18.%d", ifEntryOID, idx))
|
item = m.handler.Add(fmt.Sprintf("%s.18.%d", ifEntryOID, idx))
|
||||||
@@ -385,7 +395,11 @@ func (m *InterfaceMIB) addIfXTable(iface *api.InterfaceCounters, idx int) {
|
|||||||
// ifHCInUcastPkts (.7)
|
// ifHCInUcastPkts (.7)
|
||||||
item = m.handler.Add(fmt.Sprintf("%s.7.%d", ifXTableOID, idx))
|
item = m.handler.Add(fmt.Sprintf("%s.7.%d", ifXTableOID, idx))
|
||||||
item.Type = pdu.VariableTypeCounter64
|
item.Type = pdu.VariableTypeCounter64
|
||||||
|
if iface.RxUnicast.Packets == 0 {
|
||||||
|
item.Value = iface.Rx.Packets
|
||||||
|
} else {
|
||||||
item.Value = iface.RxUnicast.Packets
|
item.Value = iface.RxUnicast.Packets
|
||||||
|
}
|
||||||
|
|
||||||
// ifHCInMulticastPkts (.8)
|
// ifHCInMulticastPkts (.8)
|
||||||
item = m.handler.Add(fmt.Sprintf("%s.8.%d", ifXTableOID, idx))
|
item = m.handler.Add(fmt.Sprintf("%s.8.%d", ifXTableOID, idx))
|
||||||
@@ -405,7 +419,11 @@ func (m *InterfaceMIB) addIfXTable(iface *api.InterfaceCounters, idx int) {
|
|||||||
// ifHCOutUcastPkts (.11)
|
// ifHCOutUcastPkts (.11)
|
||||||
item = m.handler.Add(fmt.Sprintf("%s.11.%d", ifXTableOID, idx))
|
item = m.handler.Add(fmt.Sprintf("%s.11.%d", ifXTableOID, idx))
|
||||||
item.Type = pdu.VariableTypeCounter64
|
item.Type = pdu.VariableTypeCounter64
|
||||||
|
if iface.TxUnicast.Packets == 0 {
|
||||||
|
item.Value = iface.Tx.Packets
|
||||||
|
} else {
|
||||||
item.Value = iface.TxUnicast.Packets
|
item.Value = iface.TxUnicast.Packets
|
||||||
|
}
|
||||||
|
|
||||||
// ifHCOutMulticastPkts (.12)
|
// ifHCOutMulticastPkts (.12)
|
||||||
item = m.handler.Add(fmt.Sprintf("%s.12.%d", ifXTableOID, idx))
|
item = m.handler.Add(fmt.Sprintf("%s.12.%d", ifXTableOID, idx))
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import (
|
|||||||
"govpp-snmp-agentx/vpp"
|
"govpp-snmp-agentx/vpp"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Version = "1.1.2-1"
|
const Version = "1.1.3-1"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
debug := flag.Bool("debug", false, "Enable debug logging")
|
debug := flag.Bool("debug", false, "Enable debug logging")
|
||||||
|
|||||||
Reference in New Issue
Block a user