Logging DISCOVER messages

Staffan.Ungsgard at teliasonera.com Staffan.Ungsgard at teliasonera.com
Fri Feb 16 10:05:44 UTC 2007


Hi
Is there a way to log DISCOVER messages along with option 82 information in one line in the log file.
Today I log the option 82 info using on commit as:

on commit {
  log(info, concat("dhcplog: ; ",option agent.remote-id, " ; ",binary-to-ascii (10, 8, ".", leased-address)," ; " , binary-to-ascii\
(16, 8, ":", substring(hardware, 1, 6))  ));
}

This gives an output like:
Feb 16 00:21:04 dhcp3 dhcpd: [ID 702911 local0.info] dhcplog: ; OPTION-82-INFO-HERE ; 192.168.3.90 ; 0:31:f3:d6:f2:7c

I would like to log this only when there is a DISCOVER message instead of every time the address is committed. Is this possible.

Best Regards

-- Staffan





More information about the dhcp-users mailing list