Can't query value from SNMP table

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
myxiplx
Posts: 21
Joined: Tue Apr 13, 2004 1:53 am

Can't query value from SNMP table

Post by myxiplx »

Hi,

We've just upgraded to Hostmon Professional to get the MIB Browser and do our first SNMP tests. I'm having problems querying the values I want however.

The two values I need to read are in a table in the SNMP device.

The OID for the table is: 1.3.6.1.2.1.2.2.1
And the particular field I need is: 1.3.6.1.2.1.2.2.1.8

So the OID's I actually need to query for the two records I'm interested in are:
1.3.6.1.2.1.2.2.1.8.3
1.3.6.1.2.1.2.2.1.8.4

In the MIB browser I can query these OID's fine, they return 1 or 2 to indicate the status of the line. However when I return to Hostmonitor I can't query them. As soon as I click the 'get value' button it appends .0 to the end of the OID and returns the error "SNMP error: No such name".

I'm very new to SNMP, but my guess is that it's appending .0 when it doesn't need to. From reading around this, the .0 is the correct way to refer to single values when performing a GET query, however if you're reading values from a table instead of 0 you pass the ID number of the row you wish to read.

I'd very much appreciate it if someone can tell me how to query these values - these two queries are the reason we upgraded to the pro version :)

If this is as I think and hostmonitor is appending .0 when it doesn't need to, would it be possible to update to the code so that when 'get value' is pressed it first tries to query the OID directly, and tries again with .0 appended if the first attempt fails? That would keep the ease of use for SNMP newbies, while allowing table values to be queried properly.

Ross
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You have to disable "Automatically append the single instance sub-identifier (".0")." option, located in "Options" -> "Miscellaneous" tab -> ""SNMP Get" test related option" area.
Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... m#MiscSNMP
=============================
Automatically append the single instance sub-identifier (".0").
Since the "SNMP test" is typically applied to single instance MIB objects that HostMonitor automatically appends the single instance sub-identifier (".0"). Though this has an unfortunate side effect for table instance retrieval, to retrieve correct values for the table instances disable this option.
=============================

Regards,
Max
myxiplx
Posts: 21
Joined: Tue Apr 13, 2004 1:53 am

Post by myxiplx »

Sweet, that works perfectly.

For future reference, any chance you could either document that in the SNMP help area, or put a link in the SNMP test area to the SNMP options? :-)
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

myxiplx wrote:For future reference, any chance you could either document that in the SNMP help area, or put a link in the SNMP test area to the SNMP options? :-)
It seems you are right. We have to update our documentation. Will be done in next version.

Regards,
Max
myxiplx
Posts: 21
Joined: Tue Apr 13, 2004 1:53 am

Post by myxiplx »

Many thanks Max, and thanks for such a quick response.

I guess there's no huge rush to update the documentation - the problem's documented here now if anyone else runs into it :D
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

myxiplx wrote:Many thanks Max, and thanks for such a quick response.
You are welcome. :-)

Regards,
Max
Post Reply