wavefront-cli 4.2.1 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -0
- data/.rubocop.yml +1 -14
- data/.travis.yml +4 -4
- data/Gemfile +2 -0
- data/HISTORY.md +82 -60
- data/Rakefile +2 -0
- data/bin/wf +1 -0
- data/lib/wavefront-cli/alert.rb +13 -5
- data/lib/wavefront-cli/apitoken.rb +2 -0
- data/lib/wavefront-cli/base.rb +95 -47
- data/lib/wavefront-cli/cloudintegration.rb +6 -0
- data/lib/wavefront-cli/command_mixins/acl.rb +6 -1
- data/lib/wavefront-cli/command_mixins/tag.rb +2 -0
- data/lib/wavefront-cli/commands/.rubocop.yml +3 -4
- data/lib/wavefront-cli/commands/alert.rb +2 -1
- data/lib/wavefront-cli/commands/apitoken.rb +6 -0
- data/lib/wavefront-cli/commands/base.rb +30 -21
- data/lib/wavefront-cli/commands/cloudintegration.rb +2 -0
- data/lib/wavefront-cli/commands/config.rb +2 -0
- data/lib/wavefront-cli/commands/dashboard.rb +2 -0
- data/lib/wavefront-cli/commands/derivedmetric.rb +2 -0
- data/lib/wavefront-cli/commands/event.rb +3 -1
- data/lib/wavefront-cli/commands/integration.rb +2 -1
- data/lib/wavefront-cli/commands/link.rb +2 -0
- data/lib/wavefront-cli/commands/message.rb +2 -0
- data/lib/wavefront-cli/commands/metric.rb +2 -0
- data/lib/wavefront-cli/commands/notificant.rb +2 -0
- data/lib/wavefront-cli/commands/proxy.rb +2 -0
- data/lib/wavefront-cli/commands/query.rb +2 -0
- data/lib/wavefront-cli/commands/savedsearch.rb +2 -0
- data/lib/wavefront-cli/commands/serviceaccount.rb +58 -0
- data/lib/wavefront-cli/commands/settings.rb +2 -0
- data/lib/wavefront-cli/commands/source.rb +3 -1
- data/lib/wavefront-cli/commands/user.rb +4 -1
- data/lib/wavefront-cli/commands/usergroup.rb +3 -0
- data/lib/wavefront-cli/commands/webhook.rb +2 -0
- data/lib/wavefront-cli/commands/window.rb +2 -0
- data/lib/wavefront-cli/commands/write.rb +2 -0
- data/lib/wavefront-cli/config.rb +23 -12
- data/lib/wavefront-cli/constants.rb +10 -4
- data/lib/wavefront-cli/controller.rb +53 -22
- data/lib/wavefront-cli/dashboard.rb +3 -0
- data/lib/wavefront-cli/derivedmetric.rb +12 -11
- data/lib/wavefront-cli/display/alert.rb +7 -4
- data/lib/wavefront-cli/display/apitoken.rb +2 -0
- data/lib/wavefront-cli/display/base.rb +34 -8
- data/lib/wavefront-cli/display/cloudintegration.rb +4 -2
- data/lib/wavefront-cli/display/dashboard.rb +2 -0
- data/lib/wavefront-cli/display/derivedmetric.rb +2 -0
- data/lib/wavefront-cli/display/distribution.rb +2 -0
- data/lib/wavefront-cli/display/event.rb +2 -0
- data/lib/wavefront-cli/display/externallink.rb +2 -0
- data/lib/wavefront-cli/display/integration.rb +2 -0
- data/lib/wavefront-cli/display/maintenancewindow.rb +2 -0
- data/lib/wavefront-cli/display/message.rb +7 -3
- data/lib/wavefront-cli/display/metric.rb +3 -1
- data/lib/wavefront-cli/display/notificant.rb +3 -1
- data/lib/wavefront-cli/display/printer/long.rb +36 -11
- data/lib/wavefront-cli/display/printer/sparkline.rb +3 -0
- data/lib/wavefront-cli/display/printer/terse.rb +6 -1
- data/lib/wavefront-cli/display/proxy.rb +2 -0
- data/lib/wavefront-cli/display/query.rb +35 -24
- data/lib/wavefront-cli/display/savedsearch.rb +2 -0
- data/lib/wavefront-cli/display/serviceaccount.rb +60 -0
- data/lib/wavefront-cli/display/settings.rb +2 -0
- data/lib/wavefront-cli/display/source.rb +18 -4
- data/lib/wavefront-cli/display/user.rb +56 -10
- data/lib/wavefront-cli/display/usergroup.rb +25 -19
- data/lib/wavefront-cli/display/webhook.rb +2 -0
- data/lib/wavefront-cli/display/write.rb +6 -2
- data/lib/wavefront-cli/event.rb +83 -62
- data/lib/wavefront-cli/exception.rb +3 -0
- data/lib/wavefront-cli/externallink.rb +6 -4
- data/lib/wavefront-cli/integration.rb +2 -0
- data/lib/wavefront-cli/maintenancewindow.rb +28 -17
- data/lib/wavefront-cli/message.rb +4 -0
- data/lib/wavefront-cli/metric.rb +4 -1
- data/lib/wavefront-cli/notificant.rb +2 -0
- data/lib/wavefront-cli/opt_handler.rb +2 -0
- data/lib/wavefront-cli/output/base.rb +8 -3
- data/lib/wavefront-cli/output/csv.rb +2 -0
- data/lib/wavefront-cli/output/csv/base.rb +2 -0
- data/lib/wavefront-cli/output/csv/query.rb +14 -7
- data/lib/wavefront-cli/output/hcl.rb +2 -0
- data/lib/wavefront-cli/output/hcl/alert.rb +2 -0
- data/lib/wavefront-cli/output/hcl/base.rb +10 -4
- data/lib/wavefront-cli/output/hcl/dashboard.rb +17 -8
- data/lib/wavefront-cli/output/hcl/notificant.rb +2 -0
- data/lib/wavefront-cli/output/hcl/stdlib/array.rb +2 -0
- data/lib/wavefront-cli/output/hcl/stdlib/string.rb +2 -0
- data/lib/wavefront-cli/output/json.rb +2 -0
- data/lib/wavefront-cli/output/ruby.rb +2 -0
- data/lib/wavefront-cli/output/wavefront.rb +2 -0
- data/lib/wavefront-cli/output/wavefront/query.rb +7 -4
- data/lib/wavefront-cli/output/yaml.rb +2 -0
- data/lib/wavefront-cli/proxy.rb +15 -3
- data/lib/wavefront-cli/query.rb +14 -12
- data/lib/wavefront-cli/savedsearch.rb +2 -0
- data/lib/wavefront-cli/serviceaccount.rb +179 -0
- data/lib/wavefront-cli/settings.rb +2 -0
- data/lib/wavefront-cli/source.rb +2 -0
- data/lib/wavefront-cli/stdlib/array.rb +3 -0
- data/lib/wavefront-cli/stdlib/string.rb +17 -11
- data/lib/wavefront-cli/user.rb +10 -4
- data/lib/wavefront-cli/usergroup.rb +4 -2
- data/lib/wavefront-cli/version.rb +3 -1
- data/lib/wavefront-cli/webhook.rb +2 -0
- data/lib/wavefront-cli/write.rb +80 -46
- data/spec/.rubocop.yml +3 -16
- data/spec/constants.rb +21 -0
- data/spec/spec_helper.rb +8 -422
- data/spec/support/command_base.rb +82 -0
- data/spec/support/minitest_assertions.rb +262 -0
- data/spec/support/output_tester.rb +32 -0
- data/spec/support/supported_commands.rb +19 -0
- data/spec/test_mixins/acl.rb +169 -0
- data/spec/test_mixins/delete.rb +25 -0
- data/spec/test_mixins/deleteundelete.rb +106 -0
- data/spec/test_mixins/describe.rb +24 -0
- data/spec/test_mixins/dump.rb +43 -0
- data/spec/test_mixins/general.rb +11 -0
- data/spec/test_mixins/history.rb +35 -0
- data/spec/test_mixins/import.rb +65 -0
- data/spec/test_mixins/list.rb +29 -0
- data/spec/test_mixins/search.rb +98 -0
- data/spec/test_mixins/set.rb +47 -0
- data/spec/test_mixins/tag.rb +99 -0
- data/spec/wavefront-cli/alert_spec.rb +288 -111
- data/spec/wavefront-cli/apitoken_spec.rb +53 -24
- data/spec/wavefront-cli/base_spec.rb +9 -27
- data/spec/wavefront-cli/cloudintegration_spec.rb +65 -29
- data/spec/wavefront-cli/commands/alert_spec.rb +1 -0
- data/spec/wavefront-cli/commands/base_spec.rb +15 -13
- data/spec/wavefront-cli/commands/cloudintegration_spec.rb +1 -0
- data/spec/wavefront-cli/commands/config_spec.rb +3 -0
- data/spec/wavefront-cli/commands/dashboard_spec.rb +1 -0
- data/spec/wavefront-cli/commands/derivedmetric_spec.rb +1 -0
- data/spec/wavefront-cli/commands/event_spec.rb +1 -0
- data/spec/wavefront-cli/commands/link_spec.rb +1 -0
- data/spec/wavefront-cli/commands/message_spec.rb +1 -0
- data/spec/wavefront-cli/commands/metric_spec.rb +1 -0
- data/spec/wavefront-cli/commands/proxy_spec.rb +1 -0
- data/spec/wavefront-cli/commands/query_spec.rb +1 -0
- data/spec/wavefront-cli/commands/webhook_spec.rb +1 -0
- data/spec/wavefront-cli/commands/window_spec.rb +1 -0
- data/spec/wavefront-cli/commands/write_spec.rb +1 -0
- data/spec/wavefront-cli/config_spec.rb +25 -14
- data/spec/wavefront-cli/controller_spec.rb +13 -3
- data/spec/wavefront-cli/dashboard_spec.rb +125 -76
- data/spec/wavefront-cli/derivedmetric_spec.rb +83 -67
- data/spec/wavefront-cli/display/base_spec.rb +5 -7
- data/spec/wavefront-cli/display/printer/long_spec.rb +20 -16
- data/spec/wavefront-cli/display/printer/terse_spec.rb +5 -4
- data/spec/wavefront-cli/event_spec.rb +360 -18
- data/spec/wavefront-cli/externallink_spec.rb +92 -58
- data/spec/wavefront-cli/integration_spec.rb +129 -31
- data/spec/wavefront-cli/maintenancewindow_spec.rb +270 -32
- data/spec/wavefront-cli/message_spec.rb +73 -30
- data/spec/wavefront-cli/metric_spec.rb +60 -22
- data/spec/wavefront-cli/notificant_spec.rb +45 -32
- data/spec/wavefront-cli/opt_handler_spec.rb +4 -1
- data/spec/wavefront-cli/output/csv/query_spec.rb +21 -19
- data/spec/wavefront-cli/output/csv_spec.rb +5 -2
- data/spec/wavefront-cli/output/hcl_spec.rb +5 -2
- data/spec/wavefront-cli/output/helpers.rb +18 -0
- data/spec/wavefront-cli/output/json_spec.rb +3 -1
- data/spec/wavefront-cli/output/ruby_spec.rb +3 -1
- data/spec/wavefront-cli/output/wavefront/query_spec.rb +3 -1
- data/spec/wavefront-cli/output/wavefront_spec.rb +6 -4
- data/spec/wavefront-cli/output/yaml_spec.rb +3 -1
- data/spec/wavefront-cli/proxy_spec.rb +49 -27
- data/spec/wavefront-cli/query_spec.rb +174 -92
- data/spec/wavefront-cli/resources/responses/query.json +1 -0
- data/spec/wavefront-cli/resources/updates/alert.json +15 -0
- data/spec/wavefront-cli/resources/updates/dashboard.json +1 -0
- data/spec/wavefront-cli/savedsearch_spec.rb +35 -18
- data/spec/wavefront-cli/serviceaccount_spec.rb +399 -0
- data/spec/wavefront-cli/settings_spec.rb +42 -11
- data/spec/wavefront-cli/source_spec.rb +120 -23
- data/spec/wavefront-cli/stdlib/array_spec.rb +2 -1
- data/spec/wavefront-cli/stdlib/string_spec.rb +9 -6
- data/spec/wavefront-cli/user_spec.rb +278 -108
- data/spec/wavefront-cli/usergroup_spec.rb +152 -102
- data/spec/wavefront-cli/webhook_spec.rb +30 -15
- data/spec/wavefront-cli/write_spec.rb +25 -1
- data/wavefront-cli.gemspec +5 -3
- metadata +65 -21
- data/spec/wavefront-cli/commands/spec_helper.rb +0 -3
- data/spec/wavefront-cli/display/spec_helper.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79bb78ee1f6515f3a168acdedfa89680be010f429a33520e23a6caae252fc42f
|
4
|
+
data.tar.gz: 1e86e9eeb5ea1242443b0cf17eb1fea5c5f3a207c6895ab4102a1f705bf1a5a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01a3a13dbca2192dfb50c375d833ec73115a6c76e31e5fbb0ee42cab3a3f95ea89264e35ebabcb2f34caee642e8e91b74c664d1669d546504cd30f16d364725c
|
7
|
+
data.tar.gz: 1d076d96e1972ceb5d9de355ef1e88e6ea3e68961a911a5a2b691570a337fd8ac3d1cf7fe1d6b4b3c7bacf92ab8741becfb6cbfe4ccb223d363a037d5f219c28
|
data/.codeclimate.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,20 +1,7 @@
|
|
1
1
|
---
|
2
2
|
|
3
3
|
AllCops:
|
4
|
-
DisplayStyleGuide: true
|
5
4
|
TargetRubyVersion: 2.3
|
6
5
|
|
7
|
-
Style/FrozenStringLiteralComment:
|
8
|
-
Enabled: false
|
9
|
-
|
10
|
-
Style/FormatStringToken:
|
11
|
-
Enabled: false
|
12
|
-
|
13
6
|
Metrics/ClassLength:
|
14
|
-
|
15
|
-
|
16
|
-
Metrics/MethodLength:
|
17
|
-
Max: 13
|
18
|
-
|
19
|
-
Style/NumericLiterals:
|
20
|
-
Enabled: false
|
7
|
+
Max: 400
|
data/.travis.yml
CHANGED
@@ -2,9 +2,9 @@ language: ruby
|
|
2
2
|
cache: bundler
|
3
3
|
rvm:
|
4
4
|
- 2.3.8
|
5
|
-
- 2.4.
|
6
|
-
- 2.5.
|
7
|
-
- 2.6.
|
5
|
+
- 2.4.7
|
6
|
+
- 2.5.6
|
7
|
+
- 2.6.4
|
8
8
|
before_install: gem install bundler --no-document
|
9
9
|
deploy:
|
10
10
|
provider: rubygems
|
@@ -14,7 +14,7 @@ deploy:
|
|
14
14
|
on:
|
15
15
|
tags: true
|
16
16
|
repo: snltd/wavefront-cli
|
17
|
-
ruby: 2.6.
|
17
|
+
ruby: 2.6.4
|
18
18
|
notifications:
|
19
19
|
email: false
|
20
20
|
slack:
|
data/Gemfile
CHANGED
data/HISTORY.md
CHANGED
@@ -1,17 +1,40 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## 4.
|
4
|
-
*
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
## 4.3.0 (2019-09-30)
|
4
|
+
* Add `serviceaccount` command.
|
5
|
+
* Add `user privileges` command.
|
6
|
+
* Refactor of all tests, which exposed the following:
|
7
|
+
* Fix noops on `proxy versions`, `window ongoing` and `window
|
8
|
+
pending`.
|
9
|
+
* Fix partially broken `source list` command.
|
10
|
+
* Make `source search --cursor <source>` work properly.
|
11
|
+
* Remove duplicate `manifests` subcommand from `integrations`
|
12
|
+
command.
|
13
|
+
* Fix broken noop on `acl clear`.
|
14
|
+
* Fix `derivedmetric` and `notificant` `set` commands.
|
15
|
+
* Fix various `alert` commands when using `--noop`.
|
16
|
+
* Better handling of bad `search` input.
|
17
|
+
* Fix bug when trying to read non-existent messages.
|
18
|
+
* Fix missing quote in `usergroup delete` output.
|
19
|
+
* Fix broken `--all` in usergroup listings and searches.
|
20
|
+
* Fix `user dump`.
|
21
|
+
* Removed `user set` command, because it didn't do anything.
|
22
|
+
* Improve output of `user` and `usergroup` commands.
|
23
|
+
* Refactor of `event` command handling.
|
24
|
+
* Require 3.5.x of [the SDK](https://github.com/snltd/wavefront-sdk).
|
25
|
+
|
26
|
+
## 4.2.1 (2019-07-26)
|
27
|
+
* Remove tagging subcommands from `apitoken` command's usage info, because you
|
28
|
+
can't tag API tokens.
|
29
|
+
|
30
|
+
## 4.2.0 (2019-07-01)
|
8
31
|
* Add `-M` (`--items-only`) option to all commands. For
|
9
32
|
machine-parseable formats, this filters the API response, giving only
|
10
33
|
the `items` array, which should usually be suitable for batch
|
11
34
|
importing. This is a more sophisticated and flexible implementation of
|
12
35
|
4.1.0's `dump` subcommand.
|
13
36
|
|
14
|
-
## 4.1.0 (27
|
37
|
+
## 4.1.0 (2019-06-27)
|
15
38
|
* Add `dump` subcommand for all importable object types. Produces
|
16
39
|
JSON or YAML output.
|
17
40
|
* Allow batch importing of objects. Works with files produced by
|
@@ -19,21 +42,20 @@
|
|
19
42
|
objects. Batch imports are automatically detected by the `import`
|
20
43
|
subcommand.
|
21
44
|
|
22
|
-
## 4.0.2 (20
|
45
|
+
## 4.0.2 (2019-06-20)
|
23
46
|
* Allow importing of dashboards which have a URL but not an ID.
|
24
47
|
|
25
|
-
## 4.0.1 (18
|
48
|
+
## 4.0.1 (2019-06-18)
|
26
49
|
* `update` subcommand has been changed to `set`. (Breaking change.)
|
27
50
|
* `import` subcommand now accepts `--update` (`-u`) option, which
|
28
51
|
lets you overwrite an existing object with a JSON or YAML
|
29
52
|
description.
|
30
53
|
* Fix `tag searchpath` bug.
|
31
54
|
|
32
|
-
## 4.0.0 (18
|
33
|
-
|
55
|
+
## 4.0.0 (2019-06-18)
|
34
56
|
* Failed push to Gemfury. Does not exist.
|
35
57
|
|
36
|
-
## 3.3.0 (10
|
58
|
+
## 3.3.0 (2019-06-10)
|
37
59
|
* Support negation searches. Search for alerts with targets *not*
|
38
60
|
containing `str` with `wf alert search target!~str`.
|
39
61
|
* Add `tag pathsearch` command. Searches for tags whose hierarchical
|
@@ -45,48 +67,48 @@
|
|
45
67
|
match the search along with the matching keys. (Not values!)
|
46
68
|
Adding `-l` presents all matching objects in full.
|
47
69
|
|
48
|
-
## 3.2.3 (24
|
70
|
+
## 3.2.3 (2019-05-24)
|
49
71
|
* Don't print erroneous pagination message when using `list --all`.
|
50
72
|
* Require 3.3.2 of [the SDK](https://github.com/snltd/wavefront-sdk).
|
51
73
|
|
52
|
-
## 3.2.2 (16
|
74
|
+
## 3.2.2 (2019-05-16)
|
53
75
|
* Smarter error messages.
|
54
76
|
* Require 3.3.1 of [the SDK](https://github.com/snltd/wavefront-sdk).
|
55
77
|
|
56
|
-
## 3.2.1 (09
|
78
|
+
## 3.2.1 (2019-05-09)
|
57
79
|
* Fix for new API ACL format.
|
58
80
|
* Require 3.3.0 of [the SDK](https://github.com/snltd/wavefront-sdk).
|
59
81
|
|
60
|
-
## 3.2.0 (30
|
82
|
+
## 3.2.0 (2019-04-30)
|
61
83
|
* New `apitoken` command lets you manage your own API tokens.
|
62
84
|
* Support for alert ACLs.
|
63
85
|
* Require 3.2.0 of [the SDK](https://github.com/snltd/wavefront-sdk).
|
64
86
|
|
65
|
-
## 3.1.4 (02
|
87
|
+
## 3.1.4 (2019-05-02)
|
66
88
|
* Fix `alert import` missing tags bug.
|
67
89
|
* Allow importing of notificants.
|
68
90
|
|
69
|
-
## 3.1.3 (24
|
91
|
+
## 3.1.3 (2019-04-24)
|
70
92
|
* Fix `write distribution` bug. Points would be sent, but results
|
71
93
|
could not be displayed, causing a crash unless you used `-q`.
|
72
94
|
|
73
|
-
## 3.1.2 (06
|
95
|
+
## 3.1.2 (2019-04-06)
|
74
96
|
* Bugfix on handling of invalid config files.
|
75
97
|
* Explicitly specifying a missing config file now causes an error
|
76
98
|
whether or not credentials available from other mechanisms.
|
77
99
|
* Require 3.0.2 of [the SDK](https://github.com/snltd/wavefront-sdk).
|
78
100
|
|
79
|
-
## 3.1.1 (05
|
101
|
+
## 3.1.1 (2019-04-05)
|
80
102
|
* Usernames do not have to be e-mail addresses.
|
81
103
|
* Require 3.0.1 of [the SDK](https://github.com/snltd/wavefront-sdk).
|
82
104
|
|
83
|
-
## 3.1.0 (02
|
105
|
+
## 3.1.0 (2019-04-02)
|
84
106
|
* Add `message read` command.
|
85
107
|
|
86
|
-
## 3.0.1 (23
|
108
|
+
## 3.0.1 (2019-03-23)
|
87
109
|
* Fix `config about` bug.
|
88
110
|
|
89
|
-
## 3.0.0 (23
|
111
|
+
## 3.0.0 (2019-03-23)
|
90
112
|
* Drop support for Ruby 2.2. (Potentially breaking change.)
|
91
113
|
* Remove the (deprecated) `report` command. Send points directly to
|
92
114
|
Wavefront with `write --use api`. (Potentially breaking change.)
|
@@ -106,20 +128,20 @@
|
|
106
128
|
* New `config about` subcommand gives diagnostic info.
|
107
129
|
* Require 3.0.0 of [the SDK](https://github.com/snltd/wavefront-sdk).
|
108
130
|
|
109
|
-
## 2.18.0 (22
|
131
|
+
## 2.18.0 (2019-02-22)
|
110
132
|
* Add `usergroup` command, and extend `user` command to cover new
|
111
133
|
RBAC features.
|
112
134
|
* Require 2.5.0 of [the SDK](https://github.com/snltd/wavefront-sdk).
|
113
135
|
|
114
|
-
## 2.17.0 (19
|
136
|
+
## 2.17.0 (2019-02-19)
|
115
137
|
* Add `-O field,field` to all `list` commands. This lets you select
|
116
138
|
the fields displayed in the output.
|
117
139
|
|
118
|
-
## 2.16.2 (29
|
140
|
+
## 2.16.2 (2018-12-29)
|
119
141
|
* Fix typo in `query` help. CSV headers are produced with `-F
|
120
142
|
headers`, not `-F header`.
|
121
143
|
|
122
|
-
## 2.16.1 (29
|
144
|
+
## 2.16.1 (2018-12-29)
|
123
145
|
* Fix regression which broke query time ranges.
|
124
146
|
* Fix regression which made `--noop` silent unless `--verbose` was
|
125
147
|
also specified.
|
@@ -129,18 +151,18 @@
|
|
129
151
|
* Add much more comprehensive `--noop` tests.
|
130
152
|
* Better handling of `--noop` on commands which cannot support it.
|
131
153
|
|
132
|
-
## 2.16.0 (23
|
154
|
+
## 2.16.0 (2018-12-23)
|
133
155
|
* Add `config` command to quickly set up and manage profiles.
|
134
156
|
|
135
|
-
## 2.15.2 (21
|
157
|
+
## 2.15.2 (2018-12-21)
|
136
158
|
* Fix bug which caused an unhandled exception if CSV or Wavefront
|
137
159
|
query outputs tried to process an empty data set.
|
138
160
|
|
139
|
-
## 2.15.1 (20
|
161
|
+
## 2.15.1 (2018-12-20)
|
140
162
|
* Fix bug where `alert snoozed` and `alert firing` did the same
|
141
163
|
thing.
|
142
164
|
|
143
|
-
## 2.15.0 (18
|
165
|
+
## 2.15.0 (2018-12-18)
|
144
166
|
* Gracefully handle ctrl-c.
|
145
167
|
* Add `install` and `uninstall` subcommands to `wf alert`.
|
146
168
|
* Add `enable` and `disable` subcommands to `wf cloudintegration`.
|
@@ -149,12 +171,12 @@
|
|
149
171
|
`manifest` commands to `wf integration`.
|
150
172
|
* Require 2.2.0 of [wavefront-sdk](https://github.com/snltd/wavefront-sdk).
|
151
173
|
|
152
|
-
## 2.14.0 (15
|
174
|
+
## 2.14.0 (2018-12-15)
|
153
175
|
* Add `-n` to `dashboard`'s `list` and `queries` commands to omit
|
154
176
|
system-owned dashboards.
|
155
177
|
* Let `queries` subcommand accept an optional ID.
|
156
178
|
|
157
|
-
## 2.13.0 (11
|
179
|
+
## 2.13.0 (2018-12-11)
|
158
180
|
* Add CSV output for `query` command.
|
159
181
|
* Add multiple format outputs for all applicable `alert`
|
160
182
|
subcommands.
|
@@ -162,19 +184,19 @@
|
|
162
184
|
to quickly see which queries (and therefore timeseries) are being
|
163
185
|
used.
|
164
186
|
|
165
|
-
## 2.12.0 (26
|
187
|
+
## 2.12.0 (2018-11-26)
|
166
188
|
* Support SDK's new `unix` writer, which lets you write points to a
|
167
189
|
local Unix datagram socket. This requires `-u unix` and `-S
|
168
190
|
filename`.
|
169
191
|
|
170
|
-
## 2.11.0 (24
|
192
|
+
## 2.11.0 (2018-10-24)
|
171
193
|
* Add `proxy versions` subcommand. Lists proxies and their versions,
|
172
194
|
newest to oldest.
|
173
195
|
|
174
|
-
## 2.10.1 (22
|
196
|
+
## 2.10.1 (2018-10-22)
|
175
197
|
* Fix bug seen when listing events with `-s` AND `-L`.
|
176
198
|
|
177
|
-
## 2.10.0 (22
|
199
|
+
## 2.10.0 (2018-10-22)
|
178
200
|
* Most `list` subcommands accept `-a / --all`, and will show all
|
179
201
|
objects of the given type, with no pagination. (Exceptions are
|
180
202
|
`user`, which never paginated because the API doesn't, and
|
@@ -205,18 +227,18 @@
|
|
205
227
|
* Use a single connection when streaming data to a proxy from STDIN.
|
206
228
|
* Don't list hidden sources unless specifically asked.
|
207
229
|
|
208
|
-
## 2.9.3 (03
|
230
|
+
## 2.9.3 (2018-09-03)
|
209
231
|
* Fix a bug where indefinitely snoozed alerts broke `wf alert
|
210
232
|
snoozed`.
|
211
233
|
|
212
|
-
## 2.9.2 (22
|
234
|
+
## 2.9.2 (2018-08-22)
|
213
235
|
* Fix regression which broke the `wf` command when it ran without a
|
214
236
|
tty.
|
215
237
|
|
216
|
-
## 2.9.1 (22
|
238
|
+
## 2.9.1 (2018-08-22)
|
217
239
|
* Use 1.6.2 of [wavefront-sdk](https://github.com/snltd/wavefront-sdk).
|
218
240
|
|
219
|
-
## 2.9.0 (22
|
241
|
+
## 2.9.0 (2018-08-22)
|
220
242
|
* Create external links with new `link create` sub-command.
|
221
243
|
* Fix bug which stopped you writing points without a `.wavefront`
|
222
244
|
configuration file.
|
@@ -225,7 +247,7 @@
|
|
225
247
|
* Modify external link filters.
|
226
248
|
* Use 1.6.1 of [wavefront-sdk](https://github.com/snltd/wavefront-sdk).
|
227
249
|
|
228
|
-
## 2.8.0 (08
|
250
|
+
## 2.8.0 (2018-08-08)
|
229
251
|
* Add `wavefront` format to the `query` command. This outputs the
|
230
252
|
result of a raw or timeseries query in a format which can be fed
|
231
253
|
back into Wavefront via a proxy.
|
@@ -233,15 +255,15 @@
|
|
233
255
|
* Restructure the way different output formats are handled in a
|
234
256
|
better, more flexible way.
|
235
257
|
|
236
|
-
## 2.7.0 (04
|
258
|
+
## 2.7.0 (2018-07-04)
|
237
259
|
* Add a `-i` option to the `report` command, to send delta metrics.
|
238
260
|
* Fix delta metrics on the `write` command.
|
239
261
|
|
240
|
-
## 2.6.0 (27
|
262
|
+
## 2.6.0 (2018-06-27)
|
241
263
|
* Anything which can be imported can be imported from STDIN. The CLI
|
242
264
|
will do its best to work out if the format is YAML or JSON.
|
243
265
|
|
244
|
-
## 2.5.0 (25
|
266
|
+
## 2.5.0 (2018-06-25)
|
245
267
|
* Support [derived
|
246
268
|
metrics](https://docs.wavefront.com/derived_metrics.html).
|
247
269
|
* Remove options which were not actually supported.
|
@@ -251,7 +273,7 @@
|
|
251
273
|
* Better formatting of `query` output.
|
252
274
|
* Remove obsolete code and test files.
|
253
275
|
|
254
|
-
## 2.4.0 (10
|
276
|
+
## 2.4.0 (2017-04-10)
|
255
277
|
* Support direct data ingestion via `report` command.
|
256
278
|
* Support writing delta metrics.
|
257
279
|
* Add `-q` to silenty write data points.
|
@@ -260,56 +282,56 @@
|
|
260
282
|
Terraform
|
261
283
|
provider](https://github.com/spaceapegames/terraform-provider-wavefront).
|
262
284
|
|
263
|
-
## 2.3.1 (24
|
285
|
+
## 2.3.1 (2017-03-24)
|
264
286
|
* Fix broken handling of negative values in `write` command.
|
265
287
|
|
266
|
-
## 2.3.0 (23
|
288
|
+
## 2.3.0 (2017-02-23)
|
267
289
|
* Add query aliases.
|
268
290
|
|
269
|
-
## 2.2.0 (18
|
291
|
+
## 2.2.0 (2017-02-18)
|
270
292
|
* Add `alert firing` and `alert snoozed` subcommands.
|
271
293
|
|
272
|
-
## 2.1.6 (11
|
294
|
+
## 2.1.6 (2017-01-11)
|
273
295
|
* Correctly handle `=` characters in `update` subcommands.
|
274
296
|
|
275
|
-
## 2.1.5 (05
|
297
|
+
## 2.1.5 (2017-12-05)
|
276
298
|
* Allow the user to tag events when they are created.
|
277
299
|
|
278
|
-
## 2.1.4 (15
|
300
|
+
## 2.1.4 (2017-11-15)
|
279
301
|
* `event create` bugfix.
|
280
302
|
|
281
|
-
## 2.1.3 (31
|
303
|
+
## 2.1.3 (2017-10-31)
|
282
304
|
* Use credential mechanism from SDK instead of rolling our own.
|
283
305
|
* Fix bug which ignored supposedly supported environment variables,
|
284
306
|
and add support for more.
|
285
307
|
* Cut dead wood out of codebase.
|
286
308
|
* Eradicate build warnings.
|
287
309
|
|
288
|
-
## 2.1.2 (31
|
310
|
+
## 2.1.2 (2017-10-31)
|
289
311
|
* Fix no-op bug.
|
290
312
|
* Add BSD license.
|
291
313
|
|
292
|
-
## 2.1.1 (12
|
314
|
+
## 2.1.1 (2017-10-12)
|
293
315
|
* Fix bug in relative time specifications.
|
294
316
|
|
295
|
-
## 2.1.0 (12
|
317
|
+
## 2.1.0 (2017-10-12)
|
296
318
|
* Allow users to specify relative times, like `-10m`.
|
297
319
|
|
298
|
-
## 2.0.0 (09
|
320
|
+
## 2.0.0 (2017-10-09)
|
299
321
|
* Support viewing and managing of integrations.
|
300
322
|
* Support notificants. (AKA alert targets).
|
301
323
|
* Support new source descriptions.
|
302
324
|
* Breaking change in `source` command.
|
303
325
|
|
304
|
-
## 1.0.3 (25
|
326
|
+
## 1.0.3 (2017-08-25)
|
305
327
|
* Fix nil tag bug in terse source listing.
|
306
328
|
|
307
|
-
## 1.0.2 (04
|
329
|
+
## 1.0.2 (2017-08-04)
|
308
330
|
* Greatly improve support for maintenance windows. They can now be
|
309
331
|
extended, shrunk, and closed and created on the fly.
|
310
332
|
|
311
|
-
## 1.0.1 (31
|
333
|
+
## 1.0.1 (2017-07-31)
|
312
334
|
* Report `no data` if a query returns no data.
|
313
335
|
|
314
|
-
## 1.0.0 (28
|
336
|
+
## 1.0.0 (2017-07-28)
|
315
337
|
* First official release.
|
data/Rakefile
CHANGED
data/bin/wf
CHANGED
data/lib/wavefront-cli/alert.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'base'
|
2
4
|
require_relative 'command_mixins/tag'
|
3
5
|
require_relative 'command_mixins/acl'
|
@@ -53,7 +55,7 @@ module WavefrontCli
|
|
53
55
|
if wf.respond_to?(state)
|
54
56
|
in_state(state)
|
55
57
|
else
|
56
|
-
abort format("'
|
58
|
+
abort format("'%<state>s' is not a valid alert state.", state: state)
|
57
59
|
end
|
58
60
|
end
|
59
61
|
|
@@ -89,8 +91,12 @@ module WavefrontCli
|
|
89
91
|
def in_state(status)
|
90
92
|
options[:all] = true
|
91
93
|
ret = find_in_state(status)
|
92
|
-
|
93
|
-
|
94
|
+
|
95
|
+
exit if options[:noop]
|
96
|
+
|
97
|
+
return ret unless ret.is_a?(Wavefront::Response) && ret.empty?
|
98
|
+
|
99
|
+
ok_exit(format('No alerts are currently %<status>s.', status: status))
|
94
100
|
end
|
95
101
|
|
96
102
|
# Does the work for #in_state
|
@@ -99,7 +105,9 @@ module WavefrontCli
|
|
99
105
|
# @return Wavefront::Response
|
100
106
|
#
|
101
107
|
def find_in_state(status)
|
102
|
-
search = do_search([format('status
|
108
|
+
search = do_search([format('status=%<status>s', status: status)])
|
109
|
+
|
110
|
+
return if options[:noop]
|
103
111
|
|
104
112
|
items = search.response.items.map do |i|
|
105
113
|
{ name: i.name, id: i.id, time: state_time(i) }
|
@@ -116,6 +124,7 @@ module WavefrontCli
|
|
116
124
|
def state_time(item)
|
117
125
|
return item[:event][:startTime] if item.key?(:event)
|
118
126
|
return item[:snoozed] if item.key?(:snoozed)
|
127
|
+
|
119
128
|
nil
|
120
129
|
end
|
121
130
|
|
@@ -127,7 +136,6 @@ module WavefrontCli
|
|
127
136
|
def import_to_create(raw)
|
128
137
|
import_fields.each_with_object({}) { |k, a| a[k.to_sym] = raw[k] }
|
129
138
|
.tap do |ret|
|
130
|
-
|
131
139
|
if raw.key?(:resolveAfterMinutes)
|
132
140
|
ret[:resolveMinutes] = raw[:resolveAfterMinutes]
|
133
141
|
end
|