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

Updates alerts configuration docs

parent 830a0750
No related branches found
No related tags found
No related merge requests found
......@@ -33,55 +33,71 @@
#### Description
This document outlines the configuration of alerts within CLMC. Alerts are configured through a YAML-based
TOSCA-compliant document. This document is passed to the CLMC service, which parses and validates the document. Subsequently, the CLMC service
creates and activates the alerts within Kapacitor, then registers the HTTP alert handlers specified in the document.
TOSCA-compliant document. This document is passed to the CLMC service, which parses and validates the document. Subsequently,
the CLMC service creates and activates the alerts within Kapacitor, then registers the HTTP alert handlers specified in the document.
#### TOSCA Alerts Configuration Document
The TOSCA Alerts Configuration Document consists of two main sections - **metadata** and **triggers**. Full definitions and
clarification of the structure of the document is given in the following sections. An example of an alert configuration
The TOSCA Alerts Configuration Document consists of two main sections - **metadata** and **policies**. Full definitions and
clarification of the structure of the document is given in the following sections. An example of a valid alert configuration
document will look like:
```yaml
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
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:
location: watershed
comparison_operator: gt
action:
implementation:
- http://sfemc.flame.eu/notify
- http://companyA.alert-handler.flame.eu/high-latency
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:
sf_package: storage
sf: storage-users
location: watershed
comparison_operator: lt
action:
implementation:
- http://sfemc.flame.eu/notify
- http://companyA.alert-handler.flame.eu/low-requests
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:
location: watershed
comparison_operator: gt
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:
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:
sf_package: storage
sf: storage-users
location: watershed
comparison_operator: lt
action:
implementation:
- http://sfemc.flame.eu/notify
- http://companyA.alert-handler.flame.eu/low-requests
```
......@@ -96,36 +112,44 @@ metadata:
sfci: <sfc_i_id>
```
##### Triggers
##### Policies
The ***triggers*** section defines a sequence of trigger-type nodes, each representing a fully qualified configuration for an
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:
```yaml
triggers:
<event identifier>:
description: <optional description for the given event trigger>
event_type: <threshold | relative | deadman>
metric: <measurement>.<field>
condition:
threshold: <critical value>
granularity: <period in seconds - how often to check whether the event condition is true>
aggregation_method: <aggregation function supported by InfluxDB - e.g. 'mean'>
resource_type:
<CLMC Information Model Tag Name>: <CLMC Information Model Tag Value>
<CLMC Information Model Tag Name>: <CLMC Information Model Tag Value>
...
comparison_operator: <logical operator to use for comparison, e.g. 'gt', 'lt'
action:
implementation:
- <HTTP Alert Handler URL>
- <HTTP Alert Handler URL>
...
...
topology_template:
policies:
- <policy_identifier>:
type: eu.ict-flame.policies.StateChange
triggers:
<event identifier>:
description: <optional description for the given event trigger>
event_type: <threshold | relative | deadman>
metric: <measurement>.<field>
condition:
threshold: <critical value>
granularity: <period in seconds - how often to check whether the event condition is true>
aggregation_method: <aggregation function supported by InfluxDB - e.g. 'mean'>
resource_type:
<CLMC Information Model Tag Name>: <CLMC Information Model Tag Value>
<CLMC Information Model Tag Name>: <CLMC Information Model Tag Value>
...
comparison_operator: <logical operator to use for comparison, e.g. 'gt', 'lt'
action:
implementation:
- <HTTP Alert Handler URL>
- <HTTP Alert Handler URL>
...
...
```
##### Definitions
* **policy_identifier** - policy label which should match with a StateChange policy in the TOSCA resource specification document
submitted to the FLAME Orchestrator for consistency.
* **event_identifier** - the name of the event that **MUST** match with the *constraint* event name referenced in the TOSCA resource
specification document submitted to the FLAME Orchestrator.
......
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