heartbeat-client 0.2.4 → 0.2.5

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 -2
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.4
1
+ 0.2.5
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'])
23
+ Heartbeat.create(@config['apikey'], @config['name'])
24
24
  sleep(30)
25
25
  end
26
26
  end
@@ -2,7 +2,6 @@ require 'rubygems'
2
2
  gem 'httparty'
3
3
  require 'httparty'
4
4
  require 'logger'
5
- require 'pp'
6
5
 
7
6
  class Heartbeat
8
7
  include HTTParty
@@ -20,7 +19,7 @@ class Heartbeat
20
19
  Logger.new('/tmp/heartbeat.log')
21
20
  end
22
21
 
23
- def self.create(apikey)
22
+ def self.create(apikey, name = nil)
24
23
  procs = {'total' => 0, 'running' => 0, 'stuck' => 0, 'sleeping' => 0, 'threads' => 0, 'stopped' => 0, 'zombie' => 0}
25
24
  load_avg = []
26
25
  cpu_usage = {'user' => 0, 'sys' => 0, 'idle' => 0}
@@ -75,6 +74,7 @@ class Heartbeat
75
74
  :heartbeat => {
76
75
  :apikey => apikey,
77
76
  :host => `hostname`.chomp,
77
+ :name => name,
78
78
  :timestamp => Time.now.to_i,
79
79
  :values => {
80
80
  :process_stats => procs,
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: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
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-07 00:00:00 Z
18
+ date: 2012-01-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement