I have no time to try it out, but I think BSD-style hostblocks should be helpful in this case. Details in doc, something along these lines:
!hostname local6.* /path/to/hostname-local6 Hostname is an implicit and condition until the next !hostname is seen. Not sure if in v2 it works with FQDN (don't think so) or just the plain hostname without domain. I think there is also a sample in the wiki or forum. Rainer > -----Original Message----- > From: [email protected] [mailto:rsyslog- > [email protected]] On Behalf Of Scott Baker > Sent: Wednesday, February 25, 2009 9:08 PM > To: rsyslog-users > Subject: Re: [rsyslog] Matching hostname and facility? > > On 02/23/2009 02:56 PM, (private) HKS wrote: > > On Mon, Feb 23, 2009 at 1:01 PM, Scott Baker<[email protected]> > wrote: > >> I have an rsyslog.conf entry like this to send everything from my > DHCP > >> server to it's own log file on my central rsyslog server. > >> > >> # DHCP logs > >> :FROMHOST, isequal, "dhcp-server.domain.com" -?dhcp > >> > >> Is there a way to specify hostname AND a syslog facility? It'd be > nice if I > >> could match that host, and local6.* or something like that. Is that > possible? > >> > >> - Scott > >> _______________________________________________ > >> rsyslog mailing list > >> http://lists.adiscon.net/mailman/listinfo/rsyslog > >> http://www.rsyslog.com > >> > > > > > > #DHCP logs > > if $fromhost == 'dhcp-server.domain.com' and $syslogfacility-text == > > 'local6' then -?dhcp > > Does this syntax work on rsyslog 2.0.x, that's what my server has on > it. > I've tried this syntax, but it's not logging. > > - Scott > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > http://www.rsyslog.com _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

