hawkular-client 2.7.0 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +19 -2
  3. data/.travis/wait_for_services.rb +23 -0
  4. data/CHANGES.rdoc +11 -0
  5. data/docker-compose.yml +15 -0
  6. data/lib/hawkular/alerts/alerts_api.rb +24 -0
  7. data/lib/hawkular/base_client.rb +7 -0
  8. data/lib/hawkular/inventory/entities.rb +3 -0
  9. data/lib/hawkular/metrics/metric_api.rb +38 -3
  10. data/lib/hawkular/metrics/metrics_client.rb +3 -0
  11. data/lib/hawkular/metrics/tenant_api.rb +2 -2
  12. data/lib/hawkular/version.rb +1 -1
  13. data/spec/integration/alert-resources/alerts-test-data.json +40 -0
  14. data/spec/integration/alert-resources/events-test-data.json +78 -0
  15. data/spec/integration/alert-resources/triggers-test-data.json +66 -0
  16. data/spec/integration/alerts_spec.rb +192 -83
  17. data/spec/integration/hello-world-definitions.json +1 -2
  18. data/spec/integration/inventory_spec.rb +18 -5
  19. data/spec/integration/metric_spec.rb +201 -40
  20. data/spec/integration/operations_spec.rb +45 -1
  21. data/spec/spec_helper.rb +25 -6
  22. data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_acknowledge_an_alert.yml +205 -0
  23. data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_fetch_single_alert.yml +108 -0
  24. data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_list_alerts.yml +59 -0
  25. data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_list_alerts_for_trigger.yml +58 -0
  26. data/spec/vcr_cassettes/Alert/Alerts/{Should_list_alerts_for_unknown_trigger.yml → Templates/Should_list_alerts_for_unknown_trigger.yml} +13 -9
  27. data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_list_open_alerts.yml +59 -0
  28. data/spec/vcr_cassettes/Alert/Alerts/Templates/Should_resolve_an_alert.yml +207 -0
  29. data/spec/vcr_cassettes/Alert/Alerts/Templates/setup.yml +255 -0
  30. data/spec/vcr_cassettes/Alert/Alerts/Templates/setup_cleanup.yml +302 -0
  31. data/spec/vcr_cassettes/Alert/EndToEnd/Templates/Should_create_and_fire_a_trigger.yml +527 -0
  32. data/spec/vcr_cassettes/{Metrics/NonSecure/metrics_0_16_0/Templates/Gauge_metrics/Should_return_periods.yml → Alert/Events/Templates/Should_create_an_event.yml} +22 -18
  33. data/spec/vcr_cassettes/{Metrics/NonSecure/metrics_0_16_0/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml → Alert/Events/Templates/Should_delete_an_event.yml} +28 -24
  34. data/spec/vcr_cassettes/Alert/Events/Templates/Should_list_events.yml +91 -0
  35. data/spec/vcr_cassettes/Alert/Events/Templates/Should_list_events_using_criteria.yml +60 -0
  36. data/spec/vcr_cassettes/Alert/Events/{Should_not_list_events_using_criteria.yml → Templates/Should_not_list_events_using_criteria.yml} +14 -13
  37. data/spec/vcr_cassettes/Alert/Events/Templates/setup.yml +615 -0
  38. data/spec/vcr_cassettes/Alert/Events/Templates/setup_cleanup.yml +567 -0
  39. data/spec/vcr_cassettes/Alert/Groups/{Should_operate_a_complex_group_trigger.yml → Templates/Should_operate_a_complex_group_trigger.yml} +508 -352
  40. data/spec/vcr_cassettes/{Alerts → Alert/Templates}/Should_return_the_version.yml +10 -8
  41. data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_List_Triggers.yml +55 -0
  42. data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_List_Triggers_for_ID.yml +56 -0
  43. data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_List_Triggers_for_Tag.yml +56 -0
  44. data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_List_Triggers_for_Tags.yml +56 -0
  45. data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_bulk_load_triggers.yml +243 -0
  46. data/spec/vcr_cassettes/Alert/Triggers/{Should_create_a_basic_trigger_with_action.yml → Templates/Should_create_a_basic_trigger_with_action.yml} +107 -76
  47. data/spec/vcr_cassettes/Alert/Triggers/{Should_create_a_firing_ALL_ANY_trigger.yml → Templates/Should_create_a_firing_ALL_ANY_trigger.yml} +81 -61
  48. data/spec/vcr_cassettes/{Metrics/NonSecure/metrics_0_16_0/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml → Alert/Triggers/Templates/Should_create_an_action.yml} +32 -30
  49. data/spec/vcr_cassettes/{Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml → Alert/Triggers/Templates/Should_get_a_single_Trigger_with_conditions.yml} +29 -29
  50. data/spec/vcr_cassettes/Alert/Triggers/Templates/Should_get_a_single_metric_Trigger.yml +50 -0
  51. data/spec/vcr_cassettes/Alert/Triggers/{Should_get_the_action_definitions.yml → Templates/Should_get_the_action_definitions.yml} +46 -73
  52. data/spec/vcr_cassettes/Alert/Triggers/{Should_not_create_an_action_for_unknown_plugin.yml → Templates/Should_not_create_an_action_for_unknown_plugin.yml} +12 -8
  53. data/spec/vcr_cassettes/{Metrics/NonSecure/metrics_0_16_0/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml → Alert/Triggers/Templates/Should_not_create_an_action_for_unknown_properties.yml} +27 -26
  54. data/spec/vcr_cassettes/Alert/Triggers/Templates/setup.yml +52 -0
  55. data/spec/vcr_cassettes/{Metrics/NonSecure/metrics_0_16_0/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml → Alert/Triggers/Templates/setup_cleanup.yml} +51 -51
  56. data/spec/vcr_cassettes/Inventory/NonSecure/inventory_0_17/Templates/Should_list_metrics_of_given_metric_type.yml +29 -25
  57. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Get_metric_definition_by_id.yml +3 -3
  58. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Retrieve_metric_rate_points.yml +5 -5
  59. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_create_Availability_definition.yml +4 -4
  60. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_create_Counter_definition.yml +4 -4
  61. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_create_gauge_definition.yml +4 -4
  62. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_push_metric_data_to_existing_gauge.yml +4 -4
  63. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_update_tags_for_Availability_definition.yml +6 -6
  64. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/Should_update_tags_for_gauge_definition.yml +8 -8
  65. data/spec/vcr_cassettes/Metrics/NonSecure/ID_with_special_characters/Templates/setup_client.yml +44 -0
  66. data/spec/vcr_cassettes/Metrics/NonSecure/{metrics_0_16_0/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml → metrics_services/Templates/All_Tags_for_metrics/Should_fetch_all_metric_tags_for_metrics_definitions.yml} +159 -53
  67. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/Should_group_contiguous_values.yml +47 -6
  68. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/Should_push_metric_data_to_non-existing_Availability.yml +12 -12
  69. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Availability_metrics/setup_client.yml +44 -0
  70. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +17 -17
  71. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +23 -23
  72. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +19 -19
  73. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +12 -12
  74. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Counter_metrics/setup_client.yml +44 -0
  75. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +19 -19
  76. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +12 -12
  77. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_return_periods.yml +5 -5
  78. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory.yml +151 -5
  79. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/Should_return_platform_memory_def.yml +152 -6
  80. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Gauge_metrics/setup_client.yml +44 -0
  81. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_fetch_rate_stats_for_mixed_metric.yml +33 -33
  82. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_fetch_stats_for_mixed_metric.yml +31 -32
  83. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +108 -20
  84. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +26 -26
  85. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +27 -27
  86. data/spec/vcr_cassettes/Metrics/NonSecure/{metrics_0_16_0/Templates/Status/Should_return_the_version.yml → metrics_services/Templates/Mixed_metrics/setup_client.yml} +3 -3
  87. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/No_Tenant/Should_fail.yml +43 -4
  88. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Status/Should_return_the_version.yml +44 -3
  89. data/spec/vcr_cassettes/Metrics/NonSecure/{metrics_0_16_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml → metrics_services/Templates/String_metrics/Should_create_string_definition_using_Hash.yml} +9 -9
  90. data/spec/vcr_cassettes/Metrics/NonSecure/{metrics_0_16_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml → metrics_services/Templates/String_metrics/Should_create_string_definition_using_MetricDefinition.yml} +9 -9
  91. data/spec/vcr_cassettes/Metrics/NonSecure/{metrics_0_16_0/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml → metrics_services/Templates/String_metrics/Should_push_metric_data_to_existing_string.yml} +27 -27
  92. data/spec/vcr_cassettes/Metrics/NonSecure/{metrics_0_16_0/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml → metrics_services/Templates/String_metrics/Should_push_metric_data_to_non-existing_string.yml} +15 -15
  93. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/String_metrics/setup_client.yml +44 -0
  94. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Tags_Metrics/setup_client.yml +44 -0
  95. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/Tenants/Should_create_and_return_tenant.yml +10 -6
  96. data/spec/vcr_cassettes/Metrics/{Secure/metrics_0_16_0/Templates/Status/Should_return_the_version.yml → NonSecure/metrics_services/Templates/Tenants/setup_client.yml} +5 -5
  97. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_services/Templates/setup_client.yml +44 -0
  98. data/spec/vcr_cassettes/Metrics/Secure/metrics_services/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +80 -33
  99. data/spec/vcr_cassettes/Operation/NonSecure/Operation/Add_XA_datasource_should_be_doable.json +23 -0
  100. data/spec/vcr_cassettes/Operation/NonSecure/Operation/{Add_datasource_should_be_doable.json → Add_non-XA_datasource_should_be_doable.json} +0 -0
  101. metadata +111 -156
  102. data/spec/vcr_cassettes/Alert/Alerts/Should_acknowledge_an_alert.yml +0 -183
  103. data/spec/vcr_cassettes/Alert/Alerts/Should_fetch_single_alert.yml +0 -69
  104. data/spec/vcr_cassettes/Alert/Alerts/Should_list_alerts.yml +0 -85
  105. data/spec/vcr_cassettes/Alert/Alerts/Should_list_alerts_for_trigger.yml +0 -142
  106. data/spec/vcr_cassettes/Alert/Alerts/Should_resolve_an_alert.yml +0 -181
  107. data/spec/vcr_cassettes/Alert/Alerts/Should_resolve_an_alert2.yml +0 -49
  108. data/spec/vcr_cassettes/Alert/EndToEnd/Should_create_and_fire_a_trigger.yml +0 -1187
  109. data/spec/vcr_cassettes/Alert/Events/Should_create_an_event.yml +0 -50
  110. data/spec/vcr_cassettes/Alert/Events/Should_list_events.yml +0 -101
  111. data/spec/vcr_cassettes/Alert/Events/Should_list_events_using_criteria.yml +0 -79
  112. data/spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers.yml +0 -62
  113. data/spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_ID.yml +0 -55
  114. data/spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_Tag.yml +0 -68
  115. data/spec/vcr_cassettes/Alert/Triggers/Should_List_Triggers_for_Tags.yml +0 -68
  116. data/spec/vcr_cassettes/Alert/Triggers/Should_bulk_load_triggers.yml +0 -225
  117. data/spec/vcr_cassettes/Alert/Triggers/Should_create_an_action.yml +0 -134
  118. data/spec/vcr_cassettes/Alert/Triggers/Should_create_an_action_for_webhooks.yml +0 -220
  119. data/spec/vcr_cassettes/Alert/Triggers/Should_get_a_single_Trigger_with_conditions.yml +0 -138
  120. data/spec/vcr_cassettes/Alert/Triggers/Should_get_a_single_metric_Trigger.yml +0 -50
  121. data/spec/vcr_cassettes/Alert/Triggers/Should_not_create_an_action_for_unknown_properties.yml +0 -134
  122. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +0 -99
  123. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Availability_metrics/Should_group_contiguous_values.yml +0 -97
  124. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +0 -240
  125. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +0 -99
  126. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +0 -99
  127. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +0 -240
  128. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +0 -281
  129. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +0 -240
  130. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +0 -326
  131. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +0 -314
  132. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/No_Tenant/Should_fail.yml +0 -50
  133. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Simple/Should_be_Cool.yml +0 -48
  134. data/spec/vcr_cassettes/Metrics/NonSecure/metrics_0_16_0/Templates/Tenants/Should_create_and_return_tenant.yml +0 -99
  135. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_create_Availability_definition_using_MetricDefinition_parameter.yml +0 -99
  136. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_create_and_return_Availability_using_Hash_parameter.yml +0 -99
  137. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_group_contiguous_values.yml +0 -97
  138. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Availability_metrics/Should_update_tags_for_Availability_definition.yml +0 -240
  139. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_create_and_return_counter_using_Hash_parameter.yml +0 -99
  140. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_create_counter_definition_using_MetricDefinition_parameter.yml +0 -99
  141. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_get_metrics_as_bucketed_results.yml +0 -240
  142. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_get_metrics_with_limit_and_order.yml +0 -328
  143. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_push_metric_data_to_existing_counter.yml +0 -281
  144. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Counter_metrics/Should_push_metric_data_to_non-existing_counter.yml +0 -144
  145. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_Hash.yml +0 -99
  146. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_create_gauge_definition_using_MetricDefinition.yml +0 -99
  147. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_push_metric_data_to_existing_gauge.yml +0 -281
  148. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_push_metric_data_to_non-existing_gauge.yml +0 -144
  149. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_return_periods.yml +0 -97
  150. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Gauge_metrics/Should_update_tags_for_gauge_definition.yml +0 -240
  151. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Mixed_metrics/Should_requests_raw_data_for_multiple_metrics.yml +0 -326
  152. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Mixed_metrics/Should_send_mixed_metric_request.yml +0 -314
  153. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Mixed_metrics/Should_send_mixed_metric_request_of_a_single_type.yml +0 -285
  154. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/No_Tenant/Should_fail.yml +0 -50
  155. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Simple/Should_be_Cool.yml +0 -48
  156. data/spec/vcr_cassettes/Metrics/Secure/metrics_0_16_0/Templates/Tenants/Should_create_and_return_tenant.yml +0 -99
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/plugins/-does-not-exist
5
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/plugins/-does-not-exist
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -10,11 +10,15 @@ http_interactions:
10
10
  Accept:
11
11
  - application/json
12
12
  Accept-Encoding:
13
- - gzip, deflate
13
+ - identity
14
+ User-Agent:
15
+ - hawkular-client-ruby
16
+ Hawkular-Tenant:
17
+ - hawkular
14
18
  Content-Type:
15
19
  - application/json
16
- User-Agent:
17
- - Ruby
20
+ Host:
21
+ - localhost:8080
18
22
  response:
19
23
  status:
20
24
  code: 404
@@ -31,7 +35,7 @@ http_interactions:
31
35
  Pragma:
32
36
  - no-cache
33
37
  Date:
34
- - Mon, 14 Mar 2016 10:53:41 GMT
38
+ - Tue, 27 Sep 2016 18:17:15 GMT
35
39
  Connection:
36
40
  - keep-alive
37
41
  Content-Type:
@@ -39,8 +43,8 @@ http_interactions:
39
43
  Content-Length:
40
44
  - '54'
41
45
  body:
42
- encoding: ASCII-8BIT
46
+ encoding: UTF-8
43
47
  string: '{"errorMsg":"actionPlugin: -does-not-exist not found"}'
44
48
  http_version:
45
- recorded_at: Mon, 14 Mar 2016 10:53:41 GMT
46
- recorded_with: VCR 3.0.0
49
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
50
+ recorded_with: VCR 3.0.3
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: post
5
- uri: http://jdoe:password@localhost:8080/hawkular/metrics/availability
4
+ method: get
5
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/plugins/email
6
6
  body:
7
- encoding: UTF-8
8
- string: '{"id":"<%= id %>","dataRetention":90,"tags":{"tag":"value"}}'
7
+ encoding: US-ASCII
8
+ string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/json
@@ -14,17 +14,15 @@ http_interactions:
14
14
  User-Agent:
15
15
  - hawkular-client-ruby
16
16
  Hawkular-Tenant:
17
- - <%= vcr_test_tenant %>
17
+ - hawkular
18
18
  Content-Type:
19
19
  - application/json
20
- Content-Length:
21
- - '87'
22
20
  Host:
23
21
  - localhost:8080
24
22
  response:
25
23
  status:
26
- code: 201
27
- message: Created
24
+ code: 200
25
+ message: OK
28
26
  headers:
29
27
  Expires:
30
28
  - '0'
@@ -36,25 +34,25 @@ http_interactions:
36
34
  - WildFly/10
37
35
  Pragma:
38
36
  - no-cache
39
- Location:
40
- - http://localhost:8080/hawkular/metrics/availability/<%= id %>
41
37
  Date:
42
- - Mon, 15 Aug 2016 15:20:38 GMT
38
+ - Tue, 27 Sep 2016 18:17:15 GMT
43
39
  Connection:
44
40
  - keep-alive
41
+ Content-Type:
42
+ - application/json
45
43
  Content-Length:
46
- - '0'
44
+ - '87'
47
45
  body:
48
46
  encoding: UTF-8
49
- string: ''
47
+ string: '["cc","from","from-name","template.hawkular.url","template.html","template.plain","to"]'
50
48
  http_version:
51
- recorded_at: Mon, 15 Aug 2016 15:20:38 GMT
49
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
52
50
  - request:
53
- method: get
54
- uri: http://jdoe:password@localhost:8080/hawkular/metrics/availability/<%= id %>
51
+ method: post
52
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/actions
55
53
  body:
56
- encoding: US-ASCII
57
- string: ''
54
+ encoding: UTF-8
55
+ string: '{"actionId":"my-id3","actionPlugin":"email","properties":{"foo":"bar"}}'
58
56
  headers:
59
57
  Accept:
60
58
  - application/json
@@ -63,15 +61,17 @@ http_interactions:
63
61
  User-Agent:
64
62
  - hawkular-client-ruby
65
63
  Hawkular-Tenant:
66
- - <%= vcr_test_tenant %>
64
+ - hawkular
67
65
  Content-Type:
68
66
  - application/json
67
+ Content-Length:
68
+ - '71'
69
69
  Host:
70
70
  - localhost:8080
71
71
  response:
72
72
  status:
73
- code: 200
74
- message: OK
73
+ code: 400
74
+ message: Bad Request
75
75
  headers:
76
76
  Expires:
77
77
  - '0'
@@ -84,16 +84,17 @@ http_interactions:
84
84
  Pragma:
85
85
  - no-cache
86
86
  Date:
87
- - Mon, 15 Aug 2016 15:20:38 GMT
87
+ - Tue, 27 Sep 2016 18:17:15 GMT
88
88
  Connection:
89
89
  - keep-alive
90
90
  Content-Type:
91
91
  - application/json
92
92
  Content-Length:
93
- - '194'
93
+ - '109'
94
94
  body:
95
95
  encoding: UTF-8
96
- string: '{"id":"<%= id %>","tags":{"tag":"value"},"dataRetention":90,"type":"availability","tenantId":"<%= vcr_test_tenant %>"}'
96
+ string: '{"errorMsg":"Bad arguments: java.lang.IllegalArgumentException: Property:
97
+ foo is not valid on plugin: email"}'
97
98
  http_version:
98
- recorded_at: Mon, 15 Aug 2016 15:20:38 GMT
99
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
99
100
  recorded_with: VCR 3.0.3
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/import/all
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"triggers":[{"trigger":{"id":"my-trigger-01","tags":{"resourceId":"my-resource01","app":"MyShop"}},"conditions":[{"triggerMode":"FIRING","type":"threshold","dataId":"data-x","operator":"LT","threshold":5}],"dampenings":[{"dampeningId":"my-trigger-01-my-dampening-id"}]},{"trigger":{"id":"my-trigger-02","tags":{"resourceId":"my-resource01"}}},{"trigger":{"id":"my-trigger-03","tags":{"app":"MyShop"}}},{"trigger":{"id":"my-trigger-04","tags":{"resourceId":"my-resource01","app":"MyShop"}}},{"trigger":{"id":"my-trigger-05"}},{"trigger":{"id":"my-trigger-06","tags":{"resourceId":"my-resource01","app":"MyShop"}}}]}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - identity
14
+ User-Agent:
15
+ - hawkular-client-ruby
16
+ Hawkular-Tenant:
17
+ - hawkular
18
+ Content-Type:
19
+ - application/json
20
+ Content-Length:
21
+ - '615'
22
+ Host:
23
+ - localhost:8080
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Expires:
30
+ - '0'
31
+ Cache-Control:
32
+ - no-cache, no-store, must-revalidate
33
+ X-Powered-By:
34
+ - Undertow/1
35
+ Server:
36
+ - WildFly/10
37
+ Pragma:
38
+ - no-cache
39
+ Date:
40
+ - Tue, 27 Sep 2016 18:17:14 GMT
41
+ Connection:
42
+ - keep-alive
43
+ Content-Type:
44
+ - application/json
45
+ Content-Length:
46
+ - '2722'
47
+ body:
48
+ encoding: UTF-8
49
+ string: '{"triggers":[{"trigger":{"tenantId":"hawkular","id":"my-trigger-01","name":"defaultName","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"MEDIUM","tags":{"resourceId":"my-resource01","app":"MyShop"},"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":false,"firingMatch":"ALL","source":"_none_"},"dampenings":[{"tenantId":"hawkular","triggerId":"my-trigger-01","triggerMode":"FIRING","type":"STRICT","evalTrueSetting":1,"evalTotalSetting":1,"evalTimeSetting":0,"dampeningId":"hawkular-my-trigger-01-FIRING"}],"conditions":[{"tenantId":"hawkular","triggerId":"my-trigger-01","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":1,"conditionSetIndex":1,"conditionId":"hawkular-my-trigger-01-FIRING-1-1","dataId":"data-x","operator":"LT","threshold":5.0}]},{"trigger":{"tenantId":"hawkular","id":"my-trigger-02","name":"defaultName","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"MEDIUM","tags":{"resourceId":"my-resource01"},"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":false,"firingMatch":"ALL","source":"_none_"}},{"trigger":{"tenantId":"hawkular","id":"my-trigger-03","name":"defaultName","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"MEDIUM","tags":{"app":"MyShop"},"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":false,"firingMatch":"ALL","source":"_none_"}},{"trigger":{"tenantId":"hawkular","id":"my-trigger-04","name":"defaultName","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"MEDIUM","tags":{"resourceId":"my-resource01","app":"MyShop"},"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":false,"firingMatch":"ALL","source":"_none_"}},{"trigger":{"tenantId":"hawkular","id":"my-trigger-05","name":"defaultName","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"MEDIUM","autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":false,"firingMatch":"ALL","source":"_none_"}},{"trigger":{"tenantId":"hawkular","id":"my-trigger-06","name":"defaultName","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"MEDIUM","tags":{"resourceId":"my-resource01","app":"MyShop"},"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":false,"firingMatch":"ALL","source":"_none_"}}]}'
50
+ http_version:
51
+ recorded_at: Tue, 27 Sep 2016 18:17:14 GMT
52
+ recorded_with: VCR 3.0.3
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: post
5
- uri: http://jdoe:password@localhost:8080/hawkular/metrics/metrics/raw
4
+ method: delete
5
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/triggers/my-trigger-01
6
6
  body:
