onesixtyone icon indicating copy to clipboard operation
onesixtyone copied to clipboard

Ability for fetch sysObjectID

Open landy2005 opened this issue 7 years ago • 4 comments

Please add ability for fetch/display numeric sysObjectID (1.3.6.1.2.1.1.2) together with sysDescr.

Can be optional, with output something like:

192.168.120.92 [1234] {.1.3.6.1.4.1.318.1.3.4.5} HP ETHERNET MULTI-ENVIRONMENT,ROM A.05.03,JETDIRECT,
JD24,EEPROM A.05.05
130.160.108.146 [public] {.1.3.6.1.4.1.318.1.3.4.5} Hardware: x86 Family 15 Model 0 Stepping 10 AT/AT
COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Uniprocessor Free)

Unfortunately I'm not C guru..

landy2005 avatar Nov 09 '17 13:11 landy2005

not possible? (

landy2005 avatar Apr 27 '18 22:04 landy2005

I am also looking for sysObjectID

zeepi222 avatar Apr 28 '18 06:04 zeepi222

The way SNMP requests are handled in onesixtyone doesn't allow for multiple OIDs to be fetched in the same request. I'm currently working on a way to cycle through different OID for hosts, but it is not quite there yet.

In the mean time, if you want to pull sysObjectID from a host replace the hexadecimal string in the build_snmp_req() function with "\x30\x0e\x30\x0c\x06\x08\x2b\x06\x01\x02\x01\x01\x02\x0\x05\x00". This is the hex equivalent of the sysObjectID OID. Something to note though, is that sysDescr will no longer be returned, it will instead be sysObjectID.

DFog14 avatar Oct 03 '18 15:10 DFog14

The way SNMP requests are handled in onesixtyone doesn't allow for multiple OIDs to be fetched in the same request. I'm currently working on a way to cycle through different OID for hosts, but it is not quite there yet.

In the mean time, if you want to pull sysObjectID from a host replace the hexadecimal string in the build_snmp_req() function with "\x30\x0e\x30\x0c\x06\x08\x2b\x06\x01\x02\x01\x01\x02\x0\x05\x00". This is the hex equivalent of the sysObjectID OID. Something to note though, is that sysDescr will no longer be returned, it will instead be sysObjectID.

So, did you get this change to work? I'm looking at using this code too.

ghost avatar Dec 06 '18 13:12 ghost