telemetry 1.0.4 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -138,7 +138,8 @@ module Telemetry
138
138
 
139
139
  # Check whether we should wait an interval before running
140
140
  if frequency > 0
141
- next if @@next_run_at[tag] && @@next_run_at[tag] <= Time.now.to_i
141
+ #puts "Frequency is #{frequency} now #{Time.now.to_i} next #{@@next_run_at[tag]}"
142
+ next if @@next_run_at[tag] && @@next_run_at[tag] >= Time.now.to_i
142
143
  @@next_run_at[tag] = Time.now.to_i + frequency.to_i
143
144
  end
144
145
 
@@ -16,6 +16,7 @@ module Telemetry
16
16
  request = Net::HTTP::Post.new(uri.path)
17
17
  request.basic_auth(Telemetry.token, "")
18
18
  request['Content-Type'] = 'application/json'
19
+ request['User-Agent'] = "telemetryd"
19
20
  request.body = body
20
21
 
21
22
  begin
@@ -1,3 +1,4 @@
1
+
1
2
  module Telemetry
2
- VERSION = "1.0.4"
3
+ VERSION = "1.0.6"
3
4
  end
data/telemetryd_config.rb CHANGED
@@ -1,35 +1,9 @@
1
- interval 5
1
+ interval 1
2
2
  api_token "130be0e02baf48892b82d41e9b7f1a19"
3
3
 
4
- gauge "test_gauge" do
4
+ value "demo_cadusd", 10 do
5
5
 
6
- # value (required) - the current value of the gauge
7
- set value: 33
8
-
9
- # range (optional) - the number of hours in the past to take the max value from
10
- # typically this is either 24 (a day) or 168 (a week)
11
- set range: 168
12
-
13
- # max (optional) - the maximum value of the gauge, exclusive of setting range
14
- set max: 100
15
-
16
- # value_color (optional) - the color for the value.
17
- set value_color: "#FF0000"
18
-
19
- # value_2 (optional) - a second value to display on the side
20
- set value_2: 33
21
-
22
- # value_2_color (optional) - the color of the second value
23
- set value_2_color: "green"
24
-
25
- # value_2_label (optional) - a text label for the value_2
26
- set value_2_label: "Errors"
6
+ set value: rand(1000)
27
7
 
28
8
  end
29
9
 
30
- upstatus "test_upstatus" do
31
-
32
-
33
-
34
-
35
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telemetry
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
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-03-05 00:00:00.000000000 Z
12
+ date: 2013-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oj