Graphing with MRTG something other than active leases?

Leif Arne Neset leifa at alfanett.no
Fri Oct 10 10:58:44 UTC 2008


Nomad skrev:
> Is anybody else using MRTG to create graphs for ISC DHCP?  I have graphs for
> the active and known leases but I've been asked to do the same for the
> number of DHCPDISCOVER and other messages.  We've had several instances of
> clients going nuts and flooding our servers with DHCPDISCOVER and we'd like
> to keep track of this.
> Any thoughts?  Suggestions?  Currently we're running v3.1.0 on a redhat
> enterprise v4 server.
> 

We are starting a small script from the MRTG server that uses tcpdump, 
on the dhcp servers, for 10 sec. to count the number of incoming dhcp 
packets and returns a value to MRTG. The script on the dhcp server is 
somthing like this:

#!/bin/sh
TMPFILE=temp1.txt
tcpdump -i eth0 udp and port 67 and dst <ip of dhcpserver> 2>$TMPFILE 
1>/dev/null&
PID=$!
sleep 10
kill $PID
sleep 1
req=`tail temp1.txt|grep received|cut -f 1 -d ' '`
reqsek=`expr $req / 10`
echo $reqsek
echo "0"
echo "unknown time"
echo "<name of dhcpserver>"
exit 0



Leif Arne Neset
leifa at alfanett.no
-------------- next part --------------

No virus found in this outgoing message.
Checked by AVG - http://www.avg.com 
Version: 8.0.173 / Virus Database: 270.8.0/1717 - Release Date: 09.10.2008 16:56


More information about the dhcp-users mailing list