DHCP Logging

Frank Sweetser fs at WPI.EDU
Sat Jun 26 13:15:56 UTC 2010


On 6/26/2010 12:32 AM, Blake Griffin wrote:
> I am trying to do detailed logging of DHCP and keep it in a standard format so
> that it can be sent to a mysql database with entries for type (set-top box or
> data), addy, mac, host-name, AID, CID, and event type (commit, release,
> expiry). I have multiple scenarios in which portions of this data is
> available. The scenarios are:
>
> -set-top-box, no host-name, AID, no CID
>
> -set-top-box, no host-name, AID, CID
>
> -data, host-name, AID, CID
>
> -data, host-name, AID, no CID
>
> -data, no host-name, AID, CID
>
> -data, no host-name, AID, no CID
>
> I know this can be accomplished via combinations of if statements, etc. With
> the various scenarios, it can get very lengthy and convoluted. Im looking for
> a more elegant way to accomplish this.

Check out the pick-first-value function.

-- 
Frank Sweetser fs at wpi.edu  |  For every problem, there is a solution that
WPI Senior Network Engineer   |  is simple, elegant, and wrong. - HL Mencken
     GPG fingerprint = 6174 1257 129E 0D21 D8D4  E8A3 8E39 29E3 E2E8 8CEC



More information about the dhcp-users mailing list