summaryrefslogtreecommitdiffstats
path: root/doc/rsyslog_confgraph_complex.conf
blob: 3d7ec0a34f05dd2e6928880935c47d98c0bc941c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
$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