From edc17300ef612be2aadba3e3e42597f929139892 Mon Sep 17 00:00:00 2001 From: Nikolay Stanchev <ns17@it-innovation.soton.ac.uk> Date: Tue, 16 Oct 2018 14:18:02 +0100 Subject: [PATCH] Updates docs and removes flame_sfe from allowed tags in the alerts configuration --- docs/AlertsSpecification.md | 2 +- .../clmcservice/alertsapi/alerts_specification_schema.py | 5 +++-- src/test/clmctest/alerts/alerts_test_config.yaml | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/AlertsSpecification.md b/docs/AlertsSpecification.md index 069bf04..3456102 100644 --- a/docs/AlertsSpecification.md +++ b/docs/AlertsSpecification.md @@ -238,7 +238,7 @@ the format is still the same for consistency. Therefore, using `<measurement>.*` the event_type is set to **threshold** or **relative**. * **resource_type** - provides context for the given event - key-value pairs for the global tags of the CLMC Information Model. -This includes any of the following: `"flame_sfp", "flame_sf", "flame_sfe", "flame_server", "flame_location"`. +This includes any of the following: `"flame_sfp", "flame_sf", "flame_server", "flame_location"`. Keep in mind that **flame_sfc** and **flame_sfci** are also part of the CLMC Information Model. However, filtering on these tags is automatically generated and added to all InfluxDB queries by using the metadata values from the alerts specification. Therefore, including **flame_sfc** and **flame_sfci** in the **resource_type** is considered INVALID. diff --git a/src/service/clmcservice/alertsapi/alerts_specification_schema.py b/src/service/clmcservice/alertsapi/alerts_specification_schema.py index ed2a5e7..212f301 100644 --- a/src/service/clmcservice/alertsapi/alerts_specification_schema.py +++ b/src/service/clmcservice/alertsapi/alerts_specification_schema.py @@ -65,9 +65,10 @@ URL_REGEX = re.compile( re.IGNORECASE) # Global tags allowed to be used for filtering in the trigger condition -CLMC_INFORMATION_MODEL_GLOBAL_TAGS = {"flame_sfp", "flame_sf", "flame_sfe", "flame_server", "flame_location"} -# NOTICE that "flame_sfc", "flame_sfci" are not allowed, eventhough they are part of the CLMC Information Model +CLMC_INFORMATION_MODEL_GLOBAL_TAGS = {"flame_sfp", "flame_sf", "flame_server", "flame_location"} +# NOTICE that "flame_sfc", "flame_sfci" are not allowed, even though they are part of the CLMC Information Model # This is because those two tags are automatically added to the InfluxDB queries - the required values are retrieved from the alert spec. metadata +# "flame_sfe" cannot be used as well, because the value of this tag is only known at runtime. ALERTS_SPECIFICATION_SCHEMA = Schema({ "tosca_definitions_version": And(str, lambda v: v == "tosca_simple_profile_for_nfv_1_0_0"), diff --git a/src/test/clmctest/alerts/alerts_test_config.yaml b/src/test/clmctest/alerts/alerts_test_config.yaml index 6c422e7..fed474d 100644 --- a/src/test/clmctest/alerts/alerts_test_config.yaml +++ b/src/test/clmctest/alerts/alerts_test_config.yaml @@ -54,6 +54,7 @@ topology_template: condition: threshold: 1 granularity: 10 + aggregation_method: mean resource_type: flame_sfp: nginx flame_sf: adaptive_streaming_nginx_I1 -- GitLab