heartbeat-client 0.2.5 → 0.3.0
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.
- data/VERSION +1 -1
- data/bin/hbc +1 -1
- data/lib/heartbeat-client.rb +2 -11
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/bin/hbc
CHANGED
data/lib/heartbeat-client.rb
CHANGED
@@ -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
|
-
|
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:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
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-
|
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
|