Page 1 of 1

Send notification email when DHCP pool nears exhaustion

Posted: Tue Dec 04, 2012 9:08 am
by astern
Hello all,

I'm wondering if there is some kind of hook or way to derive DHCP pool usage to come up with a script and send email alert to admin when, say, 95% of the pool is exhausted.

Anybody gone through this before?

Thanks,
Andrew

Re: Send notification email when DHCP pool nears exhaustion

Posted: Tue Dec 04, 2012 7:31 pm
by c0d3rSh3ll
you can decrease the time of lease for dhcp-server.

but you can use this script, set your limit and the name of script.
{
local limit 250
local ip [len [ip pool used find ]]
if ($ip > $limit ) do={/system script run name_of_script_email}
}

Re: Send notification email when DHCP pool nears exhaustion

Posted: Tue Dec 04, 2012 8:12 pm
by astern
Wow, that's more than I was expecting to get back, thank you.

And I did lower lease time to recycle address space quicker.

Thanks again,
Andrew