wavefront-cli 2.6.0 → 2.7.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.
- checksums.yaml +4 -4
- data/HISTORY.md +5 -0
- data/lib/wavefront-cli/base_write.rb +9 -3
- data/lib/wavefront-cli/commands/report.rb +6 -4
- data/lib/wavefront-cli/commands/write.rb +5 -7
- data/lib/wavefront-cli/report.rb +1 -1
- data/lib/wavefront-cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6829c82ead73104270f19e4f3c06084719720afdc64233f25683940155cef12
|
4
|
+
data.tar.gz: 40530d75b0b5ceb505a5afe9268bcb26036c92cc25114f664ba97662a5639506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 072f0f0bbd20bce99729bf3ff4e1a0a64fa34599677be8972b00c7ce48c8ac0fa88c6e0eb45f95b8f17e7e77039d1c70c4e03aff37f0354e1e587063a5ae4bbb
|
7
|
+
data.tar.gz: 88c1dcd21de080393d131c381c28d98da6624c4a866e4d84ee4694e16ff555f067df52c5993ac33599088015d8e8d70506fd1dbcd59d4095a6a7a38947c5a060
|
data/HISTORY.md
CHANGED
@@ -20,7 +20,7 @@ module WavefrontCli
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def send_point(p)
|
23
|
-
|
23
|
+
call_write(p)
|
24
24
|
rescue Wavefront::Exception::InvalidEndpoint
|
25
25
|
abort "could not speak to proxy #{options[:proxy]}:#{options[:port]}."
|
26
26
|
end
|
@@ -42,17 +42,23 @@ module WavefrontCli
|
|
42
42
|
process_line(l)
|
43
43
|
end
|
44
44
|
|
45
|
-
|
45
|
+
call_write(data)
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
+
# A wrapper which lets us send normal points or deltas
|
50
|
+
#
|
51
|
+
def call_write(data)
|
52
|
+
options[:delta] ? wf.write_delta(data) : wf.write(data)
|
53
|
+
end
|
54
|
+
|
49
55
|
# Read from standard in and stream points through an open
|
50
56
|
# socket. If the user hits ctrl-c, close the socket and exit
|
51
57
|
# politely.
|
52
58
|
#
|
53
59
|
def read_stdin
|
54
60
|
open_connection
|
55
|
-
STDIN.each_line { |l|
|
61
|
+
STDIN.each_line { |l| call_write(process_line(l.strip), false) }
|
56
62
|
close_connection
|
57
63
|
rescue SystemExit, Interrupt
|
58
64
|
puts 'ctrl-c. Exiting.'
|
@@ -8,8 +8,9 @@ class WavefrontCommandReport < WavefrontCommandBase
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def _commands
|
11
|
-
["point #{CMN} [-s time] [-H host] [-T tag...] <metric> <value>",
|
12
|
-
"file #{CMN} [-H host] [-F format] [-m metric] [-T tag...]
|
11
|
+
["point #{CMN} [-s time] [-H host] [-T tag...] [-iq] <metric> <value>",
|
12
|
+
"file #{CMN} [-H host] [-F format] [-m metric] [-T tag...] " \
|
13
|
+
'[-iq] <file>']
|
13
14
|
end
|
14
15
|
|
15
16
|
def _options
|
@@ -22,14 +23,15 @@ class WavefrontCommandReport < WavefrontCommandBase
|
|
22
23
|
'-m, --metric=STRING the metric path to which contents of ' \
|
23
24
|
'a file will be assigned. If the file contains a metric name, ' \
|
24
25
|
'the two will be dot-concatenated, with this value first',
|
26
|
+
'-i, --delta increment metric by given value',
|
25
27
|
"-q, --quiet don't report the points sent summary " \
|
26
28
|
'(unless there were errors)']
|
27
29
|
end
|
28
30
|
|
29
31
|
def postscript
|
30
32
|
'Files are whitespace separated, and fields can be defined ' \
|
31
|
-
"with the '-F' option. Use 't' for timestamp
|
32
|
-
"name
|
33
|
+
"with the '-F' option. Use 't' for timestamp, 'm' for metric " \
|
34
|
+
"name, 'v' for value, 's' for source, and 'T' for tags. Put 'T' " \
|
33
35
|
'last.'.cmd_fold(TW, 0)
|
34
36
|
end
|
35
37
|
end
|
@@ -11,9 +11,9 @@ class WavefrontCommandWrite < WavefrontCommandBase
|
|
11
11
|
['point [-DnViq] [-c file] [-P profile] [-E proxy] [-t time] ' \
|
12
12
|
'[-p port] [-H host] [-T tag...] <metric> <value>',
|
13
13
|
'file [-DnViq] [-c file] [-P profile] [-E proxy] [-H host] ' \
|
14
|
-
'[-p port] [-F format] [-m metric] [-T tag...] '
|
15
|
-
'[-r rate] <file>']
|
14
|
+
'[-p port] [-F format] [-m metric] [-T tag...] <file>']
|
16
15
|
end
|
16
|
+
|
17
17
|
def _options
|
18
18
|
['-E, --proxy=URI proxy endpoint',
|
19
19
|
'-t, --time=TIME time of data point (omit to use ' \
|
@@ -27,15 +27,13 @@ class WavefrontCommandWrite < WavefrontCommandBase
|
|
27
27
|
'the two will be dot-concatenated, with this value first',
|
28
28
|
'-i, --delta increment metric by given value',
|
29
29
|
"-q, --quiet don't report the points sent summary " \
|
30
|
-
'(unless there were errors)'
|
31
|
-
'-r, --rate=INTEGER throttle point sending to this many ' \
|
32
|
-
'points per second']
|
30
|
+
'(unless there were errors)']
|
33
31
|
end
|
34
32
|
|
35
33
|
def postscript
|
36
34
|
'Files are whitespace separated, and fields can be defined ' \
|
37
|
-
"with the '-F' option. Use 't' for timestamp
|
38
|
-
"name
|
35
|
+
"with the '-F' option. Use 't' for timestamp, 'm' for metric " \
|
36
|
+
"name, 'v' for value, 's' for source, and 'T' for tags. Put 'T' " \
|
39
37
|
'last.'.cmd_fold(TW, 0)
|
40
38
|
end
|
41
39
|
end
|
data/lib/wavefront-cli/report.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
WF_CLI_VERSION = '2.
|
1
|
+
WF_CLI_VERSION = '2.7.0'.freeze
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavefront-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Fisher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|