$DebugPrintTemplateList off $DebugPrintCfSysLineHandlerList off $DebugPrintModuleList off #$ResetConfigVariables $ErrorMessagesToStderr off $ModLoad /home/rger/proj/rsyslog/plugins/imuxsock/.libs/imuxsock.so #$ModLoad /home/rger/proj/rsyslog/plugins/imklog/.libs/imklog #$ModLoad /home/rger/proj/rsyslog/plugins/imtcp/.libs/imtcp $ModLoad /home/rger/proj/rsyslog/plugins/imtcp/.libs/imtcp $ModLoad /home/rger/proj/rsyslog/plugins/imudp/.libs/imudp $ModLoad /home/rger/proj/rsyslog/plugins/omstdout/.libs/omstdout $ModLoad /home/rger/proj/rsyslog/plugins/omprog/.libs/omprog $ModLoad /home/rger/proj/rsyslog/plugins/omtesting/.libs/omtesting #$ModLoad /home/rger/proj/rsyslog/plugins/ommail/.libs/ommail # # # PGSQL testing $ModLoad /home/rger/proj/rsyslog/plugins/ompgsql/.libs/ompgsql.so $template pgfmt,"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-pgsql%', '%timegenerated:::date-pgsql%', %iut%, '%syslogtag%');",STDSQL #$ActionQueueType linkedlist #*.* :ompgsql:127.0.0.1,rsyslog,postgres,;pgfmt #$ActionOMStdoutArrayInterface on #*.* :omstdout: $ActionResumeInterval 4 $ActionResumeRetryCount 3 $ActionQueueType LinkedList # run asynchronously $ActionName Forward to 172.19.3.9 *.* @@172.19.3.9:10514 #*.* :omtesting:randfail #*.* :omtesting:always_suspend #*.* :omtesting:fail 2 2 #$UDPServerTimeRequery 10 $UDPServerRun 514 $inputtcpmaxsessions 2000 $InputTCPServerRun 12514 #$PrivDropToUser rger #$InputTCPServerInputName tcp/514 #$InputTCPServerAddtlFrameDelimiter 10 #$InputTCPServerRun 514 #$AllowedSender UDP,127.0.0.1/32 #$AllowedSender TCP,127.0.0.1/32 $PreserveFQDN off #$HUPisRestart on #$MainMsgQueueType direct $MainMsgQueueType linkedlist $MainMsgQueueDequeueBatchSize 200 #$MainMsgQueueWorkerTimeoutThreadShutdown -1 #---- test DA mode # set spool locations and switch queue to disk assisted mode $WorkDirectory spool $MainMsgQueueSize 200 # this *should* trigger moving on to DA mode... # note: we must set QueueSize sufficiently high, so that 70% (light delay mark) # is high enough above HighWatermark! $MainMsgQueueHighWatermark 80 $MainMsgQueueLowWatermark 40 $MainMsgQueueFilename mainq $MainMsgQueueType linkedlist # ucomment, as we now have an issue (finally the test case works ;)) #$MainMsgQueueDequeueBatchSize 80 #---- end test DA mode #$template test,"%timereported:::date-rfc3339%,%timereported:::date-mysql%,%timereported:::date-subseconds%, %timegenerated:::date-mysql%, %timegenerated:::date-subseconds%, msg: %msg%\n" #$template db,"re: '%msg:R,ERE,1,FIELD:dsn=([0-9]+\.[0-9]+\.[0-9])--end%', msg: '%msg%'\n" #$template db,"re: '%msg:R,ERE,1,ZERO:dsn=([0-9]+\.[0-9]+\.[0-9])--end%', msg: '%msg%'\n" #$template DEBUG,"Debug line with all properties:\nFROMHOST: '%FROMHOST%', fromhost-ip: '%fromhost-ip%, HOSTNAME: '%HOSTNAME%', PRI: %PRI%,\nsyslogtag '%syslogtag%', programname: '%programname%', APP-NAME: '%APP-NAME%', PROCID: '%PROCID%', MSGID: '%MSGID%',\nTIMESTAMP: '%TIMESTAMP%', STRUCTURED-DATA: '%STRUCTURED-DATA%',\nmsg: '%msg%'\nescaped msg: '%msg:::drop-cc%'\nrawmsg: '%rawmsg%'\n\n" $template csv,"%syslogtag:::csv%,%msg:::upppercase,csv%,%msg%\n" *.* -/home/rger/proj/rsyslog/logfile kern.* -/home/rger/proj/rsyslog/logfile $ActionExecOnlyWhenPreviousIsSuspended on & -/tmp/xyz/uuu $ActionExecOnlyWhenPreviousIsSuspended off & ~ & -/tmp/xyz/uuu2 & -/tmp/xyz/uuu3 #$template dynfile,"/home/rger/proj/rsyslog/test-%syslogtag%" #*.* -?dynfile #:msg, ereregex, "test|tast" /home/rger/proj/rsyslog/ere #if strlen($syslogtag & strlen($msg)) > 10 then /home/rger/proj/rsyslog/longlog #if strlen($msg) > 10 then /home/rger/proj/rsyslog/longlog #if tolower($msg) contains 'test' then /home/rger/proj/rsyslog/longlog #if $msg contains 'test' then /home/rger/proj/rsyslog/longlog #$ActionOMProgBinary /home/rger/proj/rsyslog/consumer #*.* :omprog: #$actionresumeretryCount -1 #$actionResumeInterval 4 #$template dynfile,"/mnt2/logs/logfile.log" #*.* /mnt2/logs/logfile.log #if $msg contains 'test' then ?dynfile #*.* ?dynfile :msg, contains, "test " /tmpo/sdafsdf $ActionName write_system_log_2 if $msg == 'test' then /tmpo/sdafsdf2 & /tmpo/234234 *.* @@(o,z9)172.19.3.21:10514 $GenerateConfigGraph /home/rger/proj/rsyslog/rsyslog.dot