WTCS.ORG |
Troubleshooting your SNMP Installation
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
This section deals with problems you may be encountering with your SNMP and/or MRTG configuration, and anything else that's related. Some of these tips may have appeared on the MRTG Mailing List, and some are as a result of my own testing and experiences.
If you are having
problems and would like some help, please send me an email containing the following
information:
1) Windows NT version
2) Service Pack Version
3) MS BackOffice add-ons and version (i.e. Proxy Server 2, Exchange 5.5, IIS 4, Option Pack
4)
4) SNMP4NT.ZIP version (date)
5) Description of problem (what OIDs do not work, which ones do, etc.)
Please attach a registry dump of the
HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMP hive (done like
so:)
1) Start/Run/regedt32
2) Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMP
3) BE SURE THAT THE SNMP hive is highlighted!!
4) Select Registry/Save Key, and save it to a temp directory (i.e. c:\temp\snmp_bad.reg)
I will look through the key, and see if there is a glaring (i.e. common) problem amongst
the "broken" instances of SNMP4NT. Any errors found will be immediately
addressed, and SNMP4NT will be updated.
You can send the email to snmp4tpc.help@wtcs.org.
Thanks for your help, comments, and contributions to this matter. I do this as a hobby, so response may not be as speedy as you would like. Be gentle! I do my best to provide a stable product.
![]() |
![]() |
![]() |
![]() SNMP Error: Resolution: The HKLM/System/CurrentControlSet/Services/SNMP/Parameters/ExtensionAgents/RFC1156Agent key is missing Here is a registry snapshot of a "healthy registry". Note the RFC1156 entry. Make yours look like that and you should be on your way. It points to HKLM/Software/Microsoft/RFC1156Agent, where it subsequently points to inetmib.dll (see the picture here). This is a regular occurrence with MS Windows NT. No good reason, but if it happens again, you will know how to fix it! |
SNMP Stats (i.e. MIB-II) no longer accessible after applying Service
Pack 5 for NT 4
OK, things are working great, so you decide to
install SP5 for NT4. Then, when you really need to, you discover that you can no
longer access SNMP stats. Well,
it happened to me too!. After I installed SP5, and updated MRTG to v2.8.8, I
found that NONE of the CFG files worked. Arrggh! Getif could not browse the
MIB tree, either. The SNMP service was starting and running properly. So what
could be the problem? Dunno exactly, but here's what I did to get it running again
...
Navigate to
HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMP
Select Registry/Save, and saved it as D:\TEMP\SNMPSAVE.REG
Then I removed the SNMP Service and rebooted. Then I added the SNMP Service and
Rebooted (you'll get an error!). Then, I reapplied SP5 (and yes, rebooted!).
At this point (probably 30 minutes later!) there is a completely new SNMP
Key, but you will see that all the old Extension Agents are gone. That's why you
backed it up beforehand. Restore the key you saved earlier.
Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services
Select Edit/Add Key, and call it SNMPTEMP
Navigate to
HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMPTEMP
Select Registry/Restore, and select the file you created earlier (I
used D:\TEMP\SNMPSAVE.REG)
Now, you can open the Paramters/Extension Agents in both the SNMP and SNMPTEMP keys.
One at a time, I recreated the keys in SNMP!
Note that in the new SNMP key, that the
SOFTWARE\Microsoft\LANManagerMIB2Agent\CurrentVersion and
SOFTWARE\Microsoft\RFC1156Agent\CurrentVersion extension agents are listed as 1 and 2.
Recreate the keys from SNMPTEMP from 3 to whatever, by selecting Edit/Add Value
(REG_SZ:) and typing the next number. You will then be prompted to enter a value.
I simply cut from SNMPTEMP/Parameters/ExtensionAgents and pasted in the
SNMP/Parameters/ExtensionAgents.
If you had either or both a W3SVC and MSFTPSVC key, then recreate
them too! The do a net stop snmp, and a net start snmp from a cmd prompt.
That should get you back on the road!
DELETE THE HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMPTEMP
KEY ONCE YOU HAVE FINISHED! DO NOT FORGET TO DO THIS! Otherwise you may find two
SNMP services in Control Panel/Services!
Unable to get HTTP/FTP SNMP Stats after installing SNMP
If you install SNMP after you install IIS, then the hooks into the IIS and HTTP MIB dlls will not be there, and you will not be able to browse the HTTP and FTP MIBs. I guess Microsoft assumes that you will always install SNMP first. Hmm. Anyway, other than re-installing IIS (as far as I know anyway), there is no other way to get access to the counters other than by modifying the registry. Feel up to it? There is an assumption here that you have used and know about the Windows NT Registry Editor). Here goes ...
By the way, I am providing this information to help you (cause
this happened to me!), but ANY process that involves modification of the registry
introduces a risk of corrupting it. YOU HAVE BEEN WARNED!
1) You will need to download the following files:
2) To generally fix SNMP for
all MS Perfmib and IIS SNMP components:
Note: This will completely replace the
HKLM/System/CurrentControlSet/Services/SNMP key! Save yours BEFORE you do this
unless you don't have any reason to.
- Stop the SNMP Service (open a command prompt, type "net
stop snmp")
- Start the Registry Editor (start/run/regedt32)
- Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/SNMP
- Select Registry/Restore, and select SVC_SNMP.KEY
3) To fix W3SVC (HTTP) SNMP
Hooks:
- Create a key under HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services called W3SVC
- Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/W3SVC
- Select Registry/Restore, and select SVC_W3SVC.KEY
- Create a key under HKEY_LOCAL_MACHINE/Software/Microsoft called W3SVC
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/W3SVC
- Select Registry/Restore, and select SW_W3SVC.KEY
4) To fix FTP SNMP Hooks:
- Create a key under HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services called MSFTPSVC
- Navigate to HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/MSFTPSVC
- Select Registry/Restore, and select SVC_MSFTPSVC.KEY
- Create a key under HKEY_LOCAL_MACHINE/Software/Microsoft called MSFTPSVC
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/MSFTPSVC
- Select Registry/Restore, and select SW_MSFTPSVC.KEY
5) Modify the SNMP Service
properties:
- Go into Control Panel/Services, and select the SNMP Service. You will
need to change the startup characteristics to match yours (I have my SNMP service start
with a service account).
- Go into Control Panel/Network, select the Services Tab, and double click SNMP.
Change the settings to your preferences!
6) Verify the path to the
XXXmib.dll files:
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/MSFTPSVC/CurrentVersion
- Check to make sure the path to ftpmib.dll is accurate and that the file exists there!
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/W3SVC/CurrentVersion
- Check to make sure the path to httpmib.dll is accurate and that the file exists there!
You will more than likely need to change the paths,
since you might have NT installed on a different drive/directory than I do.
7) Restart the SNMP
service:
- Open a command prompt, type "net start snmp"
That ought'ta do it!
net start snmp [/logtype: type] [/loglevel: level]where:
net start snmp /logtype:6 /loglevel:10This starts the SNMP service with loglevel 10, and logs events in the eventlog as well as in SNMPDBG.LOG.
cmd-prompt> snmp
To return the the main page, click the logo!