I want to monitor windows DHCP scope release, ideally the sensor can return to a percent, which is showing in which percent address is in used.
Way to monitor DHCP statistics per scope
Summary
Monitor DHCP statistics, using DHCP MIB and PRTG SNMP-Custom sensors.
Steps
1. Install the snmp service in your DHCP server if not installed, using add/remove windows components. Then go to Network and management tools and install the service.
2. Once the snmp service is installed, click on it, then click on the security tab. Specify the community name and hosts allowed to get snmp info.
3. Check the available OID's in the DHCP-MIB You will find all the relevant MIB values related to the DHCP scope statistics:
dhcpScope | 1.3.6.1.4.1.311.1.3.2 |
scopeTable | 1.3.6.1.4.1.311.1.3.2.1 |
scopeTableEntry | 1.3.6.1.4.1.311.1.3.2.1.1 |
subnetAdd | 1.3.6.1.4.1.311.1.3.2.1.1.1.ScopeAddress |
noAddInUse (Used IPs) | 1.3.6.1.4.1.311.1.3.2.1.1.2.ScopeAddress |
noAddFree ((Available IPs)) | 1.3.6.1.4.1.311.1.3.2.1.1.3.ScopeAddress |
noPendingOffers | 1.3.6.1.4.1.311.1.3.2.1.1.4.ScopeAddress |
4. Add a PRTG SNMP Custom or SNMP Custom Advanced sensor with the MIB value required, and make sure you modify the SNMP credentials. Example, if your scope is 192.168.100.0 and you want to know the number of used IPs, the complete OID will look like this:
1.3.6.1.4.1.311.1.3.2.1.1.2.192.168.100.0 |
5. Then You can add notifications and thresholds per sensor. Ex.: Set a notification to send an email/sms if the number of available IPs are below 10.
Some notes/comments:
- Since the data is an SNMP table, this is a great opportunity to try-out the SNMP Custom Table sensor
- If you encounter Generic Error (SNMP error # 5) on Windows Server 2012, please refer to this
- If you wish to monitor DHCP using PowerShell instead, there are several customer-shared scripts available, pick the one that suits you best:
Disclaimer:
The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.