Skip to content
Snippets Groups Projects
Commit 1f97123a authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

Updates alerts specification to exclude flame_sfc and flame_sfci from resource_type property

parent 423192f8
No related branches found
No related tags found
No related merge requests found
......@@ -116,8 +116,6 @@ topology_template:
threshold: 100 # requests have increased by at least 100
granularity: 120
resource_type:
flame_sfc: companyA-VR
flame_sfci: companyA-VR-premium
flame_sfp: storage
flame_sf: storage-users
flame_server: watershed
......@@ -239,8 +237,10 @@ the format is still the same for consistency. Therefore, using `<measurement>.*`
the event_type is set to **threshold**.
* **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_sfc", "flame_sfci", "flame_sfp", "flame_sf", "flame_sfe", "flame_server", "flame_location"`.
Keep in mind that filtering for **sfc** and **sfci** is automatically generated by extracting the metadata values from the alerts specification.
This includes any of the following: `"flame_sfp", "flame_sf", "flame_sfe", "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.
For more information on the global tags, please check the [documentation](monitoring.md).
* **comparison_operator** - the logical operator to use for comparison - lt (less than), gt (greater than), lte (less than or equal to), etc.
......
......@@ -62,7 +62,9 @@ URL_REGEX = re.compile(
re.IGNORECASE)
# Global tags allowed to be used for filtering in the trigger condition
CLMC_INFORMATION_MODEL_GLOBAL_TAGS = {"flame_sfc", "flame_sfci", "flame_sfp", "flame_sf", "flame_sfe", "flame_server", "flame_location"}
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
# This is because those two tags are automatically added to the InfluxDB queries - the required values are retrieved from the alert spec. metadata
ALERTS_SPECIFICATION_SCHEMA = Schema({
"tosca_definitions_version": And(str, lambda v: v == "tosca_simple_profile_for_nfv_1_0_0"),
......
......@@ -225,7 +225,7 @@ class AlertsConfigurationAPI(object):
where_clause = None
if "resource_type" in trigger.trigger_tpl["condition"]:
tags = condition["resource_type"]
# make sure alert tasks are executing with queries for the given sfc and sfc instance
# make sure alert tasks are executing with queries for the given sfc and sfc instance - automatically add those tags using the metadata values
tags["flame_sfc"] = sfc
tags["flame_sfci"] = sfc_instance
......
tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
description: TOSCA Alerts Configuration document
imports:
- flame_clmc_alerts_definitions.yaml
metadata:
sfc: companyA-VR
sfci: companyA-VR-premium
topology_template:
policies:
- high_latency_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
condition:
threshold: 45
granularity: 120
aggregation_method: mean
resource_type:
flame_sfc: companyA-VR # not allowed - sfc tag is automatically added in the filters
flame_location: watershed
comparison_operator: gt
action:
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:
flame_sfp: storage
flame_sf: storage-users
flame_location: watershed
comparison_operator: lte
action:
implementation:
- http://sfemc.flame.eu/notify
- low_requests_policy:
type: eu.ict-flame.policies.StateChange
triggers:
low_requests:
description: |
This event triggers when the last reported number of requests for a given service function
falls behind a given threshold.
event_type: threshold
metric: storage.requests
condition:
threshold: 5
granularity: 60
aggregation_method: last
resource_type:
flame_sfp: storage
flame_sf: storage-users
flame_location: watershed
comparison_operator: lt
action:
implementation:
- http://sfemc.flame.eu/notify
- http://companyA.alert-handler.flame.eu/low-requests
tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
description: TOSCA Alerts Configuration document
imports:
- flame_clmc_alerts_definitions.yaml
metadata:
sfc: companyA-VR
sfci: companyA-VR-premium
topology_template:
policies:
- high_latency_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
condition:
threshold: 45
granularity: 120
aggregation_method: mean
resource_type:
flame_sfci: companyA-VR-premium # not allowed - sfci tag is automatically added in the filters
flame_location: watershed
comparison_operator: gt
action:
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:
flame_sfp: storage
flame_sf: storage-users
flame_location: watershed
comparison_operator: lte
action:
implementation:
- http://sfemc.flame.eu/notify
- low_requests_policy:
type: eu.ict-flame.policies.StateChange
triggers:
low_requests:
description: |
This event triggers when the last reported number of requests for a given service function
falls behind a given threshold.
event_type: threshold
metric: storage.requests
condition:
threshold: 5
granularity: 60
aggregation_method: last
resource_type:
flame_sfp: storage
flame_sf: storage-users
flame_location: watershed
comparison_operator: lt
action:
implementation:
- http://sfemc.flame.eu/notify
- http://companyA.alert-handler.flame.eu/low-requests
......@@ -25,8 +25,6 @@ topology_template:
threshold: -100 # requests have decreased by at least 100
granularity: 120
resource_type:
flame_sfc: companyA-VR # sfc tag is also allowed, even though it is already included in the metadata
flame_sfci: companyA-VR-premium # sfci tag is also allowed, even though it is already included in the metadata
flame_sfp: storage
flame_sf: storage-users
flame_location: watershed
......
......@@ -54,8 +54,6 @@ topology_template:
threshold: 1
granularity: 10
resource_type:
flame_sfc: MS_Template_1 # value is already given in metadata so this is optional
flame_sfci: MS_I1 # value is already given in metadata so this is optional
flame_sfp: nginx
flame_sf: adaptive_streaming_nginx_I1
flame_location: DC1
......@@ -76,8 +74,6 @@ topology_template:
threshold: 0
granularity: 5
resource_type:
flame_sfc: MS_Template_1 # value is already given in metadata so this is optional
flame_sfci: MS_I1 # value is already given in metadata so this is optional
flame_sfp: nginx
flame_sf: adaptive_streaming_nginx_I1
flame_location: DC1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment