heartbeat-client 0.2.5 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/hbc +1 -1
  3. data/lib/heartbeat-client.rb +2 -11
  4. metadata +5 -5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.3.0
data/bin/hbc CHANGED
@@ -20,7 +20,7 @@ end
20
20
  if ARGV and ARGV.size == 1
21
21
  Daemons.run_proc('heartbeat-client.rb') do
22
22
  loop do
23
- Heartbeat.create(@config['apikey'], @config['name'])
23
+ Heartbeat.create(@config['apikey'], @config['endpoint'], @config['name'])
24
24
  sleep(30)
25
25
  end
26
26
  end
@@ -5,7 +5,6 @@ require 'logger'
5
5
 
6
6
  class Heartbeat
7
7
  include HTTParty
8
- base_uri 'http://heartbeat-server.herokuapp.com'
9
8
 
10
9
  def self.is_mac?
11
10
  RUBY_PLATFORM.downcase.include?("darwin")
@@ -19,7 +18,7 @@ class Heartbeat
19
18
  Logger.new('/tmp/heartbeat.log')
20
19
  end
21
20
 
22
- def self.create(apikey, name = nil)
21
+ def self.create(apikey, endpoint, name = nil)
23
22
  procs = {'total' => 0, 'running' => 0, 'stuck' => 0, 'sleeping' => 0, 'threads' => 0, 'stopped' => 0, 'zombie' => 0}
24
23
  load_avg = []
25
24
  cpu_usage = {'user' => 0, 'sys' => 0, 'idle' => 0}
@@ -89,15 +88,7 @@ class Heartbeat
89
88
  }
90
89
  }
91
90
 
92
- #puts procs.inspect
93
- #puts load_avg.inspect
94
- #puts cpu_usage.inspect
95
- #puts processes.inspect
96
- #puts memory.inspect
97
- #puts disks.inspect
98
- #puts swap.inspect
99
-
100
- Heartbeat.post('/heartbeat', options)
91
+ Heartbeat.post(endpoint + '/heartbeat', options)
101
92
  else
102
93
  put "No top output found."
103
94
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heartbeat-client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 5
10
- version: 0.2.5
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Oliver Kiessler
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-10 00:00:00 Z
18
+ date: 2012-01-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement