remote_syslog 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
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:
@@ -0,0 +1,7 @@
1
+ description "Monitor files and send to remote syslog"
2
+ start on runlevel [2345]
3
+ stop on runlevel [!2345]
4
+
5
+ pre-start exec /usr/bin/test -e /etc/log_files.yml
6
+
7
+ exec /var/lib/gems/1.8/bin/remote_syslog -D --tls
@@ -1,5 +1,5 @@
1
1
  module RemoteSyslog
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
4
4
 
5
5
  require 'remote_syslog/reader'
@@ -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
@@ -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.0'
12
- s.date = '2011-12-30'
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
- - 0
9
- version: 1.5.0
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: 2011-12-30 00:00:00 -08:00
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