7
- encoding: UTF-8
8
- string: '{"gauges":[],"counters":[{"id":"<%= id %>","data":[{"value":1,"timestamp":1471274438046}]}],"availabilities":[]}'
7
+ encoding: US-ASCII
8
+ string: ''
9
9
  headers:
10
10
  Accept:
11
11
  - application/json
@@ -17,8 +17,6 @@ http_interactions:
17
17
  - hawkular
18
18
  Content-Type:
19
19
  - application/json
20
- Content-Length:
21
- - '139'
22
20
  Host:
23
21
  - localhost:8080
24
22
  response:
@@ -28,8 +26,6 @@ http_interactions:
28
26
  headers:
29
27
  Expires:
30
28
  - '0'
31
- Connection:
32
- - keep-alive
33
29
  Cache-Control:
34
30
  - no-cache, no-store, must-revalidate
35
31
  X-Powered-By:
@@ -38,18 +34,22 @@ http_interactions:
38
34
  - WildFly/10
39
35
  Pragma:
40
36
  - no-cache
37
+ Date:
38
+ - Tue, 27 Sep 2016 18:17:15 GMT
39
+ Connection:
40
+ - keep-alive
41
+ Content-Type:
42
+ - application/json
41
43
  Content-Length:
42
44
  - '0'
43
- Date:
44
- - Mon, 15 Aug 2016 15:20:38 GMT
45
45
  body:
46
46
  encoding: UTF-8
47
47
  string: ''
48
48
  http_version:
49
- recorded_at: Mon, 15 Aug 2016 15:20:38 GMT
49
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
50
50
  - request:
51
- method: get
52
- uri: http://jdoe:password@localhost:8080/hawkular/metrics/counters/<%= id %>/raw/
51
+ method: delete
52
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/triggers/my-trigger-02
53
53
  body:
54
54
  encoding: US-ASCII
55
55
  string: ''
@@ -82,24 +82,24 @@ http_interactions:
82
82
  Pragma:
83
83
  - no-cache
84
84
  Date:
85
- - Mon, 15 Aug 2016 15:20:38 GMT
85
+ - Tue, 27 Sep 2016 18:17:15 GMT
86
86
  Connection:
87
87
  - keep-alive
88
88
  Content-Type:
89
89
  - application/json
90
90
  Content-Length:
91
- - '39'
91
+ - '0'
92
92
  body:
93
93
  encoding: UTF-8
94
- string: '[{"timestamp":1471274438046,"value":1}]'
94
+ string: ''
95
95
  http_version:
96
- recorded_at: Mon, 15 Aug 2016 15:20:38 GMT
96
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
97
97
  - request:
98
- method: post
99
- uri: http://jdoe:password@localhost:8080/hawkular/metrics/metrics/raw
98
+ method: delete
99
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/triggers/my-trigger-03
100
100
  body:
101
- encoding: UTF-8
102
- string: '{"gauges":[],"counters":[],"availabilities":[{"id":"<%= id %>","data":[{"value":"down","timestamp":1471274438055}]}]}'
101
+ encoding: US-ASCII
102
+ string: ''
103
103
  headers:
104
104
  Accept:
105
105
  - application/json
@@ -111,8 +111,6 @@ http_interactions:
111
111
  - hawkular
112
112
  Content-Type:
113
113
  - application/json
114
- Content-Length:
115
- - '144'
116
114
  Host:
117
115
  - localhost:8080
118
116
  response:
@@ -122,8 +120,6 @@ http_interactions:
122
120
  headers:
123
121
  Expires:
124
122
  - '0'
125
- Connection:
126
- - keep-alive
127
123
  Cache-Control:
128
124
  - no-cache, no-store, must-revalidate
129
125
  X-Powered-By:
@@ -132,18 +128,22 @@ http_interactions:
132
128
  - WildFly/10
133
129
  Pragma:
134
130
  - no-cache
131
+ Date:
132
+ - Tue, 27 Sep 2016 18:17:15 GMT
133
+ Connection:
134
+ - keep-alive
135
+ Content-Type:
136
+ - application/json
135
137
  Content-Length:
136
138
  - '0'
137
- Date:
138
- - Mon, 15 Aug 2016 15:20:38 GMT
139
139
  body:
140
140
  encoding: UTF-8
141
141
  string: ''
142
142
  http_version:
143
- recorded_at: Mon, 15 Aug 2016 15:20:38 GMT
143
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
144
144
  - request:
145
- method: get
146
- uri: http://jdoe:password@localhost:8080/hawkular/metrics/availability/<%= id %>/raw/
145
+ method: delete
146
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/triggers/my-trigger-04
147
147
  body:
148
148
  encoding: US-ASCII
149
149
  string: ''
@@ -176,24 +176,24 @@ http_interactions:
176
176
  Pragma:
177
177
  - no-cache
178
178
  Date:
179
- - Mon, 15 Aug 2016 15:20:38 GMT
179
+ - Tue, 27 Sep 2016 18:17:15 GMT
180
180
  Connection:
181
181
  - keep-alive
182
182
  Content-Type:
183
183
  - application/json
184
184
  Content-Length:
185
- - '44'
185
+ - '0'
186
186
  body:
187
187
  encoding: UTF-8
188
- string: '[{"timestamp":1471274438055,"value":"down"}]'
188
+ string: ''
189
189
  http_version:
190
- recorded_at: Mon, 15 Aug 2016 15:20:38 GMT
190
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
191
191
  - request:
192
- method: post
193
- uri: http://jdoe:password@localhost:8080/hawkular/metrics/metrics/raw
192
+ method: delete
193
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/triggers/my-trigger-05
194
194
  body:
195
- encoding: UTF-8
196
- string: '{"gauges":[{"id":"<%= id %>","data":[{"value":1.1,"timestamp":1471274438065}]}],"counters":[],"availabilities":[]}'
195
+ encoding: US-ASCII
196
+ string: ''
197
197
  headers:
198
198
  Accept:
199
199
  - application/json
@@ -205,8 +205,6 @@ http_interactions:
205
205
  - hawkular
206
206
  Content-Type:
207
207
  - application/json
208
- Content-Length:
209
- - '141'
210
208
  Host:
211
209
  - localhost:8080
212
210
  response:
@@ -216,8 +214,6 @@ http_interactions:
216
214
  headers:
217
215
  Expires:
218
216
  - '0'
219
- Connection:
220
- - keep-alive
221
217
  Cache-Control:
222
218
  - no-cache, no-store, must-revalidate
223
219
  X-Powered-By:
@@ -226,18 +222,22 @@ http_interactions:
226
222
  - WildFly/10
227
223
  Pragma:
228
224
  - no-cache
225
+ Date:
226
+ - Tue, 27 Sep 2016 18:17:15 GMT
227
+ Connection:
228
+ - keep-alive
229
+ Content-Type:
230
+ - application/json
229
231
  Content-Length:
230
232
  - '0'
231
- Date:
232
- - Mon, 15 Aug 2016 15:20:38 GMT
233
233
  body:
234
234
  encoding: UTF-8
235
235
  string: ''
236
236
  http_version:
237
- recorded_at: Mon, 15 Aug 2016 15:20:38 GMT
237
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
238
238
  - request:
239
- method: get
240
- uri: http://jdoe:password@localhost:8080/hawkular/metrics/gauges/<%= id %>/raw/
239
+ method: delete
240
+ uri: http://<%= username %>:<%= password %>@localhost:8080/hawkular/alerts/triggers/my-trigger-06
241
241
  body:
242
242
  encoding: US-ASCII
243
243
  string: ''
@@ -270,16 +270,16 @@ http_interactions:
270
270
  Pragma:
271
271
  - no-cache
272
272
  Date:
273
- - Mon, 15 Aug 2016 15:20:38 GMT
273
+ - Tue, 27 Sep 2016 18:17:15 GMT
274
274
  Connection:
275
275
  - keep-alive
276
276
  Content-Type:
277
277
  - application/json
278
278
  Content-Length:
279
- - '41'
279
+ - '0'
280
280
  body:
281
281
  encoding: UTF-8
282
- string: '[{"timestamp":1471274438065,"value":1.1}]'
282
+ string: ''
283
283
  http_version:
284
- recorded_at: Mon, 15 Aug 2016 15:20:38 GMT
284
+ recorded_at: Tue, 27 Sep 2016 18:17:15 GMT
285
285
  recorded_with: VCR 3.0.3