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
@@ -1,225 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/import/all
6
- body:
7
- encoding: UTF-8
8
- string: '{"triggers":[{"trigger":{"id":"hello-world-trigger","name":"Hello World
9
- Trigger","description":"A mandatory Hello World Trigger","severity":"HIGH","enabled":true,"actions":[{"actionPlugin":"email","actionId":"notify-to-admins"}]},"conditions":[{"triggerMode":"FIRING","type":"threshold","dataId":"data-x","operator":"LT","threshold":5},{"triggerMode":"FIRING","type":"threshold","dataId":"data-y","operator":"GT","threshold":5}]}],"actions":[{"actionPlugin":"email","actionId":"notify-to-admins","properties":{"to":"admins@hawkular.org","cc":"developers@hawkular.org","description":"Notify
10
- by email to Admins with cc to Developers"}}]}'
11
- headers:
12
- Accept:
13
- - application/json
14
- Accept-Encoding:
15
- - gzip, deflate
16
- Content-Type:
17
- - application/json
18
- Content-Length:
19
- - '635'
20
- User-Agent:
21
- - Ruby
22
- response:
23
- status:
24
- code: 200
25
- message: OK
26
- headers:
27
- Expires:
28
- - '0'
29
- Cache-Control:
30
- - no-cache, no-store, must-revalidate
31
- X-Powered-By:
32
- - Undertow/1
33
- Server:
34
- - WildFly/10
35
- Pragma:
36
- - no-cache
37
- Date:
38
- - Mon, 14 Mar 2016 10:36:20 GMT
39
- Connection:
40
- - keep-alive
41
- Content-Type:
42
- - application/json
43
- Content-Length:
44
- - '1434'
45
- body:
46
- encoding: ASCII-8BIT
47
- string: '{"triggers":[{"trigger":{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","id":"hello-world-trigger","name":"Hello
48
- World Trigger","description":"A mandatory Hello World Trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","actions":[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"email","actionId":"notify-to-admins"}],"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"},"conditions":[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":1,"conditionSetIndex":1,"conditionId":"28026b36-8fe4-4332-84c8-524e173a68bf-hello-world-trigger-FIRING-1-1","dataId":"data-x","operator":"LT","threshold":5.0},{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":2,"conditionSetIndex":2,"conditionId":"28026b36-8fe4-4332-84c8-524e173a68bf-hello-world-trigger-FIRING-2-2","dataId":"data-y","operator":"GT","threshold":5.0}]}],"actions":[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"email","actionId":"notify-to-admins","properties":{"to":"admins@hawkular.org","cc":"developers@hawkular.org","description":"Notify
49
- by email to Admins with cc to Developers"}}]}'
50
- http_version:
51
- recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
52
- - request:
53
- method: get
54
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/triggers/hello-world-trigger
55
- body:
56
- encoding: US-ASCII
57
- string: ''
58
- headers:
59
- Accept:
60
- - application/json
61
- Accept-Encoding:
62
- - gzip, deflate
63
- Content-Type:
64
- - application/json
65
- User-Agent:
66
- - Ruby
67
- response:
68
- status:
69
- code: 200
70
- message: OK
71
- headers:
72
- Expires:
73
- - '0'
74
- Cache-Control:
75
- - no-cache, no-store, must-revalidate
76
- X-Powered-By:
77
- - Undertow/1
78
- Server:
79
- - WildFly/10
80
- Pragma:
81
- - no-cache
82
- Date:
83
- - Mon, 14 Mar 2016 10:36:20 GMT
84
- Connection:
85
- - keep-alive
86
- Content-Type:
87
- - application/json
88
- Content-Length:
89
- - '528'
90
- body:
91
- encoding: ASCII-8BIT
92
- string: '{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","id":"hello-world-trigger","name":"Hello
93
- World Trigger","description":"A mandatory Hello World Trigger","type":"STANDARD","eventType":"ALERT","eventCategory":null,"eventText":null,"severity":"HIGH","actions":[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"email","actionId":"notify-to-admins"}],"autoDisable":false,"autoEnable":false,"autoResolve":false,"autoResolveAlerts":true,"autoResolveMatch":"ALL","enabled":true,"firingMatch":"ALL","source":"_none_"}'
94
- http_version:
95
- recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
96
- - request:
97
- method: get
98
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/triggers/hello-world-trigger/conditions
99
- body:
100
- encoding: US-ASCII
101
- string: ''
102
- headers:
103
- Accept:
104
- - application/json
105
- Accept-Encoding:
106
- - gzip, deflate
107
- Content-Type:
108
- - application/json
109
- User-Agent:
110
- - Ruby
111
- response:
112
- status:
113
- code: 200
114
- message: OK
115
- headers:
116
- Expires:
117
- - '0'
118
- Cache-Control:
119
- - no-cache, no-store, must-revalidate
120
- X-Powered-By:
121
- - Undertow/1
122
- Server:
123
- - WildFly/10
124
- Pragma:
125
- - no-cache
126
- Date:
127
- - Mon, 14 Mar 2016 10:36:20 GMT
128
- Connection:
129
- - keep-alive
130
- Content-Type:
131
- - application/json
132
- Content-Length:
133
- - '611'
134
- body:
135
- encoding: ASCII-8BIT
136
- string: '[{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":2,"conditionSetIndex":1,"conditionId":"28026b36-8fe4-4332-84c8-524e173a68bf-hello-world-trigger-FIRING-2-1","dataId":"data-x","operator":"LT","threshold":5.0},{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","triggerId":"hello-world-trigger","triggerMode":"FIRING","type":"THRESHOLD","conditionSetSize":2,"conditionSetIndex":2,"conditionId":"28026b36-8fe4-4332-84c8-524e173a68bf-hello-world-trigger-FIRING-2-2","dataId":"data-y","operator":"GT","threshold":5.0}]'
137
- http_version:
138
- recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
139
- - request:
140
- method: get
141
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/triggers/hello-world-trigger/dampenings
142
- body:
143
- encoding: US-ASCII
144
- string: ''
145
- headers:
146
- Accept:
147
- - application/json
148
- Accept-Encoding:
149
- - gzip, deflate
150
- Content-Type:
151
- - application/json
152
- User-Agent:
153
- - Ruby
154
- response:
155
- status:
156
- code: 200
157
- message: OK
158
- headers:
159
- Expires:
160
- - '0'
161
- Cache-Control:
162
- - no-cache, no-store, must-revalidate
163
- X-Powered-By:
164
- - Undertow/1
165
- Server:
166
- - WildFly/10
167
- Pragma:
168
- - no-cache
169
- Date:
170
- - Mon, 14 Mar 2016 10:36:20 GMT
171
- Connection:
172
- - keep-alive
173
- Content-Type:
174
- - application/json
175
- Content-Length:
176
- - '2'
177
- body:
178
- encoding: ASCII-8BIT
179
- string: '[]'
180
- http_version:
181
- recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
182
- - request:
183
- method: delete
184
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/triggers/hello-world-trigger
185
- body:
186
- encoding: US-ASCII
187
- string: ''
188
- headers:
189
- Accept:
190
- - application/json
191
- Accept-Encoding:
192
- - gzip, deflate
193
- Content-Type:
194
- - application/json
195
- User-Agent:
196
- - Ruby
197
- response:
198
- status:
199
- code: 200
200
- message: OK
201
- headers:
202
- Expires:
203
- - '0'
204
- Cache-Control:
205
- - no-cache, no-store, must-revalidate
206
- X-Powered-By:
207
- - Undertow/1
208
- Server:
209
- - WildFly/10
210
- Pragma:
211
- - no-cache
212
- Date:
213
- - Mon, 14 Mar 2016 10:36:20 GMT
214
- Connection:
215
- - keep-alive
216
- Content-Type:
217
- - application/json
218
- Content-Length:
219
- - '0'
220
- body:
221
- encoding: UTF-8
222
- string: ''
223
- http_version:
224
- recorded_at: Mon, 14 Mar 2016 10:36:20 GMT
225
- recorded_with: VCR 3.0.0
@@ -1,134 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/plugins/email
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- Accept-Encoding:
13
- - gzip, deflate
14
- Content-Type:
15
- - application/json
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Expires:
24
- - '0'
25
- Cache-Control:
26
- - no-cache, no-store, must-revalidate
27
- X-Powered-By:
28
- - Undertow/1
29
- Server:
30
- - WildFly/10
31
- Pragma:
32
- - no-cache
33
- Date:
34
- - Mon, 14 Mar 2016 10:36:21 GMT
35
- Connection:
36
- - keep-alive
37
- Content-Type:
38
- - application/json
39
- Content-Length:
40
- - '87'
41
- body:
42
- encoding: ASCII-8BIT
43
- string: '["cc","from","from-name","template.hawkular.url","template.html","template.plain","to"]'
44
- http_version:
45
- recorded_at: Mon, 14 Mar 2016 10:36:21 GMT
46
- - request:
47
- method: post
48
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/actions
49
- body:
50
- encoding: UTF-8
51
- string: '{"actionId":"my-id1","actionPlugin":"email","properties":{"notify-to-admins":"joe@acme.org"}}'
52
- headers:
53
- Accept:
54
- - application/json
55
- Accept-Encoding:
56
- - gzip, deflate
57
- Content-Type:
58
- - application/json
59
- Content-Length:
60
- - '93'
61
- User-Agent:
62
- - Ruby
63
- response:
64
- status:
65
- code: 200
66
- message: OK
67
- headers:
68
- Expires:
69
- - '0'
70
- Cache-Control:
71
- - no-cache, no-store, must-revalidate
72
- X-Powered-By:
73
- - Undertow/1
74
- Server:
75
- - WildFly/10
76
- Pragma:
77
- - no-cache
78
- Date:
79
- - Mon, 14 Mar 2016 10:36:21 GMT
80
- Connection:
81
- - keep-alive
82
- Content-Type:
83
- - application/json
84
- Content-Length:
85
- - '143'
86
- body:
87
- encoding: ASCII-8BIT
88
- string: '{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"email","actionId":"my-id1","properties":{"notify-to-admins":"joe@acme.org"}}'
89
- http_version:
90
- recorded_at: Mon, 14 Mar 2016 10:36:21 GMT
91
- - request:
92
- method: delete
93
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/actions/email/my-id1
94
- body:
95
- encoding: US-ASCII
96
- string: ''
97
- headers:
98
- Accept:
99
- - application/json
100
- Accept-Encoding:
101
- - gzip, deflate
102
- Content-Type:
103
- - application/json
104
- User-Agent:
105
- - Ruby
106
- response:
107
- status:
108
- code: 200
109
- message: OK
110
- headers:
111
- Expires:
112
- - '0'
113
- Cache-Control:
114
- - no-cache, no-store, must-revalidate
115
- X-Powered-By:
116
- - Undertow/1
117
- Server:
118
- - WildFly/10
119
- Pragma:
120
- - no-cache
121
- Date:
122
- - Mon, 14 Mar 2016 10:36:21 GMT
123
- Connection:
124
- - keep-alive
125
- Content-Type:
126
- - application/json
127
- Content-Length:
128
- - '0'
129
- body:
130
- encoding: UTF-8
131
- string: ''
132
- http_version:
133
- recorded_at: Mon, 14 Mar 2016 10:36:21 GMT
134
- recorded_with: VCR 3.0.0
@@ -1,220 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/plugins/webhook
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- Accept-Encoding:
13
- - gzip, deflate
14
- Content-Type:
15
- - application/json
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Expires:
24
- - '0'
25
- Cache-Control:
26
- - no-cache, no-store, must-revalidate
27
- X-Powered-By:
28
- - Undertow/1
29
- Server:
30
- - WildFly/10
31
- Pragma:
32
- - no-cache
33
- Date:
34
- - Mon, 14 Mar 2016 10:53:41 GMT
35
- Connection:
36
- - keep-alive
37
- Content-Type:
38
- - application/json
39
- Content-Length:
40
- - '16'
41
- body:
42
- encoding: ASCII-8BIT
43
- string: '["method","url"]'
44
- http_version:
45
- recorded_at: Mon, 14 Mar 2016 10:53:41 GMT
46
- - request:
47
- method: get
48
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/plugins/webhook
49
- body:
50
- encoding: US-ASCII
51
- string: ''
52
- headers:
53
- Accept:
54
- - application/json
55
- Accept-Encoding:
56
- - gzip, deflate
57
- Content-Type:
58
- - application/json
59
- User-Agent:
60
- - Ruby
61
- response:
62
- status:
63
- code: 200
64
- message: OK
65
- headers:
66
- Expires:
67
- - '0'
68
- Cache-Control:
69
- - no-cache, no-store, must-revalidate
70
- X-Powered-By:
71
- - Undertow/1
72
- Server:
73
- - WildFly/10
74
- Pragma:
75
- - no-cache
76
- Date:
77
- - Mon, 14 Mar 2016 10:53:42 GMT
78
- Connection:
79
- - keep-alive
80
- Content-Type:
81
- - application/json
82
- Content-Length:
83
- - '16'
84
- body:
85
- encoding: ASCII-8BIT
86
- string: '["method","url"]'
87
- http_version:
88
- recorded_at: Mon, 14 Mar 2016 10:53:42 GMT
89
- - request:
90
- method: post
91
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/actions
92
- body:
93
- encoding: UTF-8
94
- string: '{"actionId":"my-id1","actionPlugin":"webhook","properties":{"url":"http://localhost:8080/bla","method":"POST"}}'
95
- headers:
96
- Accept:
97
- - application/json
98
- Accept-Encoding:
99
- - gzip, deflate
100
- Content-Type:
101
- - application/json
102
- Content-Length:
103
- - '111'
104
- User-Agent:
105
- - Ruby
106
- response:
107
- status:
108
- code: 200
109
- message: OK
110
- headers:
111
- Expires:
112
- - '0'
113
- Cache-Control:
114
- - no-cache, no-store, must-revalidate
115
- X-Powered-By:
116
- - Undertow/1
117
- Server:
118
- - WildFly/10
119
- Pragma:
120
- - no-cache
121
- Date:
122
- - Mon, 14 Mar 2016 10:53:42 GMT
123
- Connection:
124
- - keep-alive
125
- Content-Type:
126
- - application/json
127
- Content-Length:
128
- - '161'
129
- body:
130
- encoding: ASCII-8BIT
131
- string: '{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"webhook","actionId":"my-id1","properties":{"url":"http://localhost:8080/bla","method":"POST"}}'
132
- http_version:
133
- recorded_at: Mon, 14 Mar 2016 10:53:42 GMT
134
- - request:
135
- method: get
136
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/actions/webhook/my-id1
137
- body:
138
- encoding: US-ASCII
139
- string: ''
140
- headers:
141
- Accept:
142
- - application/json
143
- Accept-Encoding:
144
- - gzip, deflate
145
- Content-Type:
146
- - application/json
147
- User-Agent:
148
- - Ruby
149
- response:
150
- status:
151
- code: 200
152
- message: OK
153
- headers:
154
- Expires:
155
- - '0'
156
- Cache-Control:
157
- - no-cache, no-store, must-revalidate
158
- X-Powered-By:
159
- - Undertow/1
160
- Server:
161
- - WildFly/10
162
- Pragma:
163
- - no-cache
164
- Date:
165
- - Mon, 14 Mar 2016 10:53:42 GMT
166
- Connection:
167
- - keep-alive
168
- Content-Type:
169
- - application/json
170
- Content-Length:
171
- - '161'
172
- body:
173
- encoding: ASCII-8BIT
174
- string: '{"tenantId":"28026b36-8fe4-4332-84c8-524e173a68bf","actionPlugin":"webhook","actionId":"my-id1","properties":{"url":"http://localhost:8080/bla","method":"POST"}}'
175
- http_version:
176
- recorded_at: Mon, 14 Mar 2016 10:53:42 GMT
177
- - request:
178
- method: delete
179
- uri: http://jdoe:password@localhost:8080/hawkular/alerts/actions/webhook/my-id1
180
- body:
181
- encoding: US-ASCII
182
- string: ''
183
- headers:
184
- Accept:
185
- - application/json
186
- Accept-Encoding:
187
- - gzip, deflate
188
- Content-Type:
189
- - application/json
190
- User-Agent:
191
- - Ruby
192
- response:
193
- status:
194
- code: 200
195
- message: OK
196
- headers:
197
- Expires:
198
- - '0'
199
- Cache-Control:
200
- - no-cache, no-store, must-revalidate
201
- X-Powered-By:
202
- - Undertow/1
203
- Server:
204
- - WildFly/10
205
- Pragma:
206
- - no-cache
207
- Date:
208
- - Mon, 14 Mar 2016 10:53:42 GMT
209
- Connection:
210
- - keep-alive
211
- Content-Type:
212
- - application/json
213
- Content-Length:
214
- - '0'
215
- body:
216
- encoding: UTF-8
217
- string: ''
218
- http_version:
219
- recorded_at: Mon, 14 Mar 2016 10:53:42 GMT
220
- recorded_with: VCR 3.0.0