@@ -53,7 +53,7 @@ in a `syslog.conf`, and all syslog-style entries in `rsyslog.conf`.
5353
5454Each generated rule is composed of a hash entry:
5555
56- ```
56+ ``` ruby
5757' name' => {
5858 comment => ' Associated comment' ,
5959 selector => ' <facility>.<priority>' ,
@@ -87,7 +87,7 @@ define them in `node['fb_syslog']['rsyslog_rulesets']`. This will also
8787open up the required network ports for listening and bind them to the RuleSet.
8888Here is an example for usage, also see fb_rlog recipe for a larger example:
8989
90- ```
90+ ``` ruby
9191node.default[' fb_syslog' ][' rsyslog_rulesets' ] = {
9292 ' incoming_music' => {
9393 ' proto' => ' udp' ,
@@ -110,7 +110,7 @@ node.default['fb_syslog']['rsyslog_rulesets'] = {
110110
111111The output of the above example would yield:
112112
113- ```
113+ ``` text
114114$RuleSet incoming_music
115115# Metallica
116116:programname, isequal, "RideTheLightning" /var/log/metallica.log
@@ -139,7 +139,7 @@ The most common use for this will be if you need to open ports to pass health
139139checks that are not already opened from your ruleset.
140140Here is an example:
141141
142- ```
142+ ``` ruby
143143node.default[' fb_syslog' ][' rsyslog_nonruleset_ports' ] = {
144144 ' tcp' => [
145145 ' 514' ,
@@ -153,7 +153,7 @@ node.default['fb_syslog']['rsyslog_nonruleset_ports'] = {
153153
154154The output of the above example would yield:
155155
156- ```
156+ ``` text
157157$InputTCPServerRun 514
158158$InputTCPServerRun 5140
159159$InputUDPServerRun 514
@@ -170,7 +170,7 @@ If messages entering the syslog system contain control characters and it's
170170causing you problems, you can enable escaping of non-printable characters by
171171enabling the ` node['fb_syslog']['rsyslog_escape_cchars'] ` attribute:
172172
173- ```
173+ ``` ruby
174174node.default[' fb_syslog' ][' rsyslog_escape_cchars' ] = true
175175```
176176
@@ -179,13 +179,13 @@ If you need to have /dev/log inside chroots, you'll need to have rsyslog
179179listening to additional sockets in a directory that can be bind mounted inside
180180the chroot. Rsyslog will create any missing directory for you.
181181
182- ```
182+ ``` ruby
183183node.default[' fb_syslog' ][' rsyslog_additional_sockets' ] << ' /dev/rsyslog/log'
184184```
185185
186186The output of the above example would yield:
187187
188- ```
188+ ``` text
189189$InputUnixListenSocketCreatePath on
190190$AddUnixListenSocket /dev/rsyslog/log
191191```
@@ -198,7 +198,7 @@ If you set `node['fb_syslog']['rsyslog_upstream']`, then any facilities you add
198198to ` node['fb_syslog']['rsyslog_facilities_sent_to_remote'] ` will be sent to that
199199upstream. For example:
200200
201- ```
201+ ``` ruby
202202node.default[' fb_syslog' ][' rsyslog_facilities_sent_to_remote' ] << ' auth.*'
203203node.default[' fb_syslog' ][' rsyslog_upstream' ] << ' syslog.mydomain.com'
204204```
@@ -211,7 +211,7 @@ You will need to specify the binary to forward syslog messages to in
211211in ` node['fb_syslog']['rsyslog_facilities_sent_to_remote'] ` will be forwarded to
212212that binary. For example:
213213
214- ```
214+ ``` ruby
215215node.default[' fb_syslog' ][' rsyslog_facilities_sent_to_remote' ] << ' auth.*'
216216node.default[' fb_syslog' ][' rsyslog_use_omprog' ] = true
217217node.default[' fb_syslog' ][' rsyslog_omprog_binary' ] = ' /usr/bin/myprogram'
@@ -223,7 +223,7 @@ By default, program forwarding (omprog) will only be enabled if
223223` node['fb_syslog']['rsyslog_use_omprog_force'] ` to enable program forwarding
224224and a rsyslog server simultaneously. For example:
225225
226- ```
226+ ``` ruby
227227node.default[' fb_syslog' ][' rsyslog_use_omprog_force' ] = true
228228```
229229
@@ -250,7 +250,7 @@ to setup `/etc/sysconfig/rsyslog` (for RedHat machines) or
250250` /etc/default/rsyslog ` (for Debian or Ubuntu). In general you should use it
251251like this:
252252
253- ```
253+ ``` ruby
254254node.default[' fb_syslog' ][' sysconfig' ][' vars' ][' SYSLOGD_OPTIONS' ] =
255255 ' -c'
256256```
0 commit comments