arvicco-avalon 0.0.25 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -59,7 +59,7 @@ Monitor script is periodically polling the mining units and other types of objec
59
59
  :monitor:
60
60
  :verbose: true
61
61
  :timeout: 30
62
- :per_hour: true # If true, getworks, rejects... metrics will be displayed PER HOUR
62
+ :per_hour: true # If true, getworks, rejects... metrics will be displayed PER HOUR
63
63
  :nodes:
64
64
  - [btcguild, stratum.btcguild.com, apikey] # ping url, your API key
65
65
  - [miner, 192.168.1.151, 70, jbond_151] # type, ip, gh/s, pool_name(optional)
@@ -25,8 +25,10 @@ module Avalon
25
25
  if reply.success? && !(reply.body =~ /too many API requests/)
26
26
  JSON.parse(reply.body, :symbolize_names => true)
27
27
  else
28
- {}
28
+ {}
29
29
  end
30
+ rescue Faraday::Error::TimeoutError
31
+ {}
30
32
  end
31
33
 
32
34
  def poll verbose=true
data/lib/avalon/miner.rb CHANGED
@@ -132,14 +132,16 @@ module Avalon
132
132
  @last_restart = restart_time
133
133
  self[:rst] = (self[:rst] || 0) + 1
134
134
  alarm "Miner #{num} restarted", :restart
135
+ elsif unit_hash == 0 && last == 'never' && temp == 0
136
+ alarm "Miner #{num} is stuck in error state!!!", :failure
135
137
  elsif upminutes > 5 # Miner settled down
136
138
  if unit_hash < @min_mhs
137
139
  alarm "Miner #{num} performance is #{unit_hash}, should be #{@min_mhs}", :perf_low
138
140
  elsif last == 'never' || last > @config[:alert_last_share]
139
141
  alarm "Miner #{num} last shares was #{last} min ago", :last_share
140
- elsif temp >= @config[:alert_temp_high]
142
+ elsif temp && temp >= @config[:alert_temp_high]
141
143
  alarm "Miner #{num} too hot at #{temp}°C, needs cooling", :temp_high
142
- elsif self[:freq] && temp <= @config[:alert_temp_low]
144
+ elsif self[:freq] && temp && temp <= @config[:alert_temp_low]
143
145
  alarm "Miner #{num} temp low at #{temp}°C, is it hashing at all?", :temp_low
144
146
  end
145
147
  end
@@ -1,3 +1,3 @@
1
1
  module Avalon
2
- VERSION = "0.0.25"
2
+ VERSION = "0.0.26"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvicco-avalon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-02 00:00:00.000000000 Z
12
+ date: 2013-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday