Hello!
Thanks for the new version once again.
Now, the counters with the / in the name are working correctly. As instructed (by PM), I have removed my flag=norefresh from all the counters which give a per-second reading (all counters ending with "/sec").
The snmp gets are working correctly now, thanks! However, snmpwalk is not working.
If I try to do an snmpgetnext on the root OID or any other OID where I know there is a next element, I receive a "noSuchName" error (using snmpgetnext from net-snmp under Linux).
Could it be related to the new "OID" key in the registry? (I don't know how you decide on the chain of OIDs for the getnext requests). I noticed in the example counters file that there were no blank lines between these items and have removed the blank lines in my own, with no change.
Here is the simplified counters.ini file used for this test (with my PEN obfuscated):
[1.3.6.1.4.1.xxxxx.15]
type=string
counter=customWindows
[1.3.6.1.4.1.xxxxx.15.1]
type=string
counter=System
[1.3.6.1.4.1.xxxxx.15.1.1]
counter=System\File Read Operations/sec
[1.3.6.1.4.1.xxxxx.15.1.2]
counter=System\File Write Operations/sec
Here are the commands (net-snmp under Linux) that work fine, just for completeness (with IP address and PEN obfuscated):
[root@localhost ~]# snmpget -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx
SNMPv2-SMI::enterprises.xxxxx = STRING: "snmptools by
erwan.l@free.fr"
[root@localhost ~]# snmpget -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15
SNMPv2-SMI::enterprises.xxxxx.15 = STRING: "customWindows"
[root@localhost ~]# snmpget -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15.1
SNMPv2-SMI::enterprises.xxxxx.15.1 = STRING: "System"
[root@localhost ~]# snmpget -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15.1.1
SNMPv2-SMI::enterprises.xxxxx.15.1.1 = INTEGER: 0
[root@localhost ~]# snmpget -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15.1.2
SNMPv2-SMI::enterprises.xxxxx.15.1.2 = INTEGER: 1
[root@localhost ~]#
Here is the debugging output:
14:53:11:984 , SnmpExtensionQueryEx
14:53:11:984 , nRequestType=SNMP_EXTENSION_GET
14:53:11:984 , GetRequest: OID=1.3.6.1.4.1.xxxxx (7)
14:53:11:984 , GetRequest: value=snmptools by
erwan.l@free.fr asn_type=4
14:53:11:984 , GetRequest: OK
14:53:14:937 , SnmpExtensionQueryEx
14:53:14:937 , nRequestType=SNMP_EXTENSION_GET
14:53:14:937 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15 (8)
14:53:14:937 , GetRequest: value=customWindows asn_type=4
14:53:14:937 , GetRequest: OK
14:53:20:328 , SnmpExtensionQueryEx
14:53:20:328 , nRequestType=SNMP_EXTENSION_GET
14:53:20:328 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15.1 (9)
14:53:20:328 , GetRequest: value=System asn_type=4
14:53:20:328 , GetRequest: OK
14:53:23:250 , SnmpExtensionQueryEx
14:53:23:250 , nRequestType=SNMP_EXTENSION_GET
14:53:23:250 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15.1.1 (10)
14:53:23:250 , GetPerf: path=System\File Read Operations/sec
14:53:23:250 , GetPerf: pdh_counter_path=\System\File Read Operations/sec
14:53:24:265 , GetPerf: vartype=Integer
14:53:24:265 , GetRequest: value=0 asn_type=2
14:53:24:265 , GetRequest: OK
14:53:24:265 , SnmpExtensionQueryEx
14:53:24:265 , nRequestType=SNMP_EXTENSION_GET
14:53:24:265 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15.1.1 (10)
14:53:24:265 , GetPerf: path=System\File Read Operations/sec
14:53:24:265 , GetPerf: pdh_counter_path=\System\File Read Operations/sec
14:53:25:265 , GetPerf: vartype=Integer
14:53:25:265 , GetRequest: value=0 asn_type=2
14:53:25:265 , GetRequest: OK
14:53:25:937 , SnmpExtensionQueryEx
14:53:25:937 , nRequestType=SNMP_EXTENSION_GET
14:53:25:937 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15.1.2 (10)
14:53:25:937 , GetPerf: path=System\File Write Operations/sec
14:53:25:937 , GetPerf: pdh_counter_path=\System\File Write Operations/sec
14:53:26:937 , GetPerf: vartype=Integer
14:53:26:937 , GetRequest: value=1 asn_type=2
14:53:26:937 , GetRequest: OK
14:53:26:937 , SnmpExtensionQueryEx
14:53:26:937 , nRequestType=SNMP_EXTENSION_GET
14:53:26:937 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15.1.2 (10)
14:53:26:937 , GetPerf: path=System\File Write Operations/sec
14:53:26:937 , GetPerf: pdh_counter_path=\System\File Write Operations/sec
14:53:27:937 , GetPerf: vartype=Integer
14:53:27:937 , GetRequest: value=0 asn_type=2
14:53:27:937 , GetRequest: OK
So far so good!
Now, let's try to do an snmpwalk starting at either the root OID or any of the deeper branch:
[root@localhost ~]# snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx
End of MIB
SNMPv2-SMI::enterprises.xxxxx = STRING: "snmptools by
erwan.l@free.fr"
[root@localhost ~]# snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15
End of MIB
SNMPv2-SMI::enterprises.xxxxx.15 = STRING: "customWindows"
[root@localhost ~]# snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15.1
End of MIB
SNMPv2-SMI::enterprises.xxxxx.15.1 = STRING: "System"
[root@localhost ~]# snmpwalk -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15.1.1
End of MIB
SNMPv2-SMI::enterprises.xxxxx.15.1.1 = INTEGER: 0
[root@localhost ~]#
In all cases, it does not go very far. Here is the debugging output:
14:58:17:015 , SnmpExtensionQueryEx
14:58:17:015 , nRequestType=SNMP_EXTENSION_GET_NEXT
14:58:17:015 , GetNextRequest:1.3.6.1.4.1.xxxxx(7)
14:58:17:015 , comparemem=false
14:58:17:046 , SnmpExtensionQueryEx
14:58:17:046 , nRequestType=SNMP_EXTENSION_GET
14:58:17:046 , GetRequest: OID=1.3.6.1.4.1.xxxxx (7)
14:58:17:046 , GetRequest: value=snmptools by
erwan.l@free.fr asn_type=4
14:58:17:046 , GetRequest: OK
14:58:20:171 , SnmpExtensionQueryEx
14:58:20:171 , nRequestType=SNMP_EXTENSION_GET_NEXT
14:58:20:171 , GetNextRequest:1.3.6.1.4.1.xxxxx.15(8)
14:58:20:171 , comparemem=false
14:58:20:218 , SnmpExtensionQueryEx
14:58:20:218 , nRequestType=SNMP_EXTENSION_GET
14:58:20:218 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15 (8)
14:58:20:218 , GetRequest: value=customWindows asn_type=4
14:58:20:218 , GetRequest: OK
14:58:36:500 , SnmpExtensionQueryEx
14:58:36:500 , nRequestType=SNMP_EXTENSION_GET_NEXT
14:58:36:500 , GetNextRequest:1.3.6.1.4.1.xxxxx.15.1(9)
14:58:36:500 , comparemem=false
14:58:36:609 , SnmpExtensionQueryEx
14:58:36:609 , nRequestType=SNMP_EXTENSION_GET
14:58:36:609 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15.1 (9)
14:58:36:609 , GetRequest: value=System asn_type=4
14:58:36:609 , GetRequest: OK
14:58:38:781 , SnmpExtensionQueryEx
14:58:38:781 , nRequestType=SNMP_EXTENSION_GET_NEXT
14:58:38:781 , GetNextRequest:1.3.6.1.4.1.xxxxx.15.1.1(10)
14:58:38:781 , comparemem=false
14:58:38:984 , SnmpExtensionQueryEx
14:58:38:984 , nRequestType=SNMP_EXTENSION_GET
14:58:38:984 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15.1.1 (10)
14:58:38:984 , GetPerf: path=System\File Read Operations/sec
14:58:39:000 , GetPerf: pdh_counter_path=\System\File Read Operations/sec
14:58:40:000 , GetPerf: vartype=Integer
14:58:40:000 , GetRequest: value=0 asn_type=2
14:58:40:000 , GetRequest: OK
14:58:40:000 , SnmpExtensionQueryEx
14:58:40:000 , nRequestType=SNMP_EXTENSION_GET
14:58:40:000 , GetRequest: OID=1.3.6.1.4.1.xxxxx.15.1.1 (10)
14:58:40:000 , GetPerf: path=System\File Read Operations/sec
14:58:40:000 , GetPerf: pdh_counter_path=\System\File Read Operations/sec
14:58:41:000 , GetPerf: vartype=Integer
14:58:41:000 , GetRequest: value=0 asn_type=2
14:58:41:000 , GetRequest: OK
I would have expected to get all my OIDs when starting at the top OID or at least from the top of one branch...
Just for completeness, here is an attempt at doing the getnext queries manually:
[root@localhost ~]# snmpgetnext -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.xxxxx
[root@localhost ~]# snmpgetnext -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.xxxxx.15
[root@localhost ~]# snmpgetnext -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15.1
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.xxxxx.15.1
[root@localhost ~]# snmpgetnext -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15.1.1
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.xxxxx.15.1.1
[root@localhost ~]# snmpgetnext -v 2c -c public x.x.x.x .1.3.6.1.4.1.xxxxx.15.1.2
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.xxxxx.15.1.2
[root@localhost ~]#
Here is the debugging output:
15:01:42:265 , SnmpExtensionQueryEx
15:01:42:265 , nRequestType=SNMP_EXTENSION_GET_NEXT
15:01:42:265 , GetNextRequest:1.3.6.1.4.1.xxxxx(7)
15:01:42:265 , comparemem=false
15:01:45:296 , SnmpExtensionQueryEx
15:01:45:296 , nRequestType=SNMP_EXTENSION_GET_NEXT
15:01:45:296 , GetNextRequest:1.3.6.1.4.1.xxxxx.15(8)
15:01:45:296 , comparemem=false
15:01:46:937 , SnmpExtensionQueryEx
15:01:46:937 , nRequestType=SNMP_EXTENSION_GET_NEXT
15:01:46:937 , GetNextRequest:1.3.6.1.4.1.xxxxx.15.1(9)
15:01:46:937 , comparemem=false
15:01:49:000 , SnmpExtensionQueryEx
15:01:49:000 , nRequestType=SNMP_EXTENSION_GET_NEXT
15:01:49:000 , GetNextRequest:1.3.6.1.4.1.xxxxx.15.1.1(10)
15:01:49:000 , comparemem=false
15:01:56:984 , SnmpExtensionQueryEx
15:01:56:984 , nRequestType=SNMP_EXTENSION_GET_NEXT
15:01:56:984 , GetNextRequest:1.3.6.1.4.1.xxxxx.15.1.2(10)
15:01:56:984 , comparemem=false
This is running on Windows 2003 Standard Edition, Service Pack 2 (English), btw.
Is there anything different I need to do in my counters.ini file?
Please advise?
Thanks again!
Antoine