# this is a sample of what an Apache-like rsyslog.conf could look like # note that order of appearance is no longer important (technically, this # requires multiple parsing stages, but that's OK -- it is a one time # effort and does not contribute to runtime performance) emitstartupmessages off # this loads the module binary imtcp #inline comment maxlisten 512 # a somewhat verbose form type imtcp #params holds module-specific config parameters listen 10514 ruleset remote10514 # sample for the most condensed form listen 10515; ruleset remote10515 # no filter specified --> all messages! type omfile file /var/log/catchall # this is a "stand-alone" action, to be used in more than one rule type omfile filetemplate dynGen pri mail.*; # condensed form type omfile file /var/log/remote10514 execonlyonce 5sec target 192.168.1.2:514 protocol udp previousfailed on # execonlyifprevsuspended type omfwd target 192.168.1.3:514 protocol udp expr $severity == 'error' and $msg contains 'Link 2' server 192.168.1.3 from someone@example.net to ops@example.net # words with spaces need to go between quotes, with the # usual escaping in place subject "###error \"detected\"###"