You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,45 @@ for read from file
39
39
40
40
```
41
41
42
+
#### Logging to multiple remote servers
43
+
44
+
The `remote_servers` parameter can be used to set up logging to multiple remote servers which are supplied as a list of key value pairs for each remote. There is an example configuration provided in `./test/multiple_hosts.pp`
45
+
46
+
Using the `remote_servers` parameter over-rides the other remote sever parameters, and they will not be used in the client configuration file:
47
+
*`log_remote`
48
+
*`remote_type`
49
+
*`server`
50
+
*`port`
51
+
52
+
The following example sets up three remote logging hosts for the client:
53
+
54
+
```puppet
55
+
class{'rsyslog::client':
56
+
remote_servers => [
57
+
{
58
+
host => 'logs.example.org',
59
+
},
60
+
{
61
+
port => '55514',
62
+
},
63
+
{
64
+
host => 'logs.somewhere.com',
65
+
port => '555',
66
+
pattern => '*.log',
67
+
protocol => 'tcp',
68
+
format => 'RFC3164fmt',
69
+
},
70
+
]
71
+
}
72
+
```
73
+
74
+
Each host has the following parameters:
75
+
**host*: Sets the address or hostname of the remote logging server. Defaults to `localhost`
76
+
**port*: Sets the port the host is listening on. Defaults to `514`
77
+
**pattern*: Sets the pattern to match logs. Defaults to `*.*`
78
+
**protocol*: Sets the protocol. Only recognises TCP and UDP. Defaults to UDP
79
+
**format*: Sets the log format. Defaults to not specifying log format, which defaults to the format set by `ActionFileDefaultTemplate` in the client configuration.
80
+
42
81
#### Logging to a MySQL or PostgreSQL database
43
82
44
83
Events can also be logged to a MySQL or PostgreSQL database. The database needs to be deployed separately, either locally or remotely. Schema are available from the `rsyslog` source:
@@ -91,6 +130,7 @@ The following lists all the class parameters this module accepts.
91
130
high_precision_timestamps true,false Whether or not to use high precision timestamps.
92
131
preserve_fqdn true,false Whether or not to preserve the fully qualified domain name when logging.
93
132
actionfiletemplate STRING If set this defines the `ActionFileDefaultTemplate` which sets the default logging format for remote and local logging..
133
+
remote_servers HASH Provides a hash of multiple remote logging servers. Check documentation.
94
134
95
135
RSYSLOG::CLIENT CLASS PARAMETERS VALUES DESCRIPTION
0 commit comments