Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

How do I convert the following to rsyslog syntax?

filter local2 { facility(local2); }; 
filter not_local2 { not facility(local2); }; 

destination server2  { tcp("server2" port(1111)); };
destination localhost { file ("/var/log/local2.log"); };

log { source(s_all); filter(local2); destination(localhost); };

filter pics { program ("preview_*"); };
destination pics  { file ("/logdir/${PROGRAM}.log"); };
log { source(s_all); filter(pics); destination(pics); };
share|improve this question

1 Answer 1

Did you find it ? If not, propably it's something like ...

if (%facility% equals local2 ) then /var/log/local2.log

if (%programname% equals 'preview_*' ) then /logdir/%programname%.log

(You didn't use server2 anywhere, so i didn't include it)

(Much easier ;p)

Hope it helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.