~:: kalyan ::~

April 4, 2007

syslog-ng with dhcp

Filed under: dhcp, Linux, open-source, Script, SuSE — skalyanasundaram @ 10:52 am

It is been long time i looked at the log files methods. I had written an article earlier for logging the dhcp messages at separate location. Suddenly i felt syslog daemon itself missing!. I am not updated 😦 Well, now they comes up with syslog-ng. It is really cool, has all the flexibility. The abstract way of doing things, reg exp support and TCP support. I was trying out for logging the dhcp to log in seperate file just for the learning purpose.

You will have to add the following lines in /etc/syslog-ng/syslog-ng.conf [may be at the bottom]

filter f_daemon     { facility(daemon); };
filter f_dhcpd       { match(“dhcpd”); };
destination dhcpmessages { file(“var/log/dhcp.log”); };
log { source(src); filter(f_daemon);  filter(f_dhcpd); destination(dhcpmessages); }; 

By default the dhcp sends out in daemon facility , so i just used it. And /var/log/dhcp.log have to be touched. It may ask some time to have a 640 permission. But what ever works for me. and need to do a syslog restart. Now everything goes fine :).

But if you use pipes instead of file in the destination atleast in SuSE you will have to make sure the apparmor [SELinux in redhat] has the permission to write on the ports. I did not try to configure the profile. I just simply unloaded the apparmor and tried it that works.

Advertisements

December 20, 2006

what is SuSE means?

Filed under: Linux, SuSE — skalyanasundaram @ 11:46 am

I wonder why the u in SuSE always small. I never known what is SuSE means for earlier. SuSE is for Software und System Entwicklung. Ofcourse it is german. It comes like Software and System Development. In eNgLisH it is SaSD 😦 I Dont like it. Let it be in german only. It is good actually.

Blog at WordPress.com.