telemetry 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +32 -4
- data/lib/telemetry/version.rb +1 -1
- data/telemetry.gemspec +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDkwNDA3NTk5YzU3MDkxZjEyMjc4MjZmODg5ZmQ4MWRmOGQwY2YyYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTk1YmU3OThkYjkwZjRhN2YwOWYxZjU1NGI1ODFjODJmM2UwODcxYQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmU2NDRjNTdiMTM5ZTE2ZWYxNDUxODZiZmVmMzFhYWIyYjgyYjI2NDA2MmIz
|
10
|
+
NTJlODlhOTU1ZWE3ZmM3MGUyNjBiZWM5OTgyZTQ0ZGZhOTA1ZmZjOTliYzQx
|
11
|
+
ZGQ5ZGMzNjQwNzljZjBlODUzMGYwMDAxOTc0ZGIxYmJhYWNlYzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDdiM2IwNDZlNmVlZGE3MjYxNzlhYTZmM2FiZGIxN2UxMWRhODFkZGNmY2Y4
|
14
|
+
ZTYwZmEwYTg4MGUwOGZmOWQwNDJhOTIwMDk5NWFhZmJmZmQyOTc5YjUzOTli
|
15
|
+
YTVhYzU3N2ViN2FlOGMxOTU3ZDE5NjI1MTkwYTI4YTgzOThlYWQ=
|
data/README.md
CHANGED
@@ -8,7 +8,28 @@ Install on your system:
|
|
8
8
|
|
9
9
|
$ gem install telemetry
|
10
10
|
|
11
|
-
## Usage
|
11
|
+
## Basic Usage
|
12
|
+
|
13
|
+
To use this gem you must require it in your file and specify your API Token that you can find on the [Telemetry API Token page](https://admin.telemetryapp.com/account/api_token)
|
14
|
+
|
15
|
+
Set a hash of values for the flow to update. Each hash must contain the tag of the flow that you want to update.
|
16
|
+
|
17
|
+
require 'telemetry'
|
18
|
+
|
19
|
+
Telemetry.token = "test-api-token"
|
20
|
+
|
21
|
+
properties = {
|
22
|
+
tag: "test-flow-value",
|
23
|
+
value: 3434
|
24
|
+
}
|
25
|
+
Telemetry::Value.new(properties).emit
|
26
|
+
|
27
|
+
For documentation on flows and the properties they support please see the [flow documentation](https://admin.telemetryapp.com/documentation/flows) pages.
|
28
|
+
|
29
|
+
|
30
|
+
## Daemon
|
31
|
+
|
32
|
+
Telemetry also supports a daemon mode where a binary (telemetryd) runs indefintely and loops through a configuration file triggering updates to the API as it goes.
|
12
33
|
|
13
34
|
Create a config file on your disk (by default /etc/telemetryd_config.rb). This file may have ruby code in it, you may include your own gems, etc. The file supports two configuration directives "interval" and "api_token". The interval is how frequently each flow block is executed with the results sent to the server. Please note if the result from a block is unchanged from the previous execution then it will be sent to the server only once per day.
|
14
35
|
|
@@ -17,9 +38,9 @@ For more details please see our website.
|
|
17
38
|
Example simple config:
|
18
39
|
|
19
40
|
interval 5
|
20
|
-
api_token "
|
41
|
+
api_token "test-api-token"
|
21
42
|
|
22
|
-
gauge "
|
43
|
+
gauge "test-flow-gauge" do
|
23
44
|
set value: 45
|
24
45
|
set max: 100
|
25
46
|
end
|
@@ -32,7 +53,14 @@ To kill the daemon:
|
|
32
53
|
|
33
54
|
$ telemetryd.rb -k
|
34
55
|
|
35
|
-
Omitting the -d will start the process in the foreground and log to stdout. This is useful for debugging your config file.
|
56
|
+
Omitting the -d will start the process in the foreground and log to stdout. This is useful for debugging your config file. The daemon can be started with -o to run once and exit.
|
57
|
+
|
58
|
+
Custom update intervals are supported on a per flow basis. To configure the update interval append an integer with the number of seconds to update as per the following:
|
59
|
+
|
60
|
+
gauge "test-flow-gauge", 86400 do
|
61
|
+
set value: 50
|
62
|
+
end
|
63
|
+
|
36
64
|
|
37
65
|
## Contributing
|
38
66
|
|
data/lib/telemetry/version.rb
CHANGED
data/telemetry.gemspec
CHANGED
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.description = %q{Telemetry Data Submission API Gem. See our website for a more detailed description.}
|
12
12
|
gem.summary = %q{Telemetry Data Submission API Gem}
|
13
13
|
gem.homepage = "http://www.telemetryapp.com"
|
14
|
+
gem.license = 'MIT'
|
14
15
|
gem.files = `git ls-files`.split($/)
|
15
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
16
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telemetry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- W. Gersham Meharg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -121,7 +121,8 @@ files:
|
|
121
121
|
- spec/spec_helper.rb
|
122
122
|
- telemetry.gemspec
|
123
123
|
homepage: http://www.telemetryapp.com
|
124
|
-
licenses:
|
124
|
+
licenses:
|
125
|
+
- MIT
|
125
126
|
metadata: {}
|
126
127
|
post_install_message:
|
127
128
|
rdoc_options: []
|