diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-01 15:35:14 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-01 15:35:14 +0200 |
commit | aff06b40a68eeb88fb37a0ef67ab7be1b4aaf701 (patch) | |
tree | 938bff5a72affa6c36cd9979a2d72c1c0e9b30c4 /grammar | |
parent | 4ccdf6ea624c66024bce7cbede53049b5f218fb0 (diff) | |
download | rsyslog-aff06b40a68eeb88fb37a0ef67ab7be1b4aaf701.tar.gz rsyslog-aff06b40a68eeb88fb37a0ef67ab7be1b4aaf701.tar.xz rsyslog-aff06b40a68eeb88fb37a0ef67ab7be1b4aaf701.zip |
milestone: done some more twists to the lexer
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/debian.new | 35 | ||||
-rw-r--r-- | grammar/rscript.l | 3 |
2 files changed, 32 insertions, 6 deletions
diff --git a/grammar/debian.new b/grammar/debian.new index 4d55735c..e995a2e8 100644 --- a/grammar/debian.new +++ b/grammar/debian.new @@ -9,7 +9,7 @@ ################# module( - name=imuxsock # provides support for local system logging + name="imuxsock" # provides support for local system logging ) $ModLoad imklog # provides kernel logging support (previously done by rklogd) #$ModLoad immark # provides --MARK-- message capability @@ -17,8 +17,8 @@ $ModLoad imklog # provides kernel logging support (previously done by rklogd) # provides UDP syslog reception #$ModLoad imudp #$UDPServerRun 514 -module(name=imudp) -input(type=imudp port=514) +module(name="imudp") +input(type="imudp" port="514") # provides TCP syslog reception #$ModLoad imtcp @@ -99,7 +99,7 @@ daemon.*;mail.*;\ *.=debug;*.=info;\ *.=notice;*.=warn |/dev/xconsole -global (dnscache=yes arg1="1 2" arg2 = "1 2" arg3 ="1=2\"3") +global (dnscache="yes" arg1="1 2" arg2 = "1 2" arg3 ="1=2\"3") # samples added to get full "flavor" of what we need to support... :msg, contains, "error" /var/log/somelog action(type=omfile target=/var/log/mail/log) @@ -135,3 +135,30 @@ then /dev/tty10 *.* rger # write to user (ugly...) ruleset name + +# FEDORA, a bit more complex config +# ### begin forwarding rule ### +# The statement between the begin ... end define a SINGLE forwarding +# rule. They belong together, do NOT split them. If you create multiple +# forwarding rules, duplicate the whole block! +# Remote Logging (we use TCP for reliable delivery) +# +# An on-disk queue is created for this action. If the remote host is +# down, messages are spooled to disk and sent when it is up again. +#$WorkDirectory /var/spppl/rsyslog # where to place spool files +#$ActionQueueFileName fwdRule1 # unique name prefix for spool files +#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) +#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown +#$ActionQueueType LinkedList # run asynchronously +#$ActionResumeRetryCount -1 # infinite retries if host is down +# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional +#*.* @@remote-host:514 +# ### end of the forwarding rule ### +if $msg contains "error" then + action(type="omfwd" protocol="tcp" target="10.0.0.1:514" + action.retryCount="-1" + queue.type="linkedList" queue.fileName="fwdRule" queue.maxDiskSpace="1g" + queue.saveOnShutdown="on" + ) + & action(type="omfile" target="/var/log/somelog.log") + & action(type="omuser" target="all") diff --git a/grammar/rscript.l b/grammar/rscript.l index 10ce1748..f94ad43a 100644 --- a/grammar/rscript.l +++ b/grammar/rscript.l @@ -101,11 +101,10 @@ static int preCommentState; <INOBJ>")" { printf("OBJ end\n"); BEGIN INITIAL; } -<INOBJ>[a-z][a-z0-9_]* { printf("INOBJ: name '%s'\n", yytext); +<INOBJ>[a-z][a-z0-9_\.]* { printf("INOBJ: name '%s'\n", yytext); } <INOBJ>"=" { printf("INOBJ: equals\n"); } -<INOBJ>[a-z0-9\.,_\+\-\/]* | <INOBJ>\"([^"\\]|\\['"?\\abfnrtv]|\\[0-7]{1,3})*\" { printf("INOBJ: value '%s'\n", yytext); BEGIN INOBJ; |