# Rsyslog

Parses /etc/rsyslog.conf

Author: Raphael Pinson raphael.nosp@m..pinsons@camptoc.nosp@m.amp.com

Summary

Rsyslog | Parses /etc/rsyslog.conf
Reference | This lens tries to keep as close as possible to `man 5 rsyslog.conf` where possible.
License | This file is licenced under the LGPL v2+, like the rest of Augeas.
Lens Usage | To be documented
Configuration files | This lens applies to /etc/rsyslog.conf.
Examples | The Test_Rsyslog file contains various examples and tests.
Augeas Lenses |
users | Map :omusrmsg: and a list of users, or a single *
file_tmpl | File action with a specified template
actions |
entry | An entry contains selectors and an action
prop_filter | Parses property-based filters, which start with “:” and the property name

### Reference

This lens tries to keep as close as possible to `man 5 rsyslog.conf` where possible.

### License

This file is licenced under the LGPL v2+, like the rest of Augeas.

### Lens Usage

To be documented

### Configuration files

This lens applies to /etc/rsyslog.conf. See filter.

### Examples

The Test_Rsyslog file contains various examples and tests.

### Augeas Lenses

### users

Map :omusrmsg: and a list of users, or a single *

### file_tmpl

> let file_tmpl = Syslog.file . [ label "template" . Util.del_str ";" . store Rx.word ]

File action with a specified template

### actions

> let actions = let prop_act = [ label "action" . action ] in let act_sep = del /[ \t]*\n&[ \t]*/ "\n& " in Build.opt_list prop_act act_sep

### entry

> let entry = [ label "entry" . Syslog.selectors . Syslog.sep_tab . actions . Util.eol ]

An entry contains selectors and an action

### prop_filter

> let prop_filter = let sep = Sep.comma . Util.del_opt_ws " " in let prop_name = [ Util.del_str ":" . label "property" . store Rx.word ] in let prop_oper = [ label "operation" . store /[A-Za-z!-]+/ ] in let prop_val = [ label "value" . Quote.do_dquote (store /[^\n"]*/) ] in [ label "filter" . prop_name . sep . prop_oper . sep . prop_val . Sep.space . actions . Util.eol ]

Parses property-based filters, which start with “:” and the property name

Provides unit tests and examples for the Rsyslog lens.

> let file_tmpl = Syslog.file . [ label "template" . Util.del_str ";" . store Rx.word ]

File action with a specified template

> let actions = let prop_act = [ label "action" . action ] in let act_sep = del /[ \t]*\n&[ \t]*/ "\n& " in Build.opt_list prop_act act_sep

> let entry = [ label "entry" . Syslog.selectors . Syslog.sep_tab . actions . Util.eol ]

An entry contains selectors and an action

> let prop_filter = let sep = Sep.comma . Util.del_opt_ws " " in let prop_name = [ Util.del_str ":" . label "property" . store Rx.word ] in let prop_oper = [ label "operation" . store /[A-Za-z!-]+/ ] in let prop_val = [ label "value" . Quote.do_dquote (store /[^\n"]*/) ] in [ label "filter" . prop_name . sep . prop_oper . sep . prop_val . Sep.space . actions . Util.eol ]

Parses property-based filters, which start with “:” and the property name
Close