diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-1.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-1.yaml index b24fd3add957f8e156c7008d0a9c4b255765532b..4848c1811d39b75a4cdc5491655b5f365d409f13 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-1.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-1.yaml @@ -30,6 +30,26 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/high-latency + - requests_diff_policy: + type: eu.ict-flame.policies.StateChange + triggers: + increase_in_requests: + description: | + This event triggers when the number of requests has increased relative to the number of requests received + 120 seconds ago. + event_type: relative + metric: storage.requests + condition: + threshold: 100 + granularity: 120 + resource_type: + sf_package: storage + sf: storage-users + location: watershed + comparison_operator: gte + action: + implementation: + - http://sfemc.flame.eu/notify - low_requests_policy: type: eu.ict-flame.policies.StateChange triggers: diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-10.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-10.yaml index ec5de6eefe25f8c410c0f1da7f2f2c7e579c9907..491d1e7d8c4a295c587d3b12da18bd3c81c8c91e 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-10.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-10.yaml @@ -30,6 +30,26 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/high-latency + - requests_diff_policy: + type: eu.ict-flame.policies.StateChange + triggers: + decrease_in_requests: + description: | + This event triggers when the number of requests has decreased relative to the number of requests received + 120 seconds ago. + event_type: relative + metric: storage.requests + condition: + threshold: -100 # requests have decreased by at least 100 + granularity: 120 + resource_type: + sf_package: storage + sf: storage-users + location: watershed + comparison_operator: lte + action: + implementation: + - http://sfemc.flame.eu/notify - low_requests_policy: type: eu.ict-flame.policies.StateChange triggers: diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-2.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-2.yaml index 3ff9985e78ced0a695373236893c3cbc948e504b..afa4d867dfaa26d84c3211d65665cf255b880d97 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-2.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-2.yaml @@ -12,24 +12,21 @@ metadata: topology_template: policies: - - high_latency_policy: + - missing_measurement_policy: type: eu.ict-flame.policies.StateChange triggers: - high_latency: - description: This event triggers when the mean network latency in a given location exceeds a given threshold (in ms). - event_type: threshold - metric: network.latency + missing_storage_measurements: + description: This event triggers when the number of storage measurements reported falls below the threshold value. + event_type: deadman + metric: storage.* condition: - threshold: 45 - granularity: 120 - aggregation_method: mean + threshold: 0 + granularity: 60 resource_type: - location: watershed - comparison_operator: gt + sf_package: storage action: implementation: - http://sfemc.flame.eu/notify - - http://companyA.alert-handler.flame.eu/high-latency - low_requests_policy: type: eu.ict-flame.policies.StateChange triggers: diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-7.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-7.yaml index 10e47bc0561fe20c62dbedd2b9b24be1f9cebb76..2285e66035873e2906b9eddc3b49d3ab9462abc6 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-7.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-7.yaml @@ -52,3 +52,18 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/low-requests + - missing_measurement_policy: + type: eu.ict-flame.policies.StateChange + triggers: + missing_storage_measurements: + description: This event triggers when the number of storage measurements reported falls below the threshold value. + event_type: deadman + metric: storage.* + condition: + threshold: 0 + granularity: 60 + resource_type: + sf_package: storage + action: + implementation: + - http://sfemc.flame.eu/notify \ No newline at end of file diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-8.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-8.yaml index 92ca88d19a965cd9e342ebda382fcf355a7803fe..bd960b505f7cad18348f2aed4aeab70267607eb6 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-8.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/invalid/alerts_test_config-8.yaml @@ -38,3 +38,40 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/low-requests + - requests_diff_policy: + type: eu.ict-flame.policies.StateChange + triggers: + increase_in_requests: + description: | + This event triggers when the number of requests has increased relative to the number of requests received + 120 seconds ago. + event_type: relative + metric: storage.requests + condition: + threshold: 100 # requests have increased by at least 100 + granularity: 120 + resource_type: + sf_package: storage + sf: storage-users + location: watershed + comparison_operator: gte + action: + implementation: + - http://sfemc.flame.eu/notify + decrease_in_requests: + description: | + This event triggers when the number of requests has decreased relative to the number of requests received + 120 seconds ago. + event_type: relative + metric: storage.requests + condition: + threshold: -100 # requests have decreased by at least 100 + granularity: 120 + resource_type: + sf_package: storage + sf: storage-users + location: watershed + comparison_operator: lte + action: + implementation: + - http://sfemc.flame.eu/notify \ No newline at end of file diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-2.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-2.yaml index ebf78f0b877acf3a2215e793e2ce0d70172d7a3d..a44743afcf9197765dedefb26a06006c824e647b 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-2.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-2.yaml @@ -54,3 +54,23 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/low-requests + - requests_diff_policy: + type: eu.ict-flame.policies.StateChange + triggers: + decrease_in_requests: + description: | + This event triggers when the number of requests has decreased relative to the number of requests received + 120 seconds ago. + event_type: relative + metric: storage.requests + condition: + threshold: -100 # requests have decreased by at least 100 + granularity: 120 + resource_type: + sf_package: storage + sf: storage-users + location: watershed + comparison_operator: lte + action: + implementation: + - http://sfemc.flame.eu/notify \ No newline at end of file diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-3.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-3.yaml index ae6471f543520460636dfa5c9115a5957af3dd1c..529152c82fdedc61b38250989b748ed499832ad2 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-3.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-3.yaml @@ -22,10 +22,10 @@ topology_template: condition: threshold: 45 granularity: 120 - aggregation_method: median + # aggregation_method is optional, default value is "mean" resource_type: location: watershed - comparison_operator: gt + # comparison operator is optional, default value is >= or "gte" action: implementation: - http://sfemc.flame.eu/notify diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-4.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-4.yaml index 5e716e8671a9a973c8af0f6f2accf90230628e94..8c106043f4b6fee825f060bb41d47d313a82ce91 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-4.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-4.yaml @@ -47,3 +47,21 @@ topology_template: implementation: - http://sfemc.flame.eu/notify - http://companyA.alert-handler.flame.eu/low-requests + - missing_measurement_policy: + type: eu.ict-flame.policies.StateChange + 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: 0 # 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: + sf_package: storage + comparison_operator: gte # although events of type deadman do not use a comparison operator, the validator will not complain if one is given, it will simply ignore it + action: + implementation: + - http://sfemc.flame.eu/notify diff --git a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-5.yaml b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-5.yaml index 056680123292e5d33ac9e87ac4955e390f5cbe62..54567e1ad51673681fa6cdd47dc6c72e3fd959af 100644 --- a/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-5.yaml +++ b/src/service/clmcservice/resources/tosca/test-data/clmc-validator/valid/alerts_test_config-5.yaml @@ -47,3 +47,24 @@ topology_template: implementation: - https://sfemc.flame.eu/notify - http://localhost:9999/low-requests # localhost url is also allowed + - requests_diff_policy: + type: eu.ict-flame.policies.StateChange + triggers: + increase_in_requests: + description: | + This event triggers when the number of requests has increased relative to the number of requests received + 120 seconds ago. + event_type: relative + metric: storage.requests + condition: + threshold: 100 # requests have increased by at least 100 + granularity: 120 + aggregation_method: first # Although events of type relative do not require an aggregation method, the validator will not complain if one is given, it will simply ignore it + resource_type: + sf_package: storage + sf: storage-users + location: watershed + comparison_operator: gte + action: + implementation: + - http://sfemc.flame.eu/notify