remote_syslog 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +12 -0
- data/examples/log_files.yml.example.advanced +2 -2
- data/examples/remote_syslog.upstart.conf +7 -0
- data/lib/remote_syslog.rb +1 -1
- data/lib/remote_syslog/tls_endpoint.rb +4 -0
- data/remote_syslog.gemspec +3 -2
- metadata +4 -3
data/README.md
CHANGED
@@ -121,6 +121,7 @@ Provide `--hostname somehostname` or use the `hostname` configuration option:
|
|
121
121
|
|
122
122
|
hostname: somehostname
|
123
123
|
|
124
|
+
|
124
125
|
### Verify server certificate
|
125
126
|
|
126
127
|
Provide the public key for the remote host when using TLS:
|
@@ -136,6 +137,17 @@ Provide a client certificate when connecting via TLS:
|
|
136
137
|
ssl_client_private_key: syslog_client.key
|
137
138
|
|
138
139
|
|
140
|
+
### Detecting new files
|
141
|
+
|
142
|
+
All input files (filenames or globs) are re-checked for new files every 60
|
143
|
+
seconds. Ruby's `Dir.glob` is used.
|
144
|
+
|
145
|
+
This means that files may be added and removed as long as they match a glob
|
146
|
+
path provided to `remote_syslog`. Also, explicitly-provided filenames need
|
147
|
+
not exist when `remote_syslog` is started. `remote_syslog` can be preconfigured
|
148
|
+
to monitor log files which are created later (or may never be created).
|
149
|
+
|
150
|
+
|
139
151
|
### Multiple instances
|
140
152
|
|
141
153
|
Run multiple instances to support more than one message-specific file format
|
@@ -1,5 +1,5 @@
|
|
1
|
-
# see README - demonstrates all optional arguments
|
2
|
-
files: [/var/log/httpd/access_log, /opt/misc
|
1
|
+
# see README - demonstrates all optional arguments and file glob formats
|
2
|
+
files: [/var/log/httpd/access_log, /opt/misc/*, /some/daemon/**/*.log]
|
3
3
|
hostname: www42 # override OS hostname
|
4
4
|
parse_fields: syslog # predefined regex name or double-quoted regex
|
5
5
|
destination:
|
data/lib/remote_syslog.rb
CHANGED
@@ -34,6 +34,7 @@ module RemoteSyslog
|
|
34
34
|
@port = port.to_i
|
35
35
|
@client_cert_chain = options[:client_cert_chain]
|
36
36
|
@client_private_key = options[:client_private_key]
|
37
|
+
@queue_limit = options[:queue_limit] || 10_000
|
37
38
|
|
38
39
|
if options[:server_cert]
|
39
40
|
@server_cert = OpenSSL::X509::Certificate.new(File.read(options[:server_cert]))
|
@@ -79,6 +80,9 @@ module RemoteSyslog
|
|
79
80
|
@connection.send_data(value + "\n")
|
80
81
|
else
|
81
82
|
(@queue ||= []) << value
|
83
|
+
|
84
|
+
# Make sure our queue does not get to be too big
|
85
|
+
@queue.shift if @queue.length > @queue_limit
|
82
86
|
end
|
83
87
|
end
|
84
88
|
end
|
data/remote_syslog.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
|
|
8
8
|
## If your rubyforge_project name is different, then edit it and comment out
|
9
9
|
## the sub! line in the Rakefile
|
10
10
|
s.name = 'remote_syslog'
|
11
|
-
s.version = '1.5.
|
12
|
-
s.date = '
|
11
|
+
s.version = '1.5.1'
|
12
|
+
s.date = '2012-01-23'
|
13
13
|
s.rubyforge_project = 'remote_syslog'
|
14
14
|
|
15
15
|
## Make sure your summary is short. The description may be as long
|
@@ -64,6 +64,7 @@ Gem::Specification.new do |s|
|
|
64
64
|
examples/log_files.yml.example.advanced
|
65
65
|
examples/remote_syslog.init.d
|
66
66
|
examples/remote_syslog.supervisor.conf
|
67
|
+
examples/remote_syslog.upstart.conf
|
67
68
|
lib/remote_syslog.rb
|
68
69
|
lib/remote_syslog/cli.rb
|
69
70
|
lib/remote_syslog/reader.rb
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 5
|
8
|
-
-
|
9
|
-
version: 1.5.
|
8
|
+
- 1
|
9
|
+
version: 1.5.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Troy Davis
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-01-23 00:00:00 -08:00
|
19
19
|
default_executable: remote_syslog
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- examples/log_files.yml.example.advanced
|
104
104
|
- examples/remote_syslog.init.d
|
105
105
|
- examples/remote_syslog.supervisor.conf
|
106
|
+
- examples/remote_syslog.upstart.conf
|
106
107
|
- lib/remote_syslog.rb
|
107
108
|
- lib/remote_syslog/cli.rb
|
108
109
|
- lib/remote_syslog/reader.rb
|