So i'm running dhcpd on a server and to my knowledge the logs from dhcpd are not adjustable, if they are i'm dying to know how...
Anyways, i need something to check the dhcpd.leases-file which is formated like so:
lease 192.168.0.1 { starts 4 date time; ends 4 date time; cltt 4 date time; binding state active; next binding state free; rewind binding state free; hardware ethernet MAC-address; set vendor-class-identifier = vendor_id; option agent.circuit-id "circuit-id"; option agent.remote-id "remote-id"; client-hostname "hostname"; }
Which continously is updated with all active leases.
What i need is for something to keep track of this file and if a lease with a circuit-id containing a set string ie trigger in "hostname-circuit-trigger" it should write lease-ip, MAC-address and circuit-id to syslog or simply to a seperate file.
On second thought it doesn't even need to only catch the ones with "trigger", it would be equally good to just print lease-ip, MAC-address and circuit-id from the file continously.
I don't even know where to begin with this so i would appreciate all the help i could get!