diff --git a/docs/AlertsSpecification.md b/docs/AlertsSpecification.md index 069bf04b2d6d42871b004567c28cb9f8a2c9adcf..34561023aa686e2085114dc94eb1f0b1d4da4e11 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 ed2a5e749335db2d90a3da104512b3e6ff344a4f..212f301775fc725ea14ac3e0048f8e5502f9b237 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 6c422e7e6f78f8db8f3a9b89942d2c7dfba03074..fed474de91b22d9c17e81cfaaedf42e3a4b0cce5 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