dhcp server IP pool monitoring

Niall O'Reilly niall.oreilly at ucd.ie
Wed Mar 12 09:49:15 UTC 2014


At Wed, 12 Mar 2014 09:58:17 +0200,
Mehmet Ali Öksüz wrote:
> 
> Hi Dear Friends,
> 
> we have 3 dhcp servers.
> dhcp-1: Red Hat Enterprise Linux Server release 6.5 (Santiago): dhcp-4.1.1
> dhcp-2: Red Hat Enterprise Linux Server release 6.5 (Santiago): dhcp-4.1.1
> dhcp-3: Debian GNU/Linux 7 (wheezy):  isc-dhcp-server 4.2.6
> 
> we have 75 C Class IPs and 105 subnets (pool) on dhcp servers.
> 
> i'm looking dhcp server IP pool monitoring tool. we tried solarwinds
> IPAM, cacti. but they don't work correctly.
> i found some open source script, i want to monitoring (viewing) IP
> Pools like mrtg, time based and graphical interface
> 
> any ideas?

  I think you'll need to put some thought and effort into how to make
  it work in your situation, as I doubt there's an existing solution
  which will "just work" for you.

  We use MRTG with an external monitoring script.  The script parses
  the (ISC dhcpd) leases file and, for each subnet prefix produces the
  four lines of output required by MRTG's interface for such scripts.

  Over the years, I've found it useful to add features both to the
  script and to the dhcpd configuration file so that repetition of the
  same or similar processing can be avoided.

  By setting variables in dhcpd.conf, you can populate the leases file
  with tags which can be used by the monitoring script as short-cuts,
  so that this script has less work to do reading configuration or
  data files.

  Here's an example of corresponding configuration- and lease-file
  fragments:

# from dhcpd.conf
    shared-network bf-test-cc {
        set link-label = "bf-test-cc";

        subnet 10.10.61.0 netmask 255.255.255.0 {
            option subnet-mask 255.255.255.0;
            option routers 10.10.61.1;
            set subnet-prefix = "10.10.61.0/24";

            pool {
                set pool-label = "bf_test_cc_l1";
                range 10.10.61.127 10.10.61.254;
            }
        }
    }

# from dhcpd.leases
lease 10.10.61.254 {
  starts 1 2012/07/23 14:21:37;
  ends 1 2012/07/23 14:23:37;
  tstp 1 2012/07/23 14:23:37;
  cltt 1 2012/07/23 14:21:37;
  binding state free;
  hardware ethernet 00:16:6f:6f:b5:33;
  set pool-label = "bf_test_cc_l1";
  set subnet-prefix = "10.10.61.0/24";
  set link-label = "bf-test-cc";
  client-hostname "itc-daed-06";
}

  The script can then select and count leases based on the
  pre-recorded tags, rather than having to refer to IPAM data to
  find the subnet to which a given address belongs, or what name
  to use, or whatever.

  If the monitoring script uses a cache, then a single scan of the
  leases file can provide data for many MRTG data series.

  If MRTG is not running on the same system as dhcpd is, some kind
  of RPC mechanism (eg, a web service) will be needed.

  I hope this helps a bit.


  Best regards,

  Niall O'Reilly


More information about the dhcp-users mailing list