anschel 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70986c1daf98761ecae7d688a9cac9dca77d5245
4
- data.tar.gz: 423be3728f6d0b12816965df20cb48c3ccc77198
3
+ metadata.gz: 6af928aa0b5740475a0e6b495856a53f001f825c
4
+ data.tar.gz: d061490f6ccc051609febecc41ea1c758eb3fbb9
5
5
  SHA512:
6
- metadata.gz: 82ff4b34d365f33a3a39cc3bac477cac4c8c449ebfadb8317a15a92372bc6af858ee2715afd6329d976fa70e2f07e7c4cff14f0ccf6a14a61cefb30d1a748052
7
- data.tar.gz: db692abab264dc1ad1ccee814560071e398d81430717e2b61d76469e83754128bf0277820eadc55231e131719271d79851aa4bff51902bf7372ca40f08c1c2a2
6
+ metadata.gz: 36d3fefa095428cf5ffc92b4b2f096274a5373dace24bb15b11461c038f04c041554d353ec9bde705c33abcb18e95156e060bb739aff76e9941c1582ba0441be
7
+ data.tar.gz: 69637b4c5a381ed859470da10cc11589994aa759add98a10db6dac5d641b827643b10f3c6365472eec628f196929022dc8f7b96935d872566bcebf1d3f960b40
data/Readme.md CHANGED
@@ -33,8 +33,6 @@ Probably you're most interested in the `agent` command:
33
33
  Options:
34
34
  -c, [--config=CONFIG] # Path to primary configuration file
35
35
  # Default: /etc/anschel.json
36
- -i, [--stats-interval=N] # Interval for reporting stats (seconds)
37
- # Default: 30
38
36
  -l, [--log=LOG] # Log to file instead of STDOUT
39
37
  -v, [--debug], [--no-debug] # Enable DEBUG-level logging
40
38
  -z, [--trace], [--no-trace] # Enable TRACE-level logging (overrides DEBUG)
@@ -48,6 +46,12 @@ Probably you're most interested in the `agent` command:
48
46
  It's kinda like a JSON version of the Logstash config language:
49
47
 
50
48
  {
49
+ // If Anschel fails, state will be stored for safekeeping
50
+ "store": "/tmp/anschel.db",
51
+
52
+ // How often to report stats (in seconds)
53
+ "stats_interval": 30,
54
+
51
55
  // Anschel requires JRuby, and some libraries log via Log4j
52
56
  "log4j": {
53
57
  "path": "/path/to/anschel4j.log",
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.2
1
+ 0.6.3
data/lib/anschel/main.rb CHANGED
@@ -34,11 +34,6 @@ module Anschel
34
34
  aliases: %w[ -c ],
35
35
  desc: 'Path to primary configuration file',
36
36
  default: '/etc/anschel.json'
37
- option :stats_interval, \
38
- type: :numeric,
39
- aliases: %w[ -i ],
40
- desc: 'Interval for reporting stats (seconds)',
41
- default: 30
42
37
  include_common_options
43
38
  def agent
44
39
  log.info \
@@ -58,7 +53,7 @@ module Anschel
58
53
 
59
54
  store = Store.new config[:store], log
60
55
 
61
- stats = Stats.new log, options.stats_interval
56
+ stats = Stats.new config[:stats_interval], log
62
57
 
63
58
  filter = Filter.new config[:filter], stats, log
64
59
 
data/lib/anschel/stats.rb CHANGED
@@ -5,9 +5,9 @@ require 'logger'
5
5
  module Anschel
6
6
  class Stats
7
7
 
8
- def initialize logger, interval=60
8
+ def initialize interval, logger
9
9
  @logger = logger
10
- @interval = interval
10
+ @interval = interval || 30
11
11
  @stats = Hash.new
12
12
  @lock = Mutex.new
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anschel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Clemmer