[Kea-users] log output format and %m

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] log output format and %m

Rick Dicaire
Hi, new to list and kea, using 1.6 from ISC's cloudsmith.io deb repo on Ubuntu 18.04 LTS.
I have a working dhcp4 and ddns configuration.
I'm now trying to customize logging to output json for easy ingestion by ELK stack.
I'm working with dhcp-ddns first.
I'm using this pattern:

"pattern": "{\"date\":\"%D{%Y-%m-%dT%H:%M:%S.%q%z}\",\"kea.ddns.log.level\": \"%p\",\"kea.ddns.log.component\":\"%c\",\"kea.ddns.log.pid\":\"%i\",\"kea.ddns.log.data\": \"%m\"}\n"

which seems to work *except* for the multiline output of %m (log message):

{"date":"2019-10-12T23:43:26.431-0400","kea.ddns.log.level": "INFO","kea.ddns.log.component":"kea-dhcp-ddns.d2-to-dns","kea.ddns.log.pid":"21365","kea.ddns.log.data": "DHCP_DDNS_ADD_SUCCEEDED DHCP_DDNS Request ID 0000017160126516693CF3917DFD4650B91CEB8437EC50975E886813C72F8606E30D7C: successfully added the DNS mapping addition for this request: Type: 0 (CHG_ADD)
Forward Change: yes
Reverse Change: yes
FQDN: [ddns-192-168-17-105.dhcp.ldev.]
IP Address: [192.168.17.105]
DHCID: [0000017160126516693CF3917DFD4650B91CEB8437EC50975E886813C72F8606E30D7C]
Lease Expires On: 20191013044326
Lease Length: 3600
"}

Single line outputs of %m are fine:
{"date":"2019-10-12T23:40:58.595-0400","kea.ddns.log.level": "INFO","kea.ddns.log.component":"kea-dhcp-ddns.commands","kea.ddns.log.pid":"21365","kea.ddns.log.data": "COMMAND_ACCEPTOR_START Starting to accept connections via unix domain socket bound to /tmp/kea-dhcp-ddns-ctrl.sock"}
{"date":"2019-10-12T23:40:58.597-0400","kea.ddns.log.level": "INFO","kea.ddns.log.component":"kea-dhcp-ddns.dctl","kea.ddns.log.pid":"21365","kea.ddns.log.data": "DCTL_CONFIG_COMPLETE server has completed configuration: listening on 127.0.0.1, port 53001, using UDP"}
{"date":"2019-10-12T23:40:58.597-0400","kea.ddns.log.level": "INFO","kea.ddns.log.component":"kea-dhcp-ddns.dhcpddns","kea.ddns.log.pid":"21365","kea.ddns.log.data": "DHCP_DDNS_STARTED Kea DHCP-DDNS server version 1.6.0 started"}

As I understand json, multiline is not valid so I'm trying to figure out if the format of %m
can be modified?

Thanks


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users