Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSIX mib only partially loaded #36

Closed
Hipska opened this issue Feb 21, 2022 · 1 comment
Closed

OSIX mib only partially loaded #36

Hipska opened this issue Feb 21, 2022 · 1 comment

Comments

@Hipska
Copy link

Hipska commented Feb 21, 2022

Hi, I have a mib loading problem again:

package main

import (
	"log"

	"github.com/sleepinggenius2/gosmi"
	"github.com/sleepinggenius2/gosmi/types"
)

func main() {
	gosmi.Init()
	gosmi.SetPath("../../mibs")
	//_, _ = gosmi.LoadModule("OSIX-MIB")
	//_, _ = gosmi.LoadModule("OSIX-XSENSE-MIB")
	module, _ := gosmi.LoadModule("OSIX-XSENSE-MIB-TRAPS")
	m, _ := gosmi.GetModule(module)
	trapNodes := m.GetNodes(types.NodeNotification)
	for _, node := range trapNodes {
		log.Printf("Trap %s::%s [%s]\n%+v\n", module, node.Name, node.Oid, node.GetRaw())
	}
}

Running this only shows the first trap node:

2022/02/21 14:55:48 Trap OSIX-XSENSE-MIB-TRAPS::physicalStateChange [1.3.6.1.4.1.10034.0.1000]
&{Name:physicalStateChange OidLen:9 Oid:1.3.6.1.4.1.10034.0.1000 Decl:TrapType Access:Unknown Status:Unknown Format: Value:{BaseType:Unknown Len:0 Value:<nil>} Units: Description:Signifies that a state change has occurred in the 
            physical layer. The new state is indicated by xvarEventType. Reference: IndexKind:Unknown Implied:false Create:false NodeKind:Notification}

Also tried with the commented lines, but that didn't improve anything. Do you have a clue?
These are the mibs: osix-mibs.zip

@Hipska
Copy link
Author

Hipska commented Feb 21, 2022

Nevermind, seems to be related to #29 and is solved by using gosmi 0.4.4

@Hipska Hipska closed this as completed Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant