diff --git a/docs/AlertsSpecification.md b/docs/AlertsSpecification.md index 2119f6a93dc62c7ff0d9d4ba76ef97dd923d28c4..e97729aadb7549346a5d51474d0bf2e8b7066695 100644 --- a/docs/AlertsSpecification.md +++ b/docs/AlertsSpecification.md @@ -61,7 +61,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -80,7 +80,7 @@ topology_template: - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | @@ -103,7 +103,7 @@ topology_template: - http://companyA.alert-handler.flame.eu/low-requests - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: increase_in_requests: description: | @@ -142,7 +142,7 @@ topology_template: - flame_sfemc - missing_measurement_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: missing_storage_measurements: description: This event triggers when the number of storage measurements reported falls below the threshold value. @@ -175,14 +175,14 @@ metadata: ##### Policies The ***policies*** section defines a list of policy nodes, each representing a fully qualified configuration for an -alert within CLMC. The format is the following: +alert within CLMC. Each policy must be of type eu.ict-flame.policies.Alert. The format is the following: ```yaml topology_template: policies: - <policy_identifier>: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: <event identifier>: description: <optional description for the given event trigger> @@ -252,7 +252,8 @@ SFEMC URL. ##### Event types * **threshold** - A threshold event type is an alert in which Kapacitor queries InfluxDB on specific metric in a given period of time -by using a query function such as *mean*, *median*, *mode*, etc. This value is then compared against a given threshold. If the +by using a query function such as *mean*, *median*, *mode*, etc. If the granularity is less than or equal to 60 seconds, then every measurement +point is monitored (improving performance), thus, ignoring the aggregation function. This value is then compared against a given threshold. If the result of the comparison operation is true, an alert is triggered. For example: ```yaml diff --git a/src/service/clmcservice/alertsapi/alerts_specification_schema.py b/src/service/clmcservice/alertsapi/alerts_specification_schema.py index 952d1c133f6ae84b386fe6fd336c25585e37f939..ed2a5e749335db2d90a3da104512b3e6ff344a4f 100644 --- a/src/service/clmcservice/alertsapi/alerts_specification_schema.py +++ b/src/service/clmcservice/alertsapi/alerts_specification_schema.py @@ -35,7 +35,7 @@ from schema import Schema, And, Or, Optional, SchemaError # * metadata section must be present (with key-value pairs for sfc and sfci) # * policies section must be present (under the topology_template node) # * each policy must be associated with a triggers node (containing at least 1 trigger) -# * each policy is of type eu.ict-flame.policies.StateChange or eu.ict-flame.policies.Alert +# * each policy is of type eu.ict-flame.policies.Alert # * each trigger must specify event_type, metric, condition, and at least one handler in action/implementation # * the condition section must specify threshold, granularity, aggregation_method, comparison_operator @@ -81,7 +81,7 @@ ALERTS_SPECIFICATION_SCHEMA = Schema({ "policies": [ { str: { - "type": "eu.ict-flame.policies.StateChange", + "type": "eu.ict-flame.policies.Alert", "triggers": And({ str: { Optional("description"): str, diff --git a/src/service/clmcservice/static/flame_clmc_alerts_definitions.yaml b/src/service/clmcservice/static/flame_clmc_alerts_definitions.yaml index 4553746b081258c653d5b90e5d5798ae611b004f..51349a7be63d0ba81cdd3e4a98061d0c8a156aa5 100644 --- a/src/service/clmcservice/static/flame_clmc_alerts_definitions.yaml +++ b/src/service/clmcservice/static/flame_clmc_alerts_definitions.yaml @@ -2,6 +2,6 @@ tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 policy_types: - eu.ict-flame.policies.StateChange: + eu.ict-flame.policies.Alert: - derived_from: tosca.policies.Update \ No newline at end of file + derived_from: tosca.policies.Root \ No newline at end of file diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-1.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-1.yaml index 44e73ab464da406ee7b194c1ef6c931c69d222b3..7812392af8dc3e50301843c84c38adf4e67cc9e4 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-1.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-1.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -31,7 +31,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: increase_in_requests: description: | @@ -51,7 +51,7 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-10.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-10.yaml index 1710bd0c7a5db3fa265e5b0e155025d85497433a..c2a855080832457c3f8a6f83975696542ea1b08f 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-10.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-10.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -31,7 +31,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: decrease_in_requests: description: | @@ -51,7 +51,7 @@ topology_template: implementation: - flame_sfemc - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-11.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-11.yaml index 97db7e99b852c7569394b2a6f27843a67be58ffb..d9110e5a69aa61f631d5b836774257ce299ee92d 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-11.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-11.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -32,7 +32,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: decrease_in_requests: description: | @@ -52,7 +52,7 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-12.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-12.yaml index 15ba25b7e2b7025ba9d129dd86f6de5bb8d0b0cb..818823f8139ca1b8493a26e3d7fa1bcdb8be890d 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-12.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-12.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -32,7 +32,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: decrease_in_requests: description: | @@ -52,7 +52,7 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-2.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-2.yaml index 90e6f0be1b8b89f3aeaf851c094351c4fb86422d..da58e71b7c08918707ac362dc4328d306fd74115 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-2.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-2.yaml @@ -13,7 +13,7 @@ topology_template: policies: - missing_measurement_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: missing_storage_measurements: description: This event triggers when the number of storage measurements reported falls below the threshold value. @@ -28,7 +28,7 @@ topology_template: implementation: - flame_sfemc - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-3.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-3.yaml index 7b61aaa00f0d040cd018d9e5be77b86f0a8c2296..8a89ae9f89af2abbf6f5b380066a1041d863f9f1 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-3.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-3.yaml @@ -13,7 +13,7 @@ topology_template: policies: - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-4.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-4.yaml index 67c403af9c9edfc01e0b11b38bf1a7837f969baf..6a2884270313c3d2a3b5e4ba520a237947f7c666 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-4.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-4.yaml @@ -13,7 +13,7 @@ topology_template: policies: - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-5.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-5.yaml index ac2bc0050bfb9bb02c0c01c58dd6018d4493878f..b558ac97aff5b0e44c31f811f9fd8161e1d4e43d 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-5.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-5.yaml @@ -13,7 +13,7 @@ topology_template: policies: - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-6.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-6.yaml index 9142fe0fa7c64105522ac60549f646240a66c511..7a7688658d90ef1dfc036410b752366976e488de 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-6.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-6.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -32,7 +32,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-7.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-7.yaml index 694bed6f1289bceed4aec0a04ce9c19ea2fdeec9..312b5e4e1b27f8cde5c346173fd2d29e2d3819aa 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-7.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-7.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -31,7 +31,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | @@ -53,7 +53,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/low-requests - missing_measurement_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: missing_storage_measurements: description: This event triggers when the number of storage measurements reported falls below the threshold value. diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-8.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-8.yaml index ed8af914202e860f377686e0d650a5ea598f0c40..de10ba0aeba3acd63743dfe669c8838aa6698e25 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-8.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-8.yaml @@ -13,11 +13,11 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: # should specify at least 1 trigger - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | @@ -39,7 +39,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/low-requests - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: increase_in_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-9.yaml b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-9.yaml index 4f6f6cb34092e38c16f0a16394fe1fd78add4e72..15e50edd9a60ae250dd597de2c59c5b0654ad825 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-9.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-9.yaml @@ -11,7 +11,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -29,7 +29,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-1.yaml b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-1.yaml index 7d3a1be81c4a7785c19c5312b8294e6ac62c6113..c3b3a227f9825f29f570a44a2ad84959b4cbd716 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-1.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-1.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -32,7 +32,7 @@ topology_template: - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | @@ -52,4 +52,22 @@ topology_template: action: implementation: - flame_sfemc - - http://companyA.alert-handler.flame.eu/low-requests \ No newline at end of file + - http://companyA.alert-handler.flame.eu/low-requests + + - missing_measurement_policy: + type: eu.ict-flame.policies.Alert + triggers: + missing_storage_measurements: + description: This event triggers when the number of storage measurements reported falls below the threshold value. + event_type: deadman + # deadman trigger instances monitor the whole measurement (storage in this case), so simply put a star for field value + # to be compliant with the <measurement>.<field> format + metric: storage.* + condition: + threshold: 10 # if requests are less than or equal to 0 (in other words, no measurements are reported) + granularity: 60 # check for for missing data for the last 60 seconds + resource_type: + flame_sfp: storage + action: + implementation: + - http://companyA.alert-handler.flame.eu/missing_measurements \ No newline at end of file diff --git a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-2.yaml b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-2.yaml index 9dc4288c582a928343cce76c4c58d79d8522b7cc..a3ea67cafc811d0e313e866e9ddfc62b8e792030 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-2.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-2.yaml @@ -12,8 +12,24 @@ metadata: topology_template: policies: + - high_latency_policy: + type: eu.ict-flame.policies.Alert + triggers: + high_latency: + # optional description - hence, valid + event_type: threshold + metric: network.latency + condition: + threshold: 45 + granularity: 120 + resource_type: + flame_location: watershed + comparison_operator: eq + action: + implementation: + - http://companyA.alert-handler.flame.eu/high-latency - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: decrease_in_requests: description: | @@ -34,7 +50,7 @@ topology_template: - flame_sfemc - missing_measurement_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: missing_storage_measurements: description: This event triggers when the number of storage measurements reported falls below the threshold value. diff --git a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-3.yaml b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-3.yaml index ed21a678c50192b1a8b8fcc36a15cae3186f11c8..266fa3152806f66f52101e3230d7605e33a11772 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-3.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-3.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: # optional description - hence, valid @@ -31,7 +31,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: # optional description - hence, valid @@ -51,7 +51,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/low-requests - missing_measurement_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: missing_storage_measurements: description: This event triggers when the number of storage measurements reported falls below the threshold value. diff --git a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-4.yaml b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-4.yaml index 04a8ed33678e206221a65c19db9ff12c7b298197..3993c088f0a2fbe6fc9f7e388563d9a3fd072478 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-4.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-4.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: # optional description - hence, valid @@ -32,7 +32,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: # optional description - hence, valid @@ -49,7 +49,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/low-requests - missing_measurement_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: missing_storage_measurements: description: This event triggers when the number of storage measurements reported falls below the threshold value. diff --git a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-5.yaml b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-5.yaml index 06dc5543c4b262b8a47ea83b3aec649377a8fdc8..83195048c010fb0b4f9f7ce9e5a06002e69f36ca 100644 --- a/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-5.yaml +++ b/src/service/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-5.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: # optional description - hence, valid @@ -31,7 +31,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: # optional description - hence, valid @@ -48,7 +48,7 @@ topology_template: - flame_sfemc - http://localhost:9999/low-requests # localhost url is also allowed - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: increase_in_requests: description: | diff --git a/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-2.yaml b/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-2.yaml index 773f8f947fea76b593c324f1fe0a039c723de594..ad61f4b578a0343a1b8e3597ee258ec7d16e7027 100644 --- a/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-2.yaml +++ b/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-2.yaml @@ -12,7 +12,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -31,7 +31,7 @@ topology_template: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/high-latency - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: increase_in_requests: description: | diff --git a/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-3.yaml b/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-3.yaml index 94891fe31c116e93a49f9fc5718e6842849a0a9c..326d6b59833f805a506a1125efae9cf9824ab428 100644 --- a/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-3.yaml +++ b/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-3.yaml @@ -12,7 +12,7 @@ metadata: topology_template: # missing policies section - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -31,7 +31,7 @@ topology_template: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-4.yaml b/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-4.yaml index 0e546d5bbaad9c688e4a0c5cb4777976848be6e6..f1056c6cfd66a62627a0a5c55c1c5a5858e0d537 100644 --- a/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-4.yaml +++ b/src/service/resources/tosca/test-data/tosca-parser/invalid/alerts_test_config-4.yaml @@ -13,7 +13,7 @@ metadata: alerts: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -32,7 +32,7 @@ alerts: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | diff --git a/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-1.yaml b/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-1.yaml index 928c25ed767ba906158e52c1649d76f184ae64b2..5df5321036a8239fc3b746fa491d621e268d7a13 100644 --- a/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-1.yaml +++ b/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-1.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -32,7 +32,7 @@ topology_template: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | @@ -54,7 +54,7 @@ topology_template: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/low-requests - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: increase_in_requests: description: | @@ -91,7 +91,7 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - missing_measurement_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: missing_storage_measurements: description: This event triggers when the number of storage measurements reported falls below the threshold value. diff --git a/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-2.yaml b/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-2.yaml index 0b9fb2cfc58f831d35a30ecc1350e4568f360901..07f1cb69fe23aacec07a2fddcc31c3a657624a82 100644 --- a/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-2.yaml +++ b/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-2.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). @@ -30,7 +30,7 @@ topology_template: - http://companyA.alert-handler.flame.eu/high-latency - flame_sfemc - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | @@ -48,7 +48,7 @@ topology_template: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/low-requests - missing_measurement_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: missing_storage_measurements: event_type: deadman diff --git a/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-3.yaml b/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-3.yaml index 118797e8b5c1889b4c81a0cbeadecfd5cd141aeb..13f05f89427fcfba330254fc87198fba8eaeedf7 100644 --- a/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-3.yaml +++ b/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-3.yaml @@ -13,7 +13,7 @@ topology_template: policies: - high_latency_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_latency: description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). diff --git a/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-4.yaml b/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-4.yaml index 92a392a8221f00ca2637dc4f1b9a3a86b20c730c..db5a6d2dd3c3d6851e0437d19432dcae2be79038 100644 --- a/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-4.yaml +++ b/src/service/resources/tosca/test-data/tosca-parser/valid/alerts_test_config-4.yaml @@ -13,7 +13,7 @@ topology_template: policies: - low_requests_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: low_requests: description: | @@ -35,7 +35,7 @@ topology_template: - flame_sfemc - http://companyA.alert-handler.flame.eu/low-requests - requests_diff_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: increase_in_requests: event_type: relative diff --git a/src/test/clmctest/alerts/alerts_test_config.yaml b/src/test/clmctest/alerts/alerts_test_config.yaml index fbaeda756f12ffc1d6d88400daefe78787a8f944..6c422e7e6f78f8db8f3a9b89942d2c7dfba03074 100644 --- a/src/test/clmctest/alerts/alerts_test_config.yaml +++ b/src/test/clmctest/alerts/alerts_test_config.yaml @@ -13,7 +13,7 @@ topology_template: policies: - scale_nginx_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: high_requests: description: | @@ -65,7 +65,7 @@ topology_template: - flame_sfemc - http://172.40.231.200:9999/ - deadman_policy: - type: eu.ict-flame.policies.StateChange + type: eu.ict-flame.policies.Alert triggers: no_measurements: description: |