DHCPD to log to another log file

David Forrest drf at maplepark.com
Fri Jan 30 14:50:41 UTC 2009


On Fri, 30 Jan 2009, Randall C Grimshaw wrote:

> I have been playing with this myself and the best solution so far is to log at level error. Then in syslog define (i.e.) local3.error in addition to the usual log, but to a different destination. The error messages will still appear in the usual info level log too, but the error level log has less background noise. I format the log() messages with fieldnames such as MACaddress= and IPnumber= which are then indexed by splunk.
>
> Randy
>
> -----Original Message-----
> From: dhcp-users-bounces at lists.isc.org [mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of Jessica Meyer
> Sent: Friday, January 30, 2009 3:00 AM
> To: dhcp-users at lists.isc.org
> Subject: DHCPD to log to another log file
>
> Hi
>
> I have read a lot about DHCP logging, although I'm missing information
> about DHCP logging. I know that DHCPD logs to syslog per default, and
> this works great. But what I need is a "custom log" of just a limited
> set of information (using the log() function).
>
> Am I able to configure a second, independent log for this case? So
> I've nothing against logging in syslogd, but I need a "clean" file
> with just the information i want.
>
> Any help is highly appreciated!
> Jess
> _______________________________________________
> 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
>

I have set my system (F9) up to use syslog (actually an update to Fedora 9 
changed it to rsyslog ??) as Randy suggests. It needed an option in 
/etc/dhcpd.conf -->
log-facility local1;   # per /etc/rsyslog.conf setting

and an entry in /etc/rsyslog.conf -->
# log dhcpd per /etc/dhcpd.conf
local1.*						/var/log/dhcpdlog

I also stopped it from logging in /var/log/messages by this in 
/etc/rsyslog.conf-->
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local1.none   /var/log/messages
                                          ^^^^^^^^^^^
Your system may vary though.

Dave
-- 
David Forrest
St. Louis, Missouri



More information about the dhcp-users mailing list