SnmpTools is an snmp agent servicing all windows performance counters thus allowing tools such as MRTG or Cacti to retrieve windows performance values (cpu, memory, disk, etc.). Discussion takes place here
- Copy snmptools.dll to system32 (on x32) or windows (on x64)
- Register the snmp agent by using the regagent.reg file
- Create your ini file (an example is provided)
- Restart the snmp service
- Test that the agent is running by issue a snmpget command on 184.108.40.206.4.1.15 : it should return the string ‘snmptools’
Create a definition file (c:\counters.ini for example as defined by default in the reg file) where you will define your oid’s and the value that should be returned (a counter, a string, or the output of an executable).
Note: Counters have to be in english.
counter=this is a test
counter=cscript /nologo c:\test.vbs
snmpwalk -v 2c -c public 127.0.0.1 220.127.116.11.18.104.22.168 will walk to the next oid (here above 22.214.171.124.126.96.36.199.2).
Note : the next oid means the next one in the definition file (snmptools will not re order them for you).
Whole numbers will be sent as snmp type=asn_integer32 (2) or type=asn_counter64 (3) (only with snmpv2 and up).
Other value types will be sent as snmp type=asn_string (4).
Float values will always use ‘.’ as separator.
Return value should not have a line return.
1. configure the MS SNMP service (in the traps tab, add the ip of the snmp workstations that should receive the traps).
2. add the following registry key under [HKEY_LOCAL_MACHINE\SOFTWARE\snmptools\currentversion] :
traps = « c:\traps.ini » (string)
Optionally, you may add trap_delay = 60000 (dword) if you wish to set the delay between each run to 60 secs (15 secs by default)
3. Create a traps.ini like this :
script=cscript /nologo c:\trap1.vbs
script=cscript /nologo c:\trap2.vbs
Note : then VBS can return either a string or an integer. If the returned value is empty, the agent will send a varbindlist with len=0.
Use the snmptools.dll 32 bits version on windows 64 bits platform by using regagentWow6432.reg and copy the DLL file to the syswow64 folder then, not system32.
The registry configuration key on x64 systems is [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\snmptools\currentversion] and no more [HKEY_LOCAL_MACHINE\SOFTWARE\snmptools\currentversion].
Size: 290 Kb
Last Released on: Nov-2012