Logging circuit-id
perl-list
perl-list at network1.net
Wed Mar 18 13:21:27 UTC 2015
What version of ISC DHCP, and is this DHCPv6 that you are trying to log?
> From: "Sean McMurray" <sean at mvtel.com>
> To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
> Sent: Tuesday, March 17, 2015 9:22:30 PM
> Subject: Re: Logging circuit-id
> I can tell it to log(error, "Hello") and it won't log.
> On 03/17/2015 06:15 PM, perl-list wrote:
>> 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
>> _______________________________________________
>> dhcp-users mailing list dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
> _______________________________________________
> 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/20150318/eef0f60f/attachment.html>
More information about the dhcp-users
mailing list