bipbip 0.1.7 → 0.1.8
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.
- checksums.yaml +4 -4
- data/bin/bipbip +6 -1
- data/lib/bipbip/plugin.rb +5 -2
- data/lib/bipbip/plugin/memcached.rb +0 -1
- data/lib/bipbip/plugin/mysql.rb +0 -5
- data/lib/bipbip/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be410950c2cb80e2126f07941b715fd18575fa75
|
4
|
+
data.tar.gz: 0aefeb62c1a3e36757f94bebabde6e24db02dd26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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.
|
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
|
data/lib/bipbip/plugin/mysql.rb
CHANGED
@@ -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'},
|
data/lib/bipbip/version.rb
CHANGED
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.
|
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
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: copperegg
|