Skip to content

Commit c47af9a

Browse files
committed
hotfix srnode
1 parent 477a1a0 commit c47af9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/srnode/srnode.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
const BytesToBits = 8.0
1616
const MegaBitsToBits = 1000000
1717
const ifHighSpeedOID = "1.3.6.1.2.1.31.1.1.1.15"
18-
const ifHCInOctetsOID = "1.3.6.1.2.1.31.1.1.1.6"
18+
const ifHCOutOctetsOID = "1.3.6.1.2.1.31.1.1.1.10"
1919
const ifIndexOID = "1.3.6.1.2.1.2.2.1.1"
2020
const ifDescrOID = "1.3.6.1.2.1.2.2.1.2"
2121

@@ -158,7 +158,7 @@ func getInterfaceUsageBytes(snmp *gosnmp.GoSNMP, ifIndex int) (int64, error) {
158158
}
159159
defer snmp.Conn.Close()
160160

161-
oids := []string{fmt.Sprintf("%s.%d", ifHCInOctetsOID, ifIndex)}
161+
oids := []string{fmt.Sprintf("%s.%d", ifHCOutOctetsOID, ifIndex)}
162162
res, err := snmp.Get(oids)
163163
if err != nil {
164164
return 0, fmt.Errorf("failed get metrics from snmp agent: %v", err)

0 commit comments

Comments
 (0)