Trouble with rsyslog config to filter dnsmasq-log-spam
Hi,
I'm sure this is really easy once you know how to do it :-) My syslog is filling up with DHCP lease statements from dnsmasq, and I would like to move all these messages to a separate log. It looks really easy according to rsyslog configuration, but I just can't get it to work the way it should. The messages I would like to filter look like the following: Code:
Jan 3 20:10:07 Majestix dnsmasq-dhcp[6614]: DHCPREQUEST(bond0) 192.168.1.81 10:68:ff:ff:ff:ff What I've tried in the config is a plethora of variations over this theme: Code:
if $programname == 'dnsmasq-dhcp' and $syslogseverity <= '6' then /var/log/dnsdhcp.log Anyone care to give me a hint to where I'm heading in the wrong direction? -y1 |
Why not just set dnsmasq to log to its own file?
From the dnsmasq manpage... Quote:
|
Thanks for answering!
I guess I could, but that would mean all dnsmasq entries would go there, also the critical ones prohibiting network operation. What I'd like to do is just filter out the daily noise, but keep the serious stuff so that I can trigger alerts on it. The only way to do that I still believe to be filtering all dnsmasq entries with severity _LESS_ than the informational ones to go out, but let rsyslog be the decider of all these things. Besides, I'll have to do this for a few remote apps as well, so I'd better figure out how to do it anyway :-) -y1 |
All times are GMT -5. The time now is 07:43 PM. |