OPNsense Forum

English Forums => General Discussion => Topic started by: va176thunderbolt on February 04, 2018, 03:55:13 am

Title: Monitoring enhancement
Post by: va176thunderbolt on February 04, 2018, 03:55:13 am
Could the monitoring be enhanced to include/graph the unbound statistics and dhcp pool(s) utilization?

The dhcp pool utilization would help where I've deployed "guest" networks (churches and "free" stores) so I could if it's trending up so I can change the subnet before there's a problem.

The unbound stats would be useful for tuning.

Thanks!
Title: Re: Monitoring enhancement
Post by: faunsen on February 08, 2018, 09:53:59 am
I'm not a DHCP expert but I think you could create a script and add it to the Monit as described in the Monit HowTo (https://forum.opnsense.org/index.php?topic=5303.0) (look for the CheckIPMI.sh script).

CheckDHCP.sh
Code: [Select]
#!/bin/csh

set MaxLeaseCount = 500

set LeaseCount = `grep -c "binding state active" /var/dhcpd/var/db/dhcpd.leases`
echo "LeaseCount: $LeaseCount"
if ( $LeaseCount >= $MaxLeaseCount ) then
   exit 1
endif
exit 0