Logging circuit-id

perl-list perl-list at network1.net
Wed Mar 18 01:15:40 UTC 2015


Here is an example of how I have done it: 

if exists agent.circuit-id { 

log ( error, 

concat( "agent.circuit-id,", binary-to-ascii (10, 8, ".", leased-address),",", 

"circuit-id,",option agent.circuit-id,",", 

"time,",binary-to-ascii(10,32,"",encode-int (lease-time,32)),",", 

"hardware,",binary-to-ascii(16,8,":",substring(hardware,1,7)) 

) 

); 

} 

If that doesn't work then the circuit-id may not be there (if no line appears at all in the logs), or if it only logs a partial line then the circuit-id is likely binary instead of ASCII. I'm not sure how to log if it is binary - some use of binary-to-ascii will be necessary. 

> From: "Sean McMurray" <sean at mvtel.com>
> To: dhcp-users at lists.isc.org
> Sent: Tuesday, March 17, 2015 5:51:16 PM
> Subject: Logging circuit-id

> I would like my dhcpd logs to include circuit-id.
> I have tried to use log() directives in my conf file, but nothing I have
> tried works.

> Here is an example of a configuration I have included in a subnet:

> log(info, concat(
> " Mac: ",binary-to-ascii(16, 8, ":", substring(hardware,1, 6))
> ," IP: ",binary-to-ascii (10, 8, ".", leased-address)
> ,"Circuit: ",option agent.circuit-id
> ));

> Standard logging is working fine to record DHCPDISCOVER, DHCPOFFER, etc.
> I just can't get custom entries to show up in the log.

> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20150317/46ce486a/attachment.html>


More information about the dhcp-users mailing list