If you have 2 DHCP servers with split-scope configured on each of them and you would like to be notified when both of them are lacking IPs for a specific scope(s) - you are at the right place.
It is my pleasure to share with you this solution.
Assumptions:
- You have 2 DHCP servers (if your scope is split between more than 2 servers, than you will just simply need to adopt SQL query accordingly)
- Your DHCP server is Microsoft based (if it is not, the principle described here is still applicable. You will just need to adopt application template a little bit)
Summary:
- Monitor Even log on DHCP server for the Event with ID 1020
- Apply special filtering criteria to only pick-up events when it reports that remaining IPs have fallen below certain threshold (10 in this example)
- Fire off an alert when both DHCP servers have same condition - less than 10 free IPs remaining on each
Step-by-step:
(1)
Import attached application template into your SAM and modify it a little bit:
- Rename component monitor to reflect your DHCP scope pool IP
Image may be NSFW.
Clik here to view.
- Expand settings and update regular expression to reflect the same. Please be careful to only update digits, leaving all other special characters as they are.
- You can also set your alerting threshold. I have chosen it to be 10. Here is a cool resource to test your regular expression if you wish: Regex Tester
Image may be NSFW.
Clik here to view.
- Add more component monitors if needed for every one of your scope (Windows Event Log Monitor) and replicate same settings.
(2)
Assign this application to your DHCP servers.
(3)
Import attached alert into your Advanced Alert Manager and modify some bits as shown below:
- Modify DHCP server names in Trigger Condition tab
Image may be NSFW.
Clik here to view.
- Do the same in Reset Condition tab
(4)
That's it!
Comments, stars, likes... all welcome
Thank You,
Alex
=====================
Inspired by Vinay BY solution for