Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running rsyslogd 4.2.0 on Ubuntu. I'm trying to use the output channel feature described here: http://www.rsyslog.com/doc/rsyslog_conf_output.html

Here's the relevant portion of my config:

$outchannel test_rotated,/var/log/test/test.log,1000000,/root/scripts/rotate-test-logs.pl
local0.* :omfile:$test_rotated

But rsyslog refuses to do anything and the /var/log/test/test.log does not even appear. If I replace those two lines with:

local0.* /var/log/test/test.log

everything works (but file is not rotated automatically of course).

What am I missing?

share|improve this question
up vote 1 down vote accepted

Ubuntu's man pagea doesn't seem to suggest the syntax

local0.* :omfile:$test_rotated

the site you linked advises -- it says:

Keep  in  mind  that $outchannel just defines a channel with "name". It
does not activate it.  To do so, you must  use  a  selector  line  (see
below).  That selector line includes the channel name plus an $ sign in
front of it. A sample might be:

       *.* $mychannel

Maybe this works:

local0.* $test_rotated

a: It apparently depends on the version of rsyslog you use, hence on the Ubuntu release. It would thus be save to just look at your man page (man rsyslog.conf) or chose the right release in the site I linked.

share|improve this answer
That was indeed the problem, silly me. Thanks again. – Antonio Dolcetta Mar 7 '12 at 13:35

Your Answer


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.