bipbip 0.1.7 → 0.1.8

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: 7a5332cce26bfdbf6b2e6880e02129bdcd0fa34c
4
- data.tar.gz: edcfa4f6e5cb6d96744617c56c54cad2b22c0b00
3
+ metadata.gz: be410950c2cb80e2126f07941b715fd18575fa75
4
+ data.tar.gz: 0aefeb62c1a3e36757f94bebabde6e24db02dd26
5
5
  SHA512:
6
- metadata.gz: 4fe7cf1aafa3a22dedc8b66b39756c80e2cdeb9e926e2f41acf18812246864f07fa52e8b79f9372c6c3ebd81ba926a2dd125384fb397349b25d7ba975b8587d1
7
- data.tar.gz: d90955b7443b93541c4df8a25386e2f9e37679f35e753a9e96ebfce2c2dc984e9706608212d44789b75677447a301262fe15a73e6803e2e9ec250628ac33db25
6
+ metadata.gz: 67e79462c607e8e4ec0af06edbb11943a9a634140eda4e75a0543d5422a0a23d453716f9e2afdcb541857d0598000552a725918b847b21c4447c8ff041dbb3c3
7
+ data.tar.gz: ba4519c2bf55c327a428ac9c3726252cfbedbdefb3bdbd3395866380eed13a5c19da1fe4213fc4cce37fc17badd6a80f06b168a50b62965033173523bf5b09a8
data/bin/bipbip CHANGED
@@ -39,4 +39,9 @@ rescue OptionParser::InvalidOption, OptionParser::MissingArgument
39
39
  exit
40
40
  end
41
41
 
42
- Bipbip::Agent.new(options[:config]).run
42
+ begin
43
+ Bipbip::Agent.new(options[:config]).run
44
+ rescue => e
45
+ Bipbip.logger.fatal e.message + "\n" + e.backtrace.map{|s| "\t#{s}"}.join("\n")
46
+ exit 1
47
+ end
data/lib/bipbip/plugin.rb CHANGED
@@ -18,14 +18,17 @@ module Bipbip
18
18
  begin
19
19
  until interrupted? do
20
20
  time = Time.now
21
- data = monitor(server)
21
+ data = monitor(server).to_h
22
+ if data.empty?
23
+ raise "#{name} #{metric_identifier}: Empty data"
24
+ end
22
25
  Bipbip.logger.debug "#{name} #{metric_identifier}: Data: #{data}"
23
26
  CopperEgg::MetricSample.save(name, metric_identifier, Time.now.to_i, data)
24
27
  retry_delay = frequency
25
28
  interruptible_sleep (frequency - (Time.now - time))
26
29
  end
27
30
  rescue => e
28
- Bipbip.logger.error "#{name} #{metric_identifier}: Error getting data: #{e.inspect}"
31
+ Bipbip.logger.error "#{name} #{metric_identifier}: Error getting data: #{e.message}"
29
32
  interruptible_sleep retry_delay
30
33
  retry_delay += frequency if retry_delay < frequency * 10
31
34
  retry
@@ -11,7 +11,6 @@ module Bipbip
11
11
  {:name => 'cmd_get', :type => 'ce_counter'},
12
12
  {:name => 'cmd_set', :type => 'ce_counter'},
13
13
  {:name => 'get_misses', :type => 'ce_counter'},
14
- {:name => 'limit_maxbytes', :type => 'ce_gauge', :unit => 'b'},
15
14
  {:name => 'bytes', :type => 'ce_gauge', :unit => 'b'},
16
15
  ]
17
16
  end
@@ -6,7 +6,6 @@ module Bipbip
6
6
 
7
7
  def metrics_schema
8
8
  [
9
- {:name => 'max_connections', :type => 'ce_gauge', :unit => 'Connections'},
10
9
  {:name => 'Max_used_connections', :type => 'ce_gauge', :unit => 'Connections'},
11
10
  {:name => 'Connections', :type => 'ce_counter', :unit => 'Connections'},
12
11
  {:name => 'Threads_connected', :type => 'ce_gauge', :unit => 'Threads'},
@@ -18,15 +17,11 @@ module Bipbip
18
17
  {:name => 'Queries', :type => 'ce_counter', :unit => 'Queries'},
19
18
  {:name => 'Slow_queries', :type => 'ce_counter', :unit => 'Queries'},
20
19
 
21
- {:name => 'Bytes_received', :type => 'ce_counter', :unit => 'b'},
22
- {:name => 'Bytes_sent', :type => 'ce_counter', :unit => 'b'},
23
-
24
20
  {:name => 'Table_locks_immediate', :type => 'ce_counter', :unit => 'Locks'},
25
21
  {:name => 'Table_locks_waited', :type => 'ce_counter', :unit => 'Locks'},
26
22
 
27
23
  {:name => 'Processlist', :type => 'ce_gauge', :unit => 'Processes'},
28
24
  {:name => 'Processlist_Locked', :type => 'ce_gauge', :unit => 'Processes'},
29
- {:name => 'Processlist_Sending_data', :type => 'ce_gauge', :unit => 'Processes'},
30
25
 
31
26
  {:name => 'Com_select', :type => 'ce_counter', :unit => 'Commands'},
32
27
  {:name => 'Com_delete', :type => 'ce_counter', :unit => 'Commands'},
@@ -1,3 +1,3 @@
1
1
  module Bipbip
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bipbip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cargo Media
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-11 00:00:00.000000000 Z
11
+ date: 2013-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: copperegg