[mrtg] Re: Using an external program as a target

Cam Bowman cbowman at amtelecom.ca
Mon Mar 6 17:02:09 MET 2000


thanks..you suggestion does return a number, however the dhcpd.leases file seems to keep records for expired leases.  

I need some method to check if the "ends" field is less than or equal to the current time.
I'm not a programmer .. do you know how to do this?



dhcpd.leases example file.

lease 192.168.5.2 {
        starts 1 2000/03/06 14:15:32;
        ends 1 2000/03/06 18:15:32;
        hardware ethernet 00:10:a4:fa:b2:00;
        uid 01:00:10:a4:fa:b2:00;
        client-hostname "A0369";
}
lease 192.168.5.1 {
        starts 3 2000/03/01 21:45:54;
        ends 3 2000/03/01 21:47:13;
        hardware ethernet 00:60:97:91:a6:c2;
        uid 01:00:60:97:91:a6:c2;
        client-hostname "A0335";
}


- Cam

-----Original Message-----
From:	Jeff  Warnica [SMTP:jwarnica at ns.sympatico.ca]
Sent:	Monday, March 06, 2000 10:46 AM
To:	alex at ergens.op.Het.Net; Cam Bowman
Cc:	MRTG users
Subject:	RE: [mrtg] Re: Using an external program as a target


man dhcpd.leases:

FORMAT
       Lease descriptions are stored in a format  that  is  parsed  by  the
same
       recursive   descent   parser   used   to   read   the   dhcpd.conf(5)
and
       dhclient.conf(5) files.   Currently, the only declaration that is
used  in
       the dhcpd.leases file is the lease declaration.

        lease ip-address { statements... }

grep lease /var/state/dhcpd.leases|wc -l

I dont have a populated dhcpd.leases to check that on, but itll get you a
number..

> -----Original Message-----
> From: mrtg-bounce at list.ee.ethz.ch [mailto:mrtg-bounce at list.ee.ethz.ch]On
> Behalf Of alex at ergens.op.Het.Net
> Sent: Monday, March 06, 2000 11:36 AM
> To: Cam Bowman
> Cc: MRTG users
> Subject: [mrtg] Re: Using an external program as a target
>
>
> Cam Bowman wrote:
> >
> > This is a little off topic, but while your talking about add-on
> programs;
> >  I am looking for a script that will examine the dhcpd.leases
> file and send
> > the appropriate numbers to MRTG for graphing IP subnet
> utilization.  I have
> > been looking for about two weeks now and can't find a utility
> to do this..
> > any help is appreciated..
>
> Why not write your own?
>
> You seem to know what you want to monitor.  Do just that, write a script
> that returns those appropriate numbers ...
> The format of this output has been discussed so this should not be a
> problem.  When in doubt, check the config.txt file or visit the MRTG
> web page.
>
> regards,
> --
>    __________________________________________________________________
>  / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
> | work                                                         private |
> | My employer is capable of speaking therefore I speak only for myself |
> +----------------------------------------------------------------------+
>
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/mrtg
>
>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list