add ifEntry MIB also
This commit is contained in:
9
main.go
9
main.go
@ -35,16 +35,11 @@ func main() {
|
||||
client.Timeout = 1 * time.Minute
|
||||
client.ReconnectInterval = 1 * time.Second
|
||||
|
||||
session, err := client.Session()
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to create session: %v", err)
|
||||
}
|
||||
|
||||
// Create the interface MIB
|
||||
interfaceMIB := ifmib.NewInterfaceMIB(*ifIndexOffset)
|
||||
|
||||
// Register the interface MIB with the AgentX session
|
||||
if err := interfaceMIB.RegisterWithSession(session); err != nil {
|
||||
// Register the interface MIB with the AgentX client
|
||||
if err := interfaceMIB.RegisterWithClient(client); err != nil {
|
||||
log.Fatalf("Failed to register interface MIB: %v", err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user