graphiterb 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/api_call_monitor.rb +4 -8
- data/bin/file_monitor.rb +2 -2
- data/graphiterb.gemspec +1 -1
- data/lib/graphiterb/graphite_sender.rb +1 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/bin/api_call_monitor.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
$: << File.dirname(__FILE__)+'/../lib/'
|
3
|
-
require '
|
4
|
-
require '
|
3
|
+
require 'graphiterb'
|
4
|
+
require 'graphiterb/graphite_script'
|
5
5
|
|
6
6
|
WC_EXEC = '/usr/bin/wc'
|
7
7
|
|
8
8
|
class ApiCallMonitor < Graphiterb::GraphiteLogger
|
9
|
-
API_CALLS_TO_MONITOR = %w
|
10
|
-
ERROR_CODES_TO_MONITOR = %w
|
9
|
+
API_CALLS_TO_MONITOR = %w[trstrank wordbag influence conversation]
|
10
|
+
ERROR_CODES_TO_MONITOR = %w[4.. 5..]
|
11
11
|
|
12
12
|
def initialize *args
|
13
13
|
super *args
|
@@ -32,10 +32,6 @@ class ApiCallMonitor < Graphiterb::GraphiteLogger
|
|
32
32
|
[0, rate].max
|
33
33
|
end
|
34
34
|
|
35
|
-
def hostname
|
36
|
-
@hostname ||= `hostname`.chomp.gsub(".","_")
|
37
|
-
end
|
38
|
-
|
39
35
|
def get_metrics metrics, iter, since
|
40
36
|
API_CALLS_TO_MONITOR.each do |api|
|
41
37
|
calls(api)
|
data/bin/file_monitor.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
$: << File.dirname(__FILE__)+'/../lib/'
|
3
|
-
require '
|
3
|
+
require 'graphiterb'
|
4
4
|
Settings.define :work_dir, :description => "Base directory where scrapers store files. (Ex: /data/ripd/com.tw)", :required => true
|
5
|
-
require '
|
5
|
+
require 'graphiterb/graphite_script'
|
6
6
|
|
7
7
|
#
|
8
8
|
# Usage:
|
data/graphiterb.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphiterb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Philip (flip) Kromer (@mrflip)
|