ISC DHCP client (dhclient)
The ISC DHCP Client, or dhclient, is commonly used on Linux systems for requesting DHCP leases.
Like DHCPd, dhclient logs its activity to the local syslog logger (daemon
facility).
See Collecting and Parsing Syslog for general information about collecting Syslog logs.
Example 1. Collecting dhclient messages
This configuration uses the im_file module to read dhclient messages from one of the syslog log files, and the xm_syslog parse_syslog() procedure to parse them.
Only events from the dhclient
source are kept; others are discarded with drop().
This method will most likely not preserve severity information. See Reading syslog log files for more information and the other sections in Collecting and parsing syslog for alternative ways to collect syslog messages. |
nxlog.conf
<Extension _syslog>
Module xm_syslog
</Extension>
<Input dhcp_client>
Module im_file
# Debian writes `daemon` facility logs to `/var/log/daemon.log` by default
File '/var/log/daemon.log'
# RHEL writes `daemon` facility logs to `/var/log/messages` by default
#File '/var/log/messages'
<Exec>
parse_syslog();
if $SourceName != 'dhclient' drop();
</Exec>
</Input>