Merge "Add docs for cnf auto heal and scale"

This commit is contained in:
Zuul 2022-09-16 08:08:07 +00:00 committed by Gerrit Code Review
commit 2b93c31c40
42 changed files with 5266 additions and 3 deletions

View File

@ -21,4 +21,7 @@ NFV Orchestration API v2.0
v1/vnflcm_versions
v2/vnflcm
v2/vnffm
v2/vnfpm
v2/prometheus_plugin
v2/fault_notification

View File

@ -72,6 +72,11 @@
and none of the range-specifier values in this field overlap the current
extent of the selected resource, and the request did not include an
If-Range request-header field.
422:
default: |
The content type of the payload body is supported and the payload body of a
request contains syntactically correct data (e.g. well-formed JSON) but the data
cannot be processed (e.g. because it fails validation against a schema).
500:
default: |
Something went wrong inside the service. This should not happen usually.

View File

@ -0,0 +1,150 @@
alert:
description: alert message
in: body
required: true
type: array(inlined)
annotations:
description: |
dynamic properties.
in: body
required: true
type: object (inlined)
aspect_id:
description: |
aspectId of the scaling target.
in: body
required: true
type: string
auto_scale_type:
description: |
'SCALE_OUT' for scaling out, 'SCALE_IN' for scaling in.
in: body
required: true
type: string
endsAt:
description: |
alert expiration time.
in: body
required: true
type: string
event_type:
description: |
eventType value defined in ETSI FM interface.
in: body
required: true
type: string
fault_details:
description: |
faultDetails defined in ETSI FM interface.
in: body
required: true
type: string
fault_type:
description: |
faultType defined in ETSI FM interface.
in: body
required: true
type: string
fingerprint:
description: |
id to identify alert.
in: body
required: true
type: string
function_type_auto_scale:
description: |
must be "auto_scale".
in: body
required: true
type: string
function_type_fm:
description: |
must be "vnffm".
in: body
required: true
type: string
function_type_pm:
description: |
must be "vnfpm".
in: body
required: true
type: string
job_id:
description: |
PM job id defined in ETSI PM interface.
in: body
required: true
type: string
labels:
description: |
static properties.
in: body
required: true
type: object (inlined)
metric:
description: |
PerformanceMetric defined in ETSI PM interface.
in: body
required: true
type: string
object_instance_id:
description: |
objectInstanceId defined in ETSI PM interface.
in: body
required: true
type: string
perceived_severity:
description: |
perceivedSeverity value defined in ETSI FM interface.
in: body
required: true
type: string
pod:
description: |
Regex string that matches pods of Healing target.
For example, 'test\-test1\-[0-9a-f]{1,10}-[0-9a-z]{5}'
in: body
required: true
type: string
probable_cause:
description: |
probableCause defined in ETSI FM interface.
in: body
required: true
type: string
receiver_type:
description: |
must be "tacker".
in: body
required: true
type: string
startsAt:
description: |
alert firing time.
in: body
required: true
type: string
status:
description: |
'firing': alert is fired, 'resolved': alert is cleared.
in: body
required: true
type: String
sub_object_instance_id:
description: |
subObjectInstanceId defined in ETSI PM interface.
in: body
required: true
type: string
value:
description: |
aspectId of the scaling target.
in: body
required: true
type: number
vnf_instance_id:
description: |
Vnf Instance id.
in: body
required: true
type: string

View File

@ -0,0 +1,335 @@
# variables in header
alarm_id_path:
description: |
Identifier of this Alarm information element.
in: path
required: true
type: string
subscription_id_path:
description: |
Identifier of this subscription.
in: path
required: true
type: string
# variables in body
ack_state:
description: |
Acknowledgement state of the alarm. Permitted values: UNACKNOWLEDGED,
ACKNOWLEDGED.
in: body
required: true
type: string
alarm_acknowledged_time:
description: |
Time stamp indicating when the alarm was acknowledged. It shall be present
if the alarm has been acknowledged.
in: body
required: false
type: string
alarm_changed_time:
description: |
Time stamp indicating when the alarm was last changed. It shall be present
if the alarm has been updated.
in: body
required: false
type: string
alarm_cleared_time:
description: |
Time stamp indicating when the alarm was cleared. It shall be present if
the alarm has been cleared.
in: body
required: false
type: string
alarm_id:
description: |
Identifier of this Alarm information element.
in: body
required: true
type: string
alarm_links:
description: |
Links for this resource.
in: body
required: true
type: array
alarm_raised_time:
description: |
Time stamp indicating when the alarm is raised by the managed object.
in: body
required: true
type: string
alarm_self:
description: |
URI of this resource.
in: body
required: true
type: object
authentication:
description: |
Authentication parameters to configure the use of Authorization when
sending notifications corresponding to this subscription.
in: body
required: false
type: string
callback_uri:
description: |
The URI of the endpoint to send the notification to.
in: body
required: true
type: string
correlated_alarm_ids:
description: |
List of identifiers of other alarms correlated to this fault.
in: body
required: false
type: string
event_time:
description: |
Time stamp indicating when the fault was observed.
in: body
required: true
type: string
event_type:
description: |
Type of event.
in: body
required: true
type: object
fault_details:
description: |
Provides additional information about the fault.
in: body
required: false
type: string
fault_type:
description: |
Additional information to clarify the type of the fault.
in: body
required: false
type: string
faulty_resource:
description: |
Information that identifies the faulty resource instance and its managing
entity.
in: body
required: true
type: object
faulty_resource_id:
description: |
Identifier of the resource in the scope of the VIM or the resource provider.
in: body
required: true
type: string
faulty_resource_info:
description: |
The virtualised resources that are causing the VNF fault. Shall be present
if the alarm affects virtualised resources.
in: body
required: false
type: object
faulty_resource_provider_id:
description: |
Identifier of the entity responsible for the management of the resource.
This attribute shall only be supported and present when VNF-related
resource management in indirect mode is applicable. The identification
scheme is outside the scope of the present document.
in: body
required: false
type: string
faulty_resource_type:
description: |
Type of the faulty resource. COMPUTE: Virtual compute resource, STORAGE:
Virtual storage resource, NETWORK: Virtual network resource.
in: body
required: true
type: object
faulty_resource_vim_connection_id:
description: |
Identifier of the VIM connection to manage the resource. This attribute
shall only be supported and present if VNFrelated resource management in
direct mode is applicable. The applicable “VimConnectionInfo” structure,
which is referenced by vimConnectionId, can be obtained from the
“vimConnectionInfo” attribute of the “VnfInstance” structure.
in: body
required: false
type: string
faulty_resource_vim_level_resource_type:
description: |
Identifier of the resource in the scope of the VIM or the resource provider.
in: body
required: false
type: string
filter_event_types:
description: |
Match VNF alarms with an event type. COMMUNICATIONS_ALARM,
PROCESSING_ERROR_ALARM, ENVIRONMENTAL_ALARM, QOS_ALARM, EQUIPMENT_ALARM.
in: body
required: false
type: array
filter_faulty_resource_types:
description: |
Match VNF alarms with a faulty resource type. COMPUTE, STORAGE, NETWORK.
in: body
required: false
type: array
filter_notification_types:
description: |
Match particular notification types. Permitted values: AlarmNotification,
AlarmClearedNotification, AlarmListRebuiltNotification.
in: body
required: false
type: array
filter_perceived_severities:
description: |
Match VNF alarms with a perceived severity. CRITICAL,MAJOR,MINOR,WARNING,
INDETERMINATE,CLEARED.
in: body
required: false
type: array
filter_probable_causes:
description: |
Match VNF alarms with a probable cause listed in this attribute.
in: body
required: false
type: array
filter_subscription_filter:
description: |
Filter criteria to select VNF instances about which to notify.
in: body
required: false
type: object
fm_notification_filter:
description: |
Filter settings for this subscription, to define the subset of all
notifications this subscription relates to. A particular notification is
sent to the subscriber if the filter matches, or if there is no filter.
in: body
required: false
type: object
is_root_cause:
description: |
Attribute indicating if this fault is the root of other correlated alarms.
If true, then the alarms listed in the attribute “correlatedAlarmIds” are
caused by this fault.
in: body
required: true
type: bool
managed_object_id:
description: |
Identifier of the affected VNF instance.
in: body
required: true
type: string
object_instance:
description: |
Link to the resource representing the VNF instance to which the notified
alarm is correlated. Shall be present if the VNF instance information is
accessible as a resource.
in: body
required: false
type: object
perceived_severity:
description: |
Perceived severity of the managed object failure. CRITICAL,MAJOR,MINOR,
WARNING,INDETERMINATE,CLEARED.
in: body
required: true
type: object
probable_cause:
description: |
Information about the probable cause of the fault.
in: body
required: true
type: string
products_versions:
description: |
If present, match VNF instances that belong to VNF products with certain
versions and a certain product name, from one particular provider.
in: body
required: false
type: array
products_vnf_product_name:
description: |
Name of the VNF product to match.
in: body
required: true
type: string
subscription_filter_vnf_instance_ids:
description: |
If present, match VNF instances with an instance identifier listed in this
attribute.
in: body
required: false
type: array
subscription_filter_vnf_instance_names:
description: |
If present, match VNF instances with a VNF Instance Name listed in this
attribute.
in: body
required: false
type: array
subscription_filter_vnf_products_from_providers:
description: |
If present, match VNF instances that belong to VNF products from certain
providers.
in: body
required: false
type: array
subscription_filter_vnfd_ids:
description: |
If present, match VNF instances that were created based on a VNFD
identified by one of the vnfdId values listed in this attribute.
in: body
required: false
type: array
subscription_id:
description: |
Identifier of this subscription.
in: body
required: true
type: string
subscription_links:
description: |
Links for this resource.
in: body
required: true
type: array
subscription_self:
description: |
URI of this resource.
in: body
required: true
type: object
versions_vnf_software_version:
description: |
Software version to match.
in: body
required: true
type: object
versions_vnfd_versions:
description: |
Software version to match.
in: body
required: false
type: array
vnf_products_from_providers_vnf_products:
description: |
If present, match VNF instances that belong to VNF products from certain
providers.
in: body
required: false
type: array
vnf_products_from_providers_vnf_provider:
description: |
If present, match VNF instances that belong to VNF products from certain
providers.
in: body
required: true
type: string
vnfc_instance_ids:
description: |
Identifiers of the affected VNFC instances.
in: body
required: false
type: array

View File

@ -0,0 +1,292 @@
# variables in header
vnf_pm_job_id:
description: |
Identifier of this PM job.
in: path
required: true
type: string
vnf_pm_job_report_id:
description: |
Identifier of this PM job report.
in: path
required: true
type: string
# variables in body
authentication_auth_type:
description: |
Defines the types of Authentication/Authorization which
the API consumer is willing to accept when receiving a
notification.
Permitted values:
BASIC: In every HTTP request to the
notification endpoint, use HTTP Basic
authentication with the client credentials.
OAUTH2_CLIENT_CREDENTIALS: In every
HTTP request to the notification endpoint, use
an OAuth 2.0 bearer token, obtained using the
client credentials grant type.
TLS_CERT: Every HTTP request to the
notification endpoint is sent over a mutually
authenticated TLS session, i.e. not only the
server is authenticated, but also the client is
authenticated during the TLS tunnel setup.
in: body
required: true
type: array
authentication_params_basic:
description: |
Parameters for authentication/authorization using BASIC.
Shall be present if authType is "BASIC" and the
contained information has not been provisioned out of
band. Shall be absent otherwise.
in: body
required: false
type: object
authentication_params_oauth2_client_credentials:
description: |
Parameters for authentication/authorization using
OAUTH2_CLIENT_CREDENTIALS.
Shall be present if authType is
"OAUTH2_CLIENT_CREDENTIALS" and the contained
information has not been provisioned out of band.
Shall be absent otherwise.
in: body
required: false
type: object
criteria_collection_period:
description: |
Specifies the periodicity at which the API producer will collect
performance information. The unit shall be seconds.
in: body
required: true
type: integer
criteria_performance_metric:
description: |
This defines the types of performance metrics for the specified object
instances. At least one of the two attributes (performance metric or
group) shall be present.
in: body
required: false
type: array
criteria_performance_metric_group:
description: |
Group of performance metrics. A metric group is a pre-defined list of
metrics, known to the API producer that it can decompose to individual
metrics. At least one of the two attributes (performance metric or group)
shall be present.
in: body
required: false
type: array
criteria_reporting_boundary:
description: |
Identifies a time boundary after which the reporting will stop. The
boundary shall allow a single reporting as well as periodic reporting up
to the boundary(format:date-time).
in: body
required: false
type: string
criteria_reporting_period:
description: |
Specifies the periodicity at which the API producer will report to the API
consumer. about performance information. The unit shall be seconds. The
reportingPeriod should be equal to or a multiple of the collectionPeriod.
in: body
required: true
type: integer
links_objects:
description: |
Links to resources representing the measured object instances for which
performance information is collected. Shall be present if the measured
object instance information is accessible as a resource.
in: body
required: false
type: array
links_self:
description: |
URI of this resource.
in: body
required: true
type: object
params_oauth2_client_credentials_client_id:
description: |
Client identifier to be used in the access token request
of the OAuth 2.0 client credentials grant type. Shall be
present if it has not been provisioned out of band.
in: body
required: false
type: string
params_oauth2_client_credentials_client_password:
description: |
Client password to be used in the access token request
of the OAuth 2.0 client credentials grant type. Shall be
present if it has not been provisioned out of band.
in: body
required: false
type: string
params_oauth2_client_credentials_token_endpoint:
description: |
The token endpoint from which the access token can be
obtained. Shall be present if it has not been provisioned
out of band.
in: body
required: false
type: string
paramsBasic_password:
description: |
Password to be used in HTTP Basic authentication.
Shall be present if it has not been provisioned out of band.
in: body
required: false
type: string
paramsBasic_userName:
description: |
Username to be used in HTTP Basic authentication.
Shall be present if it has not been provisioned out of band.
in: body
required: false
type: string
performance_values_context:
description: |
Measurement context information related to the measured value.
in: body
required: false
type: key value pairs
performance_values_time_stamp:
description: |
Time stamp indicating when the data has been collected.
in: body
required: true
type: string
performance_values_value:
description: |
Value of the metric collected.
in: body
required: true
type: string
pm_job_links:
description: |
Links for this resource.
in: body
required: true
type: array
reports_expiry_time:
description: |
The time when the report will expire.
in: body
required: false
type: string
reports_file_size:
description: |
The size of the report file in bytes, if known.
in: body
required: false
type: integer
reports_href:
description: |
The URI where the report can be obtained.
in: body
required: true
type: string
reports_ready_time:
description: |
The time when the report was made available.
in: body
required: true
type: string
vnf_pm_job_create_callback_uri:
description: |
The URI of the endpoint to send the notification to.
in: body
required: true
type: string
vnf_pm_job_create_criteria:
description: |
Criteria of the collection of performance information.
in: body
required: true
type: object
vnf_pm_job_create_metadata:
description: |
This attribute provides the access information of Prometheus Server.
in: body
required: false
type: key value pairs
vnf_pm_job_create_object_instance_ids:
description: |
Identifiers of the measured object instances for which performance
information is requested to be collected.
in: body
required: true
type: array
vnf_pm_job_create_object_type:
description: |
Type of the measured object.
in: body
required: true
type: string
vnf_pm_job_create_request_authentication:
description: |
Authentication parameters to configure the use of Authorization when
sending notifications corresponding to this subscription.
in: body
required: false
type: object
vnf_pm_job_create_sub_object_instance_ids:
description: |
Identifiers of the measured object instances in case of a structured
measured object.
in: body
required: false
type: array
vnf_pm_job_report_entries:
description: |
List of performance information entries.
in: body
required: true
type: array
vnf_pm_job_report_entries_object_instance_id:
description: |
Identifier of the measured object instance for which the performance metric
is reported.
in: body
required: true
type: string
vnf_pm_job_report_entries_performance_metric:
description: |
Name of the metric collected.
in: body
required: true
type: string
vnf_pm_job_report_entries_performance_values:
description: |
List of performance values with associated timestamp.
in: body
required: true
type: array
vnf_pm_job_report_entries_sub_object_instance_id:
description: |
Identifier of the sub-object instance of the measured object instance for
which the performance metric is reported.
in: body
required: false
type: string
vnf_pm_job_reports:
description: |
Information about available reports collected by this PM job.
in: body
required: false
type: array
vnf_pm_job_response_id:
description: |
Identifier of this PM job.
in: body
required: true
type: string

View File

@ -0,0 +1,151 @@
.. -*- rst -*-
===========================
Prometheus Plugin Interface
===========================
This interface is used for notifying alert that is detected by
the External Monitoring Tool. The External Monitoring Tool is
Prometheus based Monitoring system.
The Prometheus Plugin has 3 functions:
- Alerting interface for ETSI NFV-SOL 002/003 based Performance Management.
- Alerting interface for ETSI NFV-SOL 002/003 based Fault Management.
- Alerting interface for Prometheus Plugin AutoScaling.
Alerting interface for ETSI NFV-SOL 002/003 based Performance Management
========================================================================
.. rest_method:: POST /pm_event
Alert Tacker when one or more Performance values are obtained.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 204
.. rest_status_code:: error status.yaml
- 400
- 404: prometheus_plugin_pm
Request Parameters
------------------
.. rest_parameters:: parameters_prometheus_plugin.yaml
- alert: alert
- \>status: status
- \>labels: labels
- \>\>receiver_type: receiver_type
- \>\>function_type: function_type_pm
- \>\>job_id: job_id
- \>\>object_instance_id: object_instance_id
- \>\>sub_object_instance_id: sub_object_instance_id
- \>\>metric: metric
- \>annotations: annotations
- \>\>value: value
- \>startsAt: startsAt
- \>endsAt: endsAt
- \>fingerprint: fingerprint
Request Example
---------------
.. literalinclude:: samples/prometheus_plugin/alert_pm.json
:language: javascript
Alerting interface for ETSI NFV-SOL 002/003 based Fault Management
==================================================================
.. rest_method:: POST /alert
Alert Tacker when one or more Fault event are obtained.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 204
.. rest_status_code:: error status.yaml
- 400
- 404: prometheus_plugin_fm
Request Parameters
------------------
.. rest_parameters:: parameters_prometheus_plugin.yaml
- alert: alert
- \>status: status
- \>labels: labels
- \>\>receiver_type: receiver_type
- \>\>function_type: function_type_fm
- \>\>vnf_instance_id: vnf_instance_id
- \>\>pod: pod
- \>\>perceived_severity: perceived_severity
- \>\>event_type: event_type
- \>annotations: annotations
- \>\>probable_cause: probable_cause
- \>\>fault_type: fault_type
- \>\>fault_details: fault_details
- \>startsAt: startsAt
- \>endsAt: endsAt
- \>fingerprint: fingerprint
Request Example
---------------
.. literalinclude:: samples/prometheus_plugin/alert_fm.json
:language: javascript
Alerting interface for Prometheus Plugin AutoScaling
====================================================
.. rest_method:: POST /alert
Alert Tacker when scaling should be performed.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 204
.. rest_status_code:: error status.yaml
- 400
- 404: prometheus_plugin_auto_scale
Request Parameters
------------------
.. rest_parameters:: parameters_prometheus_plugin.yaml
- alert: alert
- \>status: status
- \>labels: labels
- \>\>receiver_type: receiver_type
- \>\>function_type: function_type_auto_scale
- \>\>vnf_instance_id: vnf_instance_id
- \>\>auto_scale_type: auto_scale_type
- \>\>aspect_id: aspect_id
- \>annotations: annotations
- \>startsAt: startsAt
- \>endsAt: endsAt
- \>fingerprint: fingerprint
Request Example
---------------
.. literalinclude:: samples/prometheus_plugin/alert_auto_scale.json
:language: javascript

View File

@ -0,0 +1,9 @@
:tocdepth: 2
########################################################################
Prometheus Plugin Interface
########################################################################
.. rest_expand_all::
.. include:: prometheus_plugin.inc

View File

@ -0,0 +1,17 @@
{
"alerts": [{
"status": "firing",
"labels": {
"receiver_type": "tacker",
"function_type": "auto_scale",
"vnf_instance_id": "503e635e-dcd8-4fae-9939-279af4c528b1",
"auto_scale_type": "SCALE_OUT",
"aspect_id": "VDU1"
},
"annotations": {
},
"startsAt": "2022-06-21T23:47:36.453Z",
"endsAt": "0001-01-01T00:00:00Z",
"fingerprint": "5ef77f1f8a3ecb8d"
}]
}

View File

@ -0,0 +1,21 @@
{
"alerts": [{
"status": "firing",
"labels": {
"receiver_type": "tacker",
"function_type": "vnffm",
"vnf_instance_id": "503e635e-dcd8-4fae-9939-279af4c528b1",
"pod": "test\\-test1\\-[0-9a-f]{1,10}-[0-9a-z]{5}$",
"perceived_severity": "CRITICAL",
"event_type": "PROCESSING_ERROR_ALARM"
},
"annotations": {
"probable_cause": "Server is down.",
"fault_type": "Error",
"fault_details": "Fault detail"
},
"startsAt": "2022-06-21T23:47:36.453Z",
"endsAt": "0001-01-01T00:00:00Z",
"fingerprint": "5ef77f1f8a3ecb8d"
}]
}

View File

@ -0,0 +1,19 @@
{
"alerts": [{
"status": "firing",
"labels": {
"receiver_type": "tacker",
"function_type": "vnfpm",
"job_id": "64e46b0e-887a-4691-8d2b-aa3d7b157e2c",
"metric": "VCpuUsageMeanVnf.25b9b9d0-2461-4109-866e-a7767375415b",
"object_instance_id": "25b9b9d0-2461-4109-866e-a7767375415b",
"sub_object_instance_id": "85adebfa-d71c-49ab-9d39-d8dd7e393541"
},
"annotations": {
"value": 99
},
"startsAt": "2022-06-21T23:47:36.453Z",
"endsAt": "0001-01-01T00:00:00Z",
"fingerprint": "5ef77f1f8a3ecb8d"
}]
}

View File

@ -0,0 +1,57 @@
{
"filter": {
"vnfInstanceSubscriptionFilter": {
"vnfdIds": [
"dummy-vnfdId-1"
],
"vnfProductsFromProviders": [
{
"vnfProvider": "Company",
"vnfProducts": [
{
"vnfProductName": "Sample VNF",
"versions": [
{
"vnfSoftwareVersion": "1.0",
"vnfdVersions": ["1.0", "2.0"]
}
]
}
]
}
],
"vnfInstanceIds": [
"b0314420-0c9e-40e0-975e-4bf23b07d0c1"
],
"vnfInstanceNames": [
"test"
]
},
"notificationTypes": [
"AlarmNotification",
"AlarmClearedNotification"
],
"faultyResourceTypes": [
"COMPUTE"
],
"perceivedSeverities": [
"WARNING"
],
"eventTypes": [
"PROCESSING_ERROR_ALARM"
],
"probableCauses": [
"Process Terminated"
]
},
"callbackUri": "/nfvo/notify/alarm",
"authentication": {
"authType": [
"BASIC"
],
"paramsBasic": {
"password": "ubuntu",
"userName": "ubuntu"
}
}
}

View File

@ -0,0 +1,54 @@
{
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"filter": {
"vnfInstanceSubscriptionFilter": {
"vnfdIds": [
"dummy-vnfdId-1"
],
"vnfProductsFromProviders": [
{
"vnfProvider": "dummy-vnfProvider-1",
"vnfProducts": [
{
"vnfProductName": "dummy-vnfProductName-1-1",
"versions": [
{
"vnfSoftwareVersion": "1.0",
"vnfdVersions": ["1.0", "2.0"]
}
]
}
]
}
],
"vnfInstanceIds": [
"dummy-vnfInstanceId-1"
],
"vnfInstanceNames": [
"dummy-vnfInstanceName-1"
]
},
"notificationTypes": [
"AlarmNotification",
"AlarmClearedNotification"
],
"faultyResourceTypes": [
"COMPUTE"
],
"perceivedSeverities": [
"WARNING"
],
"eventTypes": [
"EQUIPMENT_ALARM"
],
"probableCauses": [
"The server cannot be connected."
]
},
"callbackUri": "/nfvo/notify/alarm",
"_links": {
"self": {
"href": "/vnffm/v1/subscriptions/78a39661-60a8-4824-b989-88c1b0c3534a"
}
}
}

View File

@ -0,0 +1,41 @@
[
{
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"managedObjectId": "c61314d0-f583-4ab3-a457-46426bce02d3",
"rootCauseFaultyResource": {
"faultyResource": {
"vimConnectionId": "0d57e928-86a4-4445-a4bd-1634edae73f3",
"resourceId": "4e6ccbe1-38ec-4b1b-a278-64de09ba01b3",
"vimLevelResourceType": "OS::Nova::Server"
},
"faultyResourceType": "COMPUTE"
},
"alarmRaisedTime": "2021-09-06T10:21:03Z",
"alarmChangedTime": "2021-09-06T10:21:03Z",
"alarmClearedTime": "2021-09-06T10:21:03Z",
"alarmAcknowledgedTime": "2021-09-06T10:21:03Z",
"ackState": "UNACKNOWLEDGED",
"perceivedSeverity": "WARNING",
"eventTime": "2021-09-06T10:21:03Z",
"eventType": "EQUIPMENT_ALARM",
"faultType": "Fault Type",
"probableCause": "The server cannot be connected.",
"isRootCause": false,
"correlatedAlarmIds": [
"c88b624e-e997-4b17-b674-10ca2bab62e0",
"c16d41fd-12e2-49a6-bb17-72faf702353f"
],
"faultDetails": [
"Fault",
"Details"
],
"_links": {
"self": {
"href": "/vnffm/v1/alarms/78a39661-60a8-4824-b989-88c1b0c3534a"
},
"objectInstance": {
"href": "/vnflcm/v1/vnf_instances/0e5f3086-4e79-47ed-a694-54c29155fa26"
}
}
}
]

View File

@ -0,0 +1,56 @@
[
{
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"filter": {
"vnfInstanceSubscriptionFilter": {
"vnfdIds": [
"dummy-vnfdId-1"
],
"vnfProductsFromProviders": [
{
"vnfProvider": "dummy-vnfProvider-1",
"vnfProducts": [
{
"vnfProductName": "dummy-vnfProductName-1-1",
"versions": [
{
"vnfSoftwareVersion": "1.0",
"vnfdVersions": ["1.0", "2.0"]
}
]
}
]
}
],
"vnfInstanceIds": [
"dummy-vnfInstanceId-1"
],
"vnfInstanceNames": [
"dummy-vnfInstanceName-1"
]
},
"notificationTypes": [
"AlarmNotification",
"AlarmClearedNotification"
],
"faultyResourceTypes": [
"COMPUTE"
],
"perceivedSeverities": [
"WARNING"
],
"eventTypes": [
"EQUIPMENT_ALARM"
],
"probableCauses": [
"The server cannot be connected."
]
},
"callbackUri": "/nfvo/notify/alarm",
"_links": {
"self": {
"href": "/vnffm/v1/subscriptions/78a39661-60a8-4824-b989-88c1b0c3534a"
}
}
}
]

View File

@ -0,0 +1,3 @@
{
"ackState": "ACKNOWLEDGED"
}

View File

@ -0,0 +1,3 @@
{
"ackState": "ACKNOWLEDGED"
}

View File

@ -0,0 +1,39 @@
{
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"managedObjectId": "c61314d0-f583-4ab3-a457-46426bce02d3",
"rootCauseFaultyResource": {
"faultyResource": {
"vimConnectionId": "0d57e928-86a4-4445-a4bd-1634edae73f3",
"resourceId": "4e6ccbe1-38ec-4b1b-a278-64de09ba01b3",
"vimLevelResourceType": "OS::Nova::Server"
},
"faultyResourceType": "COMPUTE"
},
"alarmRaisedTime": "2021-09-06T10:21:03Z",
"alarmChangedTime": "2021-09-06T10:21:03Z",
"alarmClearedTime": "2021-09-06T10:21:03Z",
"alarmAcknowledgedTime": "2021-09-06T10:21:03Z",
"ackState": "UNACKNOWLEDGED",
"perceivedSeverity": "WARNING",
"eventTime": "2021-09-06T10:21:03Z",
"eventType": "EQUIPMENT_ALARM",
"faultType": "Fault Type",
"probableCause": "The server cannot be connected.",
"isRootCause": false,
"correlatedAlarmIds": [
"c88b624e-e997-4b17-b674-10ca2bab62e0",
"c16d41fd-12e2-49a6-bb17-72faf702353f"
],
"faultDetails": [
"Fault",
"Details"
],
"_links": {
"self": {
"href": "/vnffm/v1/alarms/78a39661-60a8-4824-b989-88c1b0c3534a"
},
"objectInstance": {
"href": "/vnflcm/v1/vnf_instances/0e5f3086-4e79-47ed-a694-54c29155fa26"
}
}
}

View File

@ -0,0 +1,54 @@
{
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"filter": {
"vnfInstanceSubscriptionFilter": {
"vnfdIds": [
"dummy-vnfdId-1"
],
"vnfProductsFromProviders": [
{
"vnfProvider": "dummy-vnfProvider-1",
"vnfProducts": [
{
"vnfProductName": "dummy-vnfProductName-1-1",
"versions": [
{
"vnfSoftwareVersion": "1.0",
"vnfdVersions": ["1.0", "2.0"]
}
]
}
]
}
],
"vnfInstanceIds": [
"dummy-vnfInstanceId-1"
],
"vnfInstanceNames": [
"dummy-vnfInstanceName-1"
]
},
"notificationTypes": [
"AlarmNotification",
"AlarmClearedNotification"
],
"faultyResourceTypes": [
"COMPUTE"
],
"perceivedSeverities": [
"WARNING"
],
"eventTypes": [
"EQUIPMENT_ALARM"
],
"probableCauses": [
"The server cannot be connected."
]
},
"callbackUri": "/nfvo/notify/alarm",
"_links": {
"self": {
"href": "/vnffm/v1/subscriptions/78a39661-60a8-4824-b989-88c1b0c3534a"
}
}
}

View File

@ -0,0 +1,49 @@
{
"objectType": "Vnf",
"objectInstanceIds": ["da459819-a2eb-442b-b9a2-0c1c02466baf"],
"subObjectInstanceIds": [],
"criteria": {
"performanceMetric": [
"VCpuUsageMeanVnf.25b9b9d0-2461-4109-866e-a7767375415b"],
"performanceMetricGroup": ["VirtualisedComputeResource"],
"collectionPeriod": 5,
"reportingPeriod": 10,
"reportingBoundary": "2022-08-05T02:24:46Z"
},
"callbackUri": "http://localhost:9990/notification/callback/callbackUri",
"authentication": {
"authType": [
"BASIC"
],
"paramsBasic": {
"password": "ubuntu",
"userName": "ubuntu"
}
},
"metadata": {
"monitor": {
"monitorName": "prometheus",
"driverType": "external",
"targetsInfo": [
{
"prometheusHost": "prometheus.example",
"alertmanagerHost": "prometheus.example",
"authInfo": {
"ssh_username": "ubuntu",
"ssh_password": "ubuntu"
},
"metricsEndpointConfigPath":
"/etc/prometheus/prometheus.yml",
"alertRuleConfigPath":
"/etc/prometheus/rules/tacker-rule.yml",
"receiverConfigPath":
"/etc/prometheus/alertmanager.yml",
"prometheusReloadApiEndpoint":
"http://localhost:9990/-/reload",
"alertmanagerReloadApiEndpoint":
"http://prometheus.example:9093/-/reload"
}
]
}
}
}

View File

@ -0,0 +1,20 @@
{
"id": "aa474574-a2eb-442b-b9a2-0c1c02466baf",
"objectType": "Vnf",
"objectInstanceIds": ["da459819-a2eb-442b-b9a2-0c1c02466baf"],
"criteria": {
"performanceMetric": [
"VCpuUsageMeanVnf.25b9b9d0-2461-4109-866e-a7767375415b"
],
"performanceMetricGroup": [
"VirtualisedComputeResource"
],
"collectionPeriod": 5,
"reportingPeriod": 10,
"reportingBoundary": "2022-08-05T02:24:46Z"
},
"callbackUri":"http://127.0.0.1/",
"_links": {
"href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/aa474574-a2eb-442b-b9a2-0c1c02466baf"
},
}

View File

@ -0,0 +1,22 @@
[
{
"id": "aa474574-a2eb-442b-b9a2-0c1c02466baf",
"objectType": "Vnf",
"objectInstanceIds": ["da459819-a2eb-442b-b9a2-0c1c02466baf"],
"criteria": {
"performanceMetric": [
"VCpuUsageMeanVnf.25b9b9d0-2461-4109-866e-a7767375415b"
],
"performanceMetricGroup": [
"VirtualisedComputeResource"
],
"collectionPeriod": 5,
"reportingPeriod": 10,
"reportingBoundary": "2022-08-05T02:24:46Z"
},
"callbackUri":"http://127.0.0.1/",
"_links": {
"href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/aa474574-a2eb-442b-b9a2-0c1c02466baf"
}
}
]

View File

@ -0,0 +1,12 @@
[
{
"objectType": "Vnf",
"objectInstanceId": "da459819-a2eb-442b-b9a2-0c1c02466baf",
"performanceMetric": "VCpuUsageMeanVnf.25b9b9d0-2461-4109-866e-a7767375415b",
"performanceValues": {
"timeStamp": "2022-08-05T02:24:46Z",
"value": "value_test",
"context": "{'test': 'test'}"
}
}
]

View File

@ -0,0 +1,20 @@
{
"id": "aa474574-a2eb-442b-b9a2-0c1c02466baf",
"objectType": "Vnf",
"objectInstanceIds": ["da459819-a2eb-442b-b9a2-0c1c02466baf"],
"criteria": {
"performanceMetric": [
"VCpuUsageMeanVnf.25b9b9d0-2461-4109-866e-a7767375415b"
],
"performanceMetricGroup": [
"VirtualisedComputeResource"
],
"collectionPeriod": 5,
"reportingPeriod": 10,
"reportingBoundary": "2022-08-05T02:24:46Z"
},
"callbackUri":"http://127.0.0.1/",
"_links": {
"href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/aa474574-a2eb-442b-b9a2-0c1c02466baf"
}
}

View File

@ -0,0 +1,3 @@
{
"callbackUri": "http://localhost:9990/notification/callback/callbackUri"
}

View File

@ -0,0 +1,3 @@
{
"callbackUri": "http://localhost:9990/notification/callback/callbackUri"
}

View File

@ -55,6 +55,15 @@
fault_notification: |
The fault notification API is not enabled.
(CONF.server_notification.server_notification)
prometheus_plugin_pm: |
The Prometheus Plugin API is not enabled.
(CONF.prometheus_plugin.performance_management)
prometheus_plugin_fm: |
The Prometheus Plugin API is not enabled.
(CONF.prometheus_plugin.fault_management)
prometheus_plugin_auto_scale: |
The Prometheus Plugin API is not enabled.
(CONF.prometheus_plugin.auto_scaling)
405:
default: |
Method is not valid for this endpoint.
@ -77,9 +86,9 @@
If-Range request-header field.
422:
default: |
The content type of the payload body is supported and the payload body of a
request contains syntactically correct data (e.g. well-formed JSON) but the data
cannot be processed (e.g. because it fails validation against a schema).
The content type of the payload body is supported and the payload body of a
request contains syntactically correct data (e.g. well-formed JSON) but the
data cannot be processed (e.g. because it fails validation against a schema).
500:
default: |
Something went wrong inside the service. This should not happen usually.

474
api-ref/source/v2/vnffm.inc Normal file
View File

@ -0,0 +1,474 @@
.. -*- rst -*-
================================================================
Virtualized Network Function Fault Management Interface (VNF FM)
================================================================
This interface manages the VNF fault management operations of VNF instances.
This interface allows the NFVO to invoke VNF fault management operations of
VNF instances towards the VNFM. The detail of this interface is described in
SOL002 v3.3.1 clause 7. The parameters of some specific standards need
reference SOL013 v3.4.1 clause 5.
Get all alarms (v1)
===================
.. rest_method:: GET /vnffm/v1/alarms
The GET method gets all alarms, Allow users to filter out alarms based on query
parameter in the request.
If the API consumer intends to query all alarms, it sends a GET request to the
"Alarms" resource.The VNFM returns a "200 OK" response to the API consumer, and
includes zero or more data structures of type "Alarm" in the payload body.
An attribute selector allows the API consumer to choose which attributes it
wants to be contained in the response. *all_fields*, *fields*, *exclude_fields*
and *exclude_default* can be set as query parameters.
Attribute-based filtering expression. The following attribute names shall be
supported by the Tacker in the attribute-based filtering expression: id,
managedObjectId, rootCauseFaultyResource/faultyResourceType, eventType,
perceivedSeverity, probableCause.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 406
Response Parameters
-------------------
.. rest_parameters:: parameters_vnffm.yaml
- id: alarm_id
- managedObjectId: managed_object_id
- vnfcInstanceIds: vnfc_instance_ids
- rootCauseFaultyResource: faulty_resource_info
- faultyResource: faulty_resource
- vimConnectionId: faulty_resource_vim_connection_id
- resourceProviderId: faulty_resource_provider_id
- resourceId: faulty_resource_id
- vimLevelResourceType: faulty_resource_vim_level_resource_type
- faultyResourceType: faulty_resource_type
- alarmRaisedTime: alarm_raised_time
- alarmChangedTime: alarm_changed_time
- alarmClearedTime: alarm_cleared_time
- alarmAcknowledgedTime: alarm_acknowledged_time
- ackState: ack_state
- perceivedSeverity: perceived_severity
- eventTime: event_time
- eventType: event_type
- faultType: fault_type
- probableCause: probable_cause
- isRootCause: is_root_cause
- correlatedAlarmIds: correlated_alarm_ids
- faultDetails: fault_details
- _links: alarm_links
- self: alarm_self
- objectInstance: object_instance
Response Example
----------------
.. literalinclude:: samples/vnffm/list-vnffm-alarm-response.json
:language: javascript
Get the individual alarm (v1)
=============================
.. rest_method:: GET /vnffm/v1/alarms/{alarmId}
The GET method gets the alarm specified in the Tacker.
If the API consumer intends to read a particular alarm, it sends a GET request
to the "Individual alarm" resource, addressed by the appropriate alarm
identifier in its resource URI. In case of failure, appropriate error
information is provided in the response.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
- 406
Request Parameters
------------------
.. rest_parameters:: parameters_vnffm.yaml
- alarmId: alarm_id_path
Response Parameters
-------------------
.. rest_parameters:: parameters_vnffm.yaml
- id: alarm_id
- managedObjectId: managed_object_id
- vnfcInstanceIds: vnfc_instance_ids
- rootCauseFaultyResource: faulty_resource_info
- faultyResource: faulty_resource
- vimConnectionId: faulty_resource_vim_connection_id
- resourceProviderId: faulty_resource_provider_id
- resourceId: faulty_resource_id
- vimLevelResourceType: faulty_resource_vim_level_resource_type
- faultyResourceType: faulty_resource_type
- alarmRaisedTime: alarm_raised_time
- alarmChangedTime: alarm_changed_time
- alarmClearedTime: alarm_cleared_time
- alarmAcknowledgedTime: alarm_acknowledged_time
- ackState: ack_state
- perceivedSeverity: perceived_severity
- eventTime: event_time
- eventType: event_type
- faultType: fault_type
- probableCause: probable_cause
- isRootCause: is_root_cause
- correlatedAlarmIds: correlated_alarm_ids
- faultDetails: fault_details
- _links: alarm_links
- self: alarm_self
- objectInstance: object_instance
Response Example
----------------
.. literalinclude:: samples/vnffm/show-vnffm-alarm-response.json
:language: javascript
Modify the confirmation status (v1)
===================================
.. rest_method:: PATCH /vnffm/v1/alarms/{alarmId}
The PATCH method modifies the confirmation status of the alarm specified in the
Tacker.
The API consumer sends a PATCH request to the individual alarm. The VNFM
returns a "200 OK" response to the API consumer, and includes a data structure
of type "AlarmModifications" in the payload body. In case of failure,
appropriate error information is provided in the response.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
- 406
- 409
Request Parameters
------------------
.. rest_parameters:: parameters_vnffm.yaml
- alarmId: alarm_id_path
- ackState: ack_state
Request Example
---------------
.. literalinclude:: samples/vnffm/modify-vnffm-alarm-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters_vnffm.yaml
- ackState: ack_state
Response Example
----------------
.. literalinclude:: samples/vnffm/modify-vnffm-alarm-response.json
:language: javascript
Create a subscription (v1)
==========================
.. rest_method:: POST /vnffm/v1/subscriptions
The POST method creates a new VNF FM-Subscription.
As the result of successfully executing this method, a new VNF FM-Subscription
shall have been created, and return detailed FM subscription data. In case of
failure, including an invalid notification endpoint, appropriate error
information is provided in the response.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 201
.. rest_status_code:: error status.yaml
- 400
- 401
- 406
- 422
Request Parameters
------------------
.. rest_parameters:: parameters_vnffm.yaml
- filter: fm_notification_filter
- vnfInstanceSubscriptionFilter: filter_subscription_filter
- vnfdIds: subscription_filter_vnfd_ids
- vnfProductsFromProviders: subscription_filter_vnf_products_from_providers
- vnfProvider: vnf_products_from_providers_vnf_provider
- vnfProducts: vnf_products_from_providers_vnf_products
- vnfProductName: products_vnf_product_name
- versions: products_versions
- vnfSoftwareVersion: versions_vnf_software_version
- vnfdVersions: versions_vnfd_versions
- vnfInstanceIds: subscription_filter_vnf_instance_ids
- vnfInstanceNames: subscription_filter_vnf_instance_names
- notificationTypes: filter_notification_types
- faultyResourceTypes: filter_faulty_resource_types
- perceivedSeverities: filter_perceived_severities
- eventTypes: filter_event_types
- probableCauses: filter_probable_causes
- callbackUri: callback_uri
- authentication: authentication
Request Example
---------------
.. literalinclude:: samples/vnffm/create-vnffm-subscription-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters_vnffm.yaml
- id: subscription_id
- filter: fm_notification_filter
- vnfInstanceSubscriptionFilter: filter_subscription_filter
- vnfdIds: subscription_filter_vnfd_ids
- vnfProductsFromProviders: subscription_filter_vnf_products_from_providers
- vnfProvider: vnf_products_from_providers_vnf_provider
- vnfProducts: vnf_products_from_providers_vnf_products
- vnfProductName: products_vnf_product_name
- versions: products_versions
- vnfSoftwareVersion: versions_vnf_software_version
- vnfdVersions: versions_vnfd_versions
- vnfInstanceIds: subscription_filter_vnf_instance_ids
- vnfInstanceNames: subscription_filter_vnf_instance_names
- notificationTypes: filter_notification_types
- faultyResourceTypes: filter_faulty_resource_types
- perceivedSeverities: filter_perceived_severities
- eventTypes: filter_event_types
- probableCauses: filter_probable_causes
- callbackUri: callback_uri
- _links: subscription_links
- self: subscription_self
Response Example
----------------
.. literalinclude:: samples/vnffm/create-vnffm-subscription-response.json
:language: javascript
Get all subscriptions (v1)
==========================
.. rest_method:: GET /vnffm/v1/subscriptions
The GET method allows users to filter out subscriptions based on query parameter
in the request.
If desired, e.g. to recover from an error situation, the API consumer can query
information about its subscriptions by sending a GET request to the
"Subscriptions" resource. In that case, the VNFM returns a "200 OK" response
that contains the list of representations of all existing subscriptions that
were created by the API consumer.
An attribute selector allows the API consumer to choose which attributes it
wants to be contained in the response. *all_fields*, *fields*, *exclude_fields*
and *exclude_default* can be set as query parameters.
Attribute-based filtering expression. The following attribute names shall be
supported by the Tacker in the attribute-based filtering expression. All
attribute names that appear in the FmSubscription and in data types referenced
from it shall be supported by the VNFM in the filter expression. For example,
below URI query parameter will match alarms with perceivedSeverity=WARNING
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
- 406
- 409
Response Parameters
-------------------
.. rest_parameters:: parameters_vnffm.yaml
- id: subscription_id
- filter: fm_notification_filter
- vnfInstanceSubscriptionFilter: filter_subscription_filter
- vnfdIds: subscription_filter_vnfd_ids
- vnfProductsFromProviders: subscription_filter_vnf_products_from_providers
- vnfProvider: vnf_products_from_providers_vnf_provider
- vnfProducts: vnf_products_from_providers_vnf_products
- vnfProductName: products_vnf_product_name
- versions: products_versions
- vnfSoftwareVersion: versions_vnf_software_version
- vnfdVersions: versions_vnfd_versions
- vnfInstanceIds: subscription_filter_vnf_instance_ids
- vnfInstanceNames: subscription_filter_vnf_instance_names
- notificationTypes: filter_notification_types
- faultyResourceTypes: filter_faulty_resource_types
- perceivedSeverities: filter_perceived_severities
- eventTypes: filter_event_types
- probableCauses: filter_probable_causes
- callbackUri: callback_uri
- _links: subscription_links
- self: subscription_self
Response Example
----------------
.. literalinclude:: samples/vnffm/list-vnffm-subscription-response.json
:language: javascript
Get a subscription (v1)
=======================
.. rest_method:: GET /vnffm/v1/subscriptions/{subscriptionId}
The POST method gets the subscription in the Tacker.
If desired, e.g. to recover from an error situation, the API consumer can read
information about a particular subscription by sending a GET request to the
resource representing that individual subscription. In that case, the VNFM
returns a "200 OK" response that contains a representation of that individual
subscription.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
- 406
Request Parameters
------------------
.. rest_parameters:: parameters_vnffm.yaml
- subscriptionId: subscription_id_path
Response Parameters
-------------------
.. rest_parameters:: parameters_vnffm.yaml
- id: subscription_id
- filter: fm_notification_filter
- vnfInstanceSubscriptionFilter: filter_subscription_filter
- vnfdIds: subscription_filter_vnfd_ids
- vnfProductsFromProviders: subscription_filter_vnf_products_from_providers
- vnfProvider: vnf_products_from_providers_vnf_provider
- vnfProducts: vnf_products_from_providers_vnf_products
- vnfProductName: products_vnf_product_name
- versions: products_versions
- vnfSoftwareVersion: versions_vnf_software_version
- vnfdVersions: versions_vnfd_versions
- vnfInstanceIds: subscription_filter_vnf_instance_ids
- vnfInstanceNames: subscription_filter_vnf_instance_names
- notificationTypes: filter_notification_types
- faultyResourceTypes: filter_faulty_resource_types
- perceivedSeverities: filter_perceived_severities
- eventTypes: filter_event_types
- probableCauses: filter_probable_causes
- callbackUri: callback_uri
- _links: subscription_links
- self: subscription_self
Request Example
---------------
.. literalinclude:: samples/vnffm/show-vnffm-subscription-response.json
:language: javascript
Delete a subscription (v1)
==========================
.. rest_method:: DELETE /vnffm/v1/subscriptions/{subscriptionId}
The DELETE method deletes the subscription in the Tacker
When the API consumer does not need the subscription anymore, it terminates the
subscription by sending a DELETE request to the resource that represents the
individual subscription. The VNFM acknowledges the successful termination of
the subscription by returning a "204 No Content" response.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 204
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
- 406
- 409
Request Parameters
------------------
.. rest_parameters:: parameters_vnffm.yaml
- subscriptionId: subscription_id_path

View File

@ -0,0 +1,9 @@
:tocdepth: 2
###################################################################
Virtualized Network Function Fault Management Interface (VNF FM) v1
###################################################################
.. rest_expand_all::
.. include:: vnffm.inc

382
api-ref/source/v2/vnfpm.inc Normal file
View File

@ -0,0 +1,382 @@
.. -*- rst -*-
======================================================================
Virtualized Network Function Performance Management Interface (VNF PM)
======================================================================
This interface manages the VNF performance management operations of VNF
instances.
This interface allows providing performance management (measurement results
collection and notifications) related to VNFs. The detail of this interface
is described in SOL002 v3.3.1 clause 6. The parameters of some specific
standards need reference SOL013 v3.4.1 clause 5.
Create a PM job (v2)
====================
.. rest_method:: POST /vnfpm/v2/pm_jobs
The POST method creates a new PM job. PM jobs group details of performance
collection and reporting information.
As the result of successfully executing this method, a new PM job shall have
been created, and return detailed PM job data. In case of failure, including
an invalid notification endpoint, appropriate error information is provided in
the response.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 201
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
- 406
- 409
- 422
- 503
Request Parameters
------------------
.. rest_parameters:: parameters_vnfpm.yaml
- objectType: vnf_pm_job_create_object_type
- objectInstanceIds: vnf_pm_job_create_object_instance_ids
- subObjectInstanceIds: vnf_pm_job_create_sub_object_instance_ids
- criteria: vnf_pm_job_create_criteria
- performanceMetric: criteria_performance_metric
- performanceMetricGroup: criteria_performance_metric_group
- collectionPeriod: criteria_collection_period
- reportingPeriod: criteria_reporting_period
- reportingBoundary: criteria_reporting_boundary
- callbackUri: vnf_pm_job_create_callback_uri
- authentication: vnf_pm_job_create_request_authentication
- authType: authentication_auth_type
- paramsBasic: authentication_params_basic
- userName: paramsBasic_userName
- password: paramsBasic_password
- paramsOauth2ClientCredentials: authentication_params_oauth2_client_credentials
- clientId: params_oauth2_client_credentials_client_id
- clientPassword: params_oauth2_client_credentials_client_password
- tokenEndpoint: params_oauth2_client_credentials_token_endpoint
- metadata: vnf_pm_job_create_metadata
Request Example
---------------
.. literalinclude:: samples/vnfpm/create-pm-job-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters_vnfpm.yaml
- id: vnf_pm_job_response_id
- objectType: vnf_pm_job_create_object_type
- objectInstanceIds: vnf_pm_job_create_object_instance_ids
- subObjectInstanceIds: vnf_pm_job_create_sub_object_instance_ids
- criteria: vnf_pm_job_create_criteria
- performanceMetric: criteria_performance_metric
- performanceMetricGroup: criteria_performance_metric_group
- collectionPeriod: criteria_collection_period
- reportingPeriod: criteria_reporting_period
- reportingBoundary: criteria_reporting_boundary
- callbackUri: vnf_pm_job_create_callback_uri
- reports: vnf_pm_job_reports
- href: reports_href
- readyTime: reports_ready_time
- expiryTime: reports_expiry_time
- fileSize: reports_file_size
- _links: pm_job_links
- self: links_self
- objects: links_objects
Response Example
----------------
.. literalinclude:: samples/vnfpm/create-pm-job-response.json
:language: javascript
Get for PM jobs (v2)
====================
.. rest_method:: GET /vnfpm/v2/pm_jobs
The GET method allows users to filter out PM jobs based on query parameter in
the request.
It supports attribute-based filtering and attribute selectors defined in ETSI
NFV SOL013 v3.4.1. The detail of attribute-based filtering is described in
SOL013 v3.4.1 clause 5.2. The detail of attribute selectors is described in
SOL013 v3.4.1 clause 5.3.
An attribute selector allows the API consumer to choose which attributes it
wants to be contained in the response. *all_fields*, *fields*, *exclude_fields*
and *exclude_default* can be set as query parameters.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 406
- 409
Response Parameters
-------------------
.. rest_parameters:: parameters_vnfpm.yaml
- id: vnf_pm_job_response_id
- objectType: vnf_pm_job_create_object_type
- objectInstanceIds: vnf_pm_job_create_object_instance_ids
- subObjectInstanceIds: vnf_pm_job_create_sub_object_instance_ids
- criteria: vnf_pm_job_create_criteria
- performanceMetric: criteria_performance_metric
- performanceMetricGroup: criteria_performance_metric_group
- collectionPeriod: criteria_collection_period
- reportingPeriod: criteria_reporting_period
- reportingBoundary: criteria_reporting_boundary
- callbackUri: vnf_pm_job_create_callback_uri
- reports: vnf_pm_job_reports
- href: reports_href
- readyTime: reports_ready_time
- expiryTime: reports_expiry_time
- fileSize: reports_file_size
- _links: pm_job_links
- self: links_self
- objects: links_objects
Response Example
----------------
.. literalinclude:: samples/vnfpm/list-pm-job-response.json
:language: javascript
Get a PM job (v2)
=================
.. rest_method:: GET /vnfpm/v2/pm_jobs/{pmJobId}
The GET method gets an individual PM job.
If the API consumer intends to read information about a particular PM job,
it sends a GET request to the "Individual PM job" resource, addressed by the
appropriate PM job identifier in its resource URI. The VNFM returns a "200 OK"
response to the API consumer, and includes one data structure of type "PmJob"
in the payload body. In case of failure, appropriate error information is
provided in the response.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
Request Parameters
------------------
.. rest_parameters:: parameters_vnfpm.yaml
- pmJobId: vnf_pm_job_id
Response Parameters
-------------------
.. rest_parameters:: parameters_vnfpm.yaml
- id: vnf_pm_job_response_id
- objectType: vnf_pm_job_create_object_type
- objectInstanceIds: vnf_pm_job_create_object_instance_ids
- subObjectInstanceIds: vnf_pm_job_create_sub_object_instance_ids
- criteria: vnf_pm_job_create_criteria
- performanceMetric: criteria_performance_metric
- performanceMetricGroup: criteria_performance_metric_group
- collectionPeriod: criteria_collection_period
- reportingPeriod: criteria_reporting_period
- reportingBoundary: criteria_reporting_boundary
- callbackUri: vnf_pm_job_create_callback_uri
- reports: vnf_pm_job_reports
- href: reports_href
- readyTime: reports_ready_time
- expiryTime: reports_expiry_time
- fileSize: reports_file_size
- _links: pm_job_links
- self: links_self
- objects: links_objects
Response Example
----------------
.. literalinclude:: samples/vnfpm/show-pm-job-response.json
:language: javascript
Modify a PM job(v2)
===================
.. rest_method:: PATCH /vnfpm/v2/pm_jobs/{pmJobId}
The PATCH method Modifies a PM job.
If the API consumer intends to update the callback URI in a PM job, it sends
a PATCH request to the "Individual PM job" resource, including a data
structure of type "PmJobModifications" in the payload body. The VNFM returns
a "200 OK" response to the API consumer and includes in the payload body a data
structure of type "PmJobModifications" to indicate the performed modifications.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 422
Request Parameters
------------------
.. rest_parameters:: parameters_vnfpm.yaml
- pmJobId: vnf_pm_job_id
- callbackUri: vnf_pm_job_create_callback_uri
- authentication: vnf_pm_job_create_request_authentication
- authType: authentication_auth_type
- paramsBasic: authentication_params_basic
- userName: paramsBasic_userName
- password: paramsBasic_password
- paramsOauth2ClientCredentials: authentication_params_oauth2_client_credentials
- clientId: params_oauth2_client_credentials_client_id
- clientPassword: params_oauth2_client_credentials_client_password
- tokenEndpoint: params_oauth2_client_credentials_token_endpoint
Request Example
---------------
.. literalinclude:: samples/vnfpm/update-pm-job-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters_vnfpm.yaml
- callbackUri: vnf_pm_job_create_callback_uri
Response Example
----------------
.. literalinclude:: samples/vnfpm/update-pm-job-response.json
:language: javascript
Delete a PM job (v2)
====================
.. rest_method:: DELETE /vnfpm/v2/pm_jobs/{pmJobId}
The DELETE method deletes a PM job.
If the API consumer intends to delete a PM job, it sends a DELETE request to
the "Individual PM job" resource addressed by the appropriate PM job identifier
in its resource URI. The VNFM returns a response with a "204 No Content"
response code and an empty payload body to the API consumer.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 204
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
Request Parameters
------------------
.. rest_parameters:: parameters_vnfpm.yaml
- pmJobId: vnf_pm_job_id
Get individual performance report (v2)
======================================
.. rest_method:: GET /vnfpm/v2/pm_jobs/{pmJobId}/reports/{reportId}
The GET method gets individual performance report.
The API consumer sends to the VNFM a GET request to the URI , in order to read
an "Individual performance report" resource. The VNFM returns a "200 OK"
response to the API consumer, and includes a data structure of type
"PerformanceReport" in the payload body.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 404
Request Parameters
------------------
.. rest_parameters:: parameters_vnfpm.yaml
- pmJobId: vnf_pm_job_id
- reportId: vnf_pm_job_report_id
Response Parameters
-------------------
.. rest_parameters:: parameters_vnfpm.yaml
- entries: vnf_pm_job_report_entries
- objectType: vnf_pm_job_create_object_type
- objectInstanceId: vnf_pm_job_report_entries_object_instance_id
- subObjectInstanceId: vnf_pm_job_report_entries_sub_object_instance_id
- performanceMetric: vnf_pm_job_report_entries_performance_metric
- performanceValues: vnf_pm_job_report_entries_performance_values
- timeStamp: performance_values_time_stamp
- value: performance_values_value
- context: performance_values_context
Response Example
----------------
.. literalinclude:: samples/vnfpm/show-pm-job-report-response.json
:language: javascript

View File

@ -0,0 +1,9 @@
:tocdepth: 2
#########################################################################
Virtualized Network Function Performance Management Interface (VNF PM) v2
#########################################################################
.. rest_expand_all::
.. include:: vnfpm.inc

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -0,0 +1,45 @@
@startuml
frame "Prometheus" {
component "Prometheus" as prom
}
frame "NFVO" {
component "NFVO" as nfvo
}
frame "tacker" {
component "tacker-server" {
component "VnffmControllerV2" as fm_ctl
component "PrometheusPlugin" as plugin
component "VnflcmControllerV2" as lcm_ctl
}
component "tacker-conductor" {
component "Vnffm\ndriver" as fm_driver
component "Kubernetes\ninfra-driver" as infra
}
}
node "Kubernetes Cluster\n(Master)" as k8s_m
cloud "Hardware Resources" as hw {
node "Kubernetes Cluster\n(Worker)" as k8s_w {
node "Pod" as ins1
node "Pod" as ins2
}
}
'# Relationships
nfvo --> fm_ctl: 1. Create subscription\n(Notification Mode)
ins1 --> prom: 2. Collect metrics
prom --> plugin: 3. POST alert
plugin --> fm_driver: 4. Convert alert to alarm
nfvo --> fm_ctl: 5. Get Alarms\n(Polling Mode)
fm_driver --> nfvo: 6. Send alarm notification\n(Notification Mode)
nfvo --> lcm_ctl: 7. Heal
lcm_ctl --> infra
infra --> k8s_m: 8. Call Kubernetes API
k8s_m --> ins2: 9. Create a new pod
k8s_m --> ins1: 10. Delete the old pod
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@ -0,0 +1,47 @@
@startuml
frame "Prometheus" {
component "Prometheus" as prom
}
frame "NFVO" {
component "NFVO" as nfvo
}
frame "tacker" {
component "tacker-server" {
component "VnfpmControllerV2" as pm_ctl
component "PrometheusPlugin" as plugin
component "VnflcmControllerV2" as lcm_ctl
}
component "tacker-conductor" {
component "Vnfpm\ndriver" as pm_driver
component "Kubernetes\ninfra-driver" as infra
}
}
node "Kubernetes Cluster\n(Master)" as k8s_m
cloud "Hardware Resources" as hw {
node "Kubernetes Cluster\n(Worker)" as k8s_w {
node "Pod" as ins1
node "Pod" as ins2
node "Pod" as ins3
}
}
'# Relationships
nfvo --> pm_ctl: 1. Create PM job
pm_ctl --> plugin
plugin --> prom: 2. Set PM job
ins1 --> prom: 3. Trigger event
ins2 --> prom
prom --> plugin: 4. POST event
plugin --> pm_driver: 5. Convert event to report
pm_driver --> nfvo: 6. Send report notification
nfvo --> pm_ctl: 7. Get PM report
nfvo --> lcm_ctl: 8. Scale
lcm_ctl --> infra
infra --> k8s_m: 9. Call Kubernetes API
k8s_m --> ins3: 10. Change the number of Pods
@enduml

View File

@ -0,0 +1,605 @@
====================
VNF Fault Management
====================
This document describes how to manage VNF Fault with CLI in Tacker.
Prerequisites
-------------
The following packages should be installed:
* tacker
* python-tackerclient
CLI Reference for VNF Fault Management
--------------------------------------
.. note::
To call the VNF FM API with vnffm subcommand,
you need to use the option **--os-tacker-api-version 2**
1. List alarms
^^^^^^^^^^^^^^
.. code-block:: console
$ openstack vnffm alarm list --os-tacker-api-version 2
Result:
.. code-block:: console
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
| ID | Managed Object Id | Ack State | Event Type | Perceived Severity | Probable Cause |
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
| d59545c5-6882-47a2-85aa-b25a5a0591c0 | 398c139d-a047-4047-bd3c-56558de87e67 | ACKNOWLEDGED | PROCESSING_ERROR_ALARM | WARNING | Process Terminated |
| fadd40db-a6f8-405f-a77a-72a9d408d7ae | ef635ef7-1f14-47d5-abcb-ed3b28f8ba74 | ACKNOWLEDGED | PROCESSING_ERROR_ALARM | WARNING | Process Terminated |
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
Help:
.. code-block:: console
$ openstack vnffm alarm list --os-tacker-api-version 2 --help
usage: openstack vnffm alarm list [-h] [-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}] [--noindent]
[--max-width <integer>] [--fit-width] [--print-empty]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--filter <filter>]
List VNF FM alarms
optional arguments:
-h, --help show this help message and exit
--filter <filter> Attribute-based-filtering parameters
output formatters:
output formatter options
-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
--sort-column SORT_COLUMN
specify the column(s) to sort the data (columns specified first have a
priority, non-existing columns are ignored), can be repeated
--sort-ascending sort the column(s) in ascending order
--sort-descending sort the column(s) in descending order
CSV Formatter:
--quote {all,minimal,none,nonnumeric}
when to include quotes, defaults to nonnumeric
json formatter:
--noindent whether to disable indenting the JSON
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater than
0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.
2. Show alarm
^^^^^^^^^^^^^
The `<vnf-fm-alarm-id>` should be replaced with the 'ID' in result of
'1. List alarms'. In the following sample,
`d59545c5-6882-47a2-85aa-b25a5a0591c0` is used.
.. code-block:: console
$ openstack vnffm alarm show <vnf-fm-alarm-id> --os-tacker-api-version 2
Result:
.. code-block:: console
+----------------------------+------------------------------------------------------------------------------------------------------+
| Field | Value |
+----------------------------+------------------------------------------------------------------------------------------------------+
| Ack State | ACKNOWLEDGED |
| Alarm Acknowledged Time | |
| Alarm Changed Time | 2022-08-29T05:49:02Z |
| Alarm Cleared Time | 2022-06-22T23:47:36Z |
| Alarm Raised Time | 2022-08-29T05:48:56Z |
| Correlated Alarm Ids | |
| Event Time | 2022-06-21T23:47:36Z |
| Event Type | PROCESSING_ERROR_ALARM |
| Fault Details | [ |
| | "fingerprint: 5ef77f1f8a3ecb8d", |
| | "detail: pid 12345" |
| | ] |
| Fault Type | Server Down |
| ID | d59545c5-6882-47a2-85aa-b25a5a0591c0 |
| Is Root Cause | False |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/alarms/d59545c5-6882-47a2-85aa-b25a5a0591c0" |
| | }, |
| | "objectInstance": { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/398c139d-a047-4047-bd3c-56558de87e67" |
| | } |
| | } |
| Managed Object Id | 398c139d-a047-4047-bd3c-56558de87e67 |
| Perceived Severity | WARNING |
| Probable Cause | Process Terminated |
| Root Cause Faulty Resource | |
| Vnfc Instance Ids | [] |
+----------------------------+------------------------------------------------------------------------------------------------------+
Help:
.. code-block:: console
$ openstack vnffm alarm show --os-tacker-api-version 2 --help
usage: openstack vnffm alarm show [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent] [--prefix PREFIX]
[--max-width <integer>] [--fit-width] [--print-empty]
<vnf-fm-alarm-id>
Display VNF FM alarm details
positional arguments:
<vnf-fm-alarm-id> VNF FM alarm ID to display
optional arguments:
-h, --help show this help message and exit
output formatters:
output formatter options
-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
json formatter:
--noindent whether to disable indenting the JSON
shell formatter:
a format a UNIX shell can parse (variable="value")
--prefix PREFIX add a prefix to all variable names
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater than
0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.
3. Update alarm
^^^^^^^^^^^^^^^
The `<vnf-fm-alarm-id>` should be replaced with the 'ID' in result of
'1. List alarms'. In the following sample,
`d59545c5-6882-47a2-85aa-b25a5a0591c0` is used.
.. code-block:: console
$ openstack vnffm alarm update <vnf-fm-alarm-id> --ack-state UNACKNOWLEDGED --os-tacker-api-version 2
Result:
.. code-block:: console
+-----------+----------------+
| Field | Value |
+-----------+----------------+
| Ack State | UNACKNOWLEDGED |
+-----------+----------------+
Help:
.. code-block:: console
$ openstack vnffm alarm update --os-tacker-api-version 2 --help
usage: openstack vnffm alarm update [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent] [--prefix PREFIX]
[--max-width <integer>] [--fit-width] [--print-empty]
[--ack-state <ack-state>]
<vnf-fm-alarm-id>
Update information about an individual VNF FM alarm
positional arguments:
<vnf-fm-alarm-id> VNF FM alarm ID to update.
optional arguments:
-h, --help show this help message and exit
output formatters:
output formatter options
-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
json formatter:
--noindent whether to disable indenting the JSON
shell formatter:
a format a UNIX shell can parse (variable="value")
--prefix PREFIX add a prefix to all variable names
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater than
0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.
require arguments:
--ack-state <ack-state>
Ask state can be 'ACKNOWLEDGED' or 'UNACKNOWLEDGED'.
4. Create subscription
^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
$ openstack vnffm sub create <param-file> --os-tacker-api-version 2
Result:
.. code-block:: console
+--------------+-----------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------------------------------------------------+
| Callback Uri | /nfvo/notify/alarm |
| Filter | { |
| | "vnfInstanceSubscriptionFilter": { |
| | "vnfdIds": [ |
| | "27b1c79c-5d78-43dd-a653-a1d6b9f3ea5d" |
| | ], |
| | "vnfProductsFromProviders": [ |
| | { |
| | "vnfProvider": "Company", |
| | "vnfProducts": [ |
| | { |
| | "vnfProductName": "Sample VNF", |
| | "versions": [ |
| | { |
| | "vnfSoftwareVersion": "1.0", |
| | "vnfdVersions": [ |
| | "1.0", |
| | "2.0" |
| | ] |
| | } |
| | ] |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfInstanceIds": [ |
| | "b0314420-0c9e-40e0-975e-4bf23b07d0c1" |
| | ], |
| | "vnfInstanceNames": [ |
| | "test" |
| | ] |
| | }, |
| | "notificationTypes": [ |
| | "AlarmNotification", |
| | "AlarmClearedNotification" |
| | ], |
| | "faultyResourceTypes": [ |
| | "COMPUTE" |
| | ], |
| | "perceivedSeverities": [ |
| | "WARNING" |
| | ], |
| | "eventTypes": [ |
| | "PROCESSING_ERROR_ALARM" |
| | ], |
| | "probableCauses": [ |
| | "Process Terminated" |
| | ] |
| | } |
| ID | 4102e2a5-019b-40ea-8da2-579ecd5f17db |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/subscriptions/4102e2a5-019b-40ea-8da2-579ecd5f17db" |
| | } |
| | } |
+--------------+-----------------------------------------------------------------------------------------------------+
Help:
.. code-block:: console
$ openstack vnffm sub create --os-tacker-api-version 2 --help
usage: openstack vnffm sub create [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent] [--prefix PREFIX]
[--max-width <integer>] [--fit-width] [--print-empty]
<param-file>
Create a new VNF FM subscription
positional arguments:
<param-file> Specify create VNF FM subscription request parameters in a json file.
optional arguments:
-h, --help show this help message and exit
output formatters:
output formatter options
-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
json formatter:
--noindent whether to disable indenting the JSON
shell formatter:
a format a UNIX shell can parse (variable="value")
--prefix PREFIX
add a prefix to all variable names
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater than
0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.
5. List subscriptions
^^^^^^^^^^^^^^^^^^^^^
.. code-block:: console
$ openstack vnffm sub list --os-tacker-api-version 2
Result:
.. code-block:: console
+--------------------------------------+--------------------+
| ID | Callback Uri |
+--------------------------------------+--------------------+
| 4102e2a5-019b-40ea-8da2-579ecd5f17db | /nfvo/notify/alarm |
+--------------------------------------+--------------------+
Help:
.. code-block:: console
$ openstack vnffm sub list --os-tacker-api-version 2 --help
usage: openstack vnffm sub list [-h] [-f {csv,json,table,value,yaml}]
[-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent] [--max-width <integer>] [--fit-width]
[--print-empty] [--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--filter <filter>]
List VNF FM subs
optional arguments:
-h, --help show this help message and exit
--filter <filter>
Attribute-based-filtering parameters
output formatters:
output formatter options
-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
--sort-column SORT_COLUMN
specify the column(s) to sort the data (columns specified first
have a priority, non-existing columns are ignored), can be repeated
--sort-ascending sort the column(s) in ascending order
--sort-descending sort the column(s) in descending order
CSV Formatter:
--quote {all,minimal,none,nonnumeric}
when to include quotes, defaults to nonnumeric
json formatter:
--noindent whether to disable indenting the JSON
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater
than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always
enable
--print-empty Print empty table if there is no data to show.
6. Show subscription
^^^^^^^^^^^^^^^^^^^^
The `<vnf-fm-sub-id>` should be replaced with the 'ID' in result of
'4. Create subscription' or '5. List subscriptions'. In the following sample,
`4102e2a5-019b-40ea-8da2-579ecd5f17db` is used.
.. code-block:: console
$ openstack vnffm sub show <vnf-fm-sub-id> --os-tacker-api-version 2
Result:
.. code-block:: console
+--------------+-----------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------------------------------------------------+
| Callback Uri | /nfvo/notify/alarm |
| Filter | { |
| | "vnfInstanceSubscriptionFilter": { |
| | "vnfdIds": [ |
| | "27b1c79c-5d78-43dd-a653-a1d6b9f3ea5d" |
| | ], |
| | "vnfProductsFromProviders": [ |
| | { |
| | "vnfProvider": "Company", |
| | "vnfProducts": [ |
| | { |
| | "vnfProductName": "Sample VNF", |
| | "versions": [ |
| | { |
| | "vnfSoftwareVersion": "1.0", |
| | "vnfdVersions": [ |
| | "1.0", |
| | "2.0" |
| | ] |
| | } |
| | ] |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfInstanceIds": [ |
| | "b0314420-0c9e-40e0-975e-4bf23b07d0c1" |
| | ], |
| | "vnfInstanceNames": [ |
| | "test" |
| | ] |
| | }, |
| | "notificationTypes": [ |
| | "AlarmNotification", |
| | "AlarmClearedNotification" |
| | ], |
| | "faultyResourceTypes": [ |
| | "COMPUTE" |
| | ], |
| | "perceivedSeverities": [ |
| | "WARNING" |
| | ], |
| | "eventTypes": [ |
| | "PROCESSING_ERROR_ALARM" |
| | ], |
| | "probableCauses": [ |
| | "Process Terminated" |
| | ] |
| | } |
| ID | 4102e2a5-019b-40ea-8da2-579ecd5f17db |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/subscriptions/4102e2a5-019b-40ea-8da2-579ecd5f17db" |
| | } |
| | } |
+--------------+-----------------------------------------------------------------------------------------------------+
Help:
.. code-block:: console
$ openstack vnffm sub show --os-tacker-api-version 2 --help
usage: openstack vnffm sub show [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent] [--prefix PREFIX]
[--max-width <integer>] [--fit-width] [--print-empty]
<vnf-fm-sub-id>
Display VNF FM subscription details
positional arguments:
<vnf-fm-sub-id>
VNF FM subscription ID to display
optional arguments:
-h, --help show this help message and exit
output formatters:
output formatter options
-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
json formatter:
--noindent whether to disable indenting the JSON
shell formatter:
a format a UNIX shell can parse (variable="value")
--prefix PREFIX add a prefix to all variable names
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater than
0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.
7. Delete subscription
^^^^^^^^^^^^^^^^^^^^^^
The `<vnf-fm-sub-id>` should be replaced with the 'ID' in result of
'4. Create subscription' or '5. List subscriptions'. In the following sample,
`4102e2a5-019b-40ea-8da2-579ecd5f17db` is used.
.. code-block:: console
$ openstack vnffm sub delete <vnf-fm-sub-id> --os-tacker-api-version 2
Result:
.. code-block:: console
VNF FM subscription '4102e2a5-019b-40ea-8da2-579ecd5f17db' deleted successfully
Help:
.. code-block:: console
$ openstack vnffm sub delete --os-tacker-api-version 2 --help
usage: openstack vnffm sub delete [-h] <vnf-fm-sub-id> [<vnf-fm-sub-id> ...]
Delete VNF FM subscription(s)
positional arguments:
<vnf-fm-sub-id> VNF FM subscription ID(s) to delete
optional arguments:
-h, --help show this help message and exit

View File

@ -0,0 +1,501 @@
==========================
VNF Performance Management
==========================
This document describes how to manage VNF Performance with CLI in Tacker.
Prerequisites
-------------
The following packages should be installed:
* tacker
* python-tackerclient
CLI Reference for VNF Performance Management
--------------------------------------------
.. note::
To call the VNF PM API with vnfpm subcommand, ....
you need to use the option **--os-tacker-api-version 2**
1. Create PM job
^^^^^^^^^^^^^^^^
'param-file': Specify create VNF PM job request parameters in a json file.
.. code-block:: console
$ openstack vnfpm job create <param-file> --os-tacker-api-version 2
Result:
.. code-block:: console
+-------------------------+----------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+----------------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback/test_performancemanagement_interface_min_1 |
| Criteria | { |
| | "performanceMetric": [ |
| | "VCpuUsageMeanVnf.{7749c637-6e8d-4b6c-a6f4-563aa73744dd}" |
| | ], |
| | "collectionPeriod": 5, |
| | "reportingPeriod": 10 |
| | } |
| ID | ca9b58cf-8493-44e3-9e76-678ea0e80a80 |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | }, |
| | "objects": [ |
| | { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/7749c637-6e8d-4b6c-a6f4-563aa73744dd" |
| | } |
| | ] |
| | } |
| Object Instance Ids | [ |
| | "7749c637-6e8d-4b6c-a6f4-563aa73744dd" |
| | ] |
| Object Type | Vnf |
| Reports | [] |
| Sub Object Instance Ids | |
+-------------------------+----------------------------------------------------------------------------------------------------------+
Help:
.. code-block:: console
$ openstack vnfpm job create --os-tacker-api-version 2 --help
usage: openstack vnfpm job create [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent] [--prefix PREFIX]
[--max-width <integer>] [--fit-width]
[--print-empty]
<param-file>
Create a new VNF PM job
positional arguments:
<param-file> Specify create VNF PM job request parameters in a json file.
optional arguments:
-h, --help show this help message and exit
output formatters:
output formatter options
-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to
show multiple columns
json formatter:
--noindent whether to disable indenting the JSON
shell formatter:
a format a UNIX shell can parse (variable="value")
--prefix PREFIX
add a prefix to all variable names
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use
the CLIFF_MAX_TERM_WIDTH environment variable, but the
parameter takes precedence.
--fit-width Fit the table to the display width. Implied if
--max-width greater than 0. Set the environment variable
CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.
2. Update PM job
^^^^^^^^^^^^^^^^
The `<vnf-pm-job-id>` should be replaced with the 'ID' in result of
'1. Create PM job'. In the following sample,
`ca9b58cf-8493-44e3-9e76-678ea0e80a80` is used.
.. code-block:: console
$ openstack vnfpm job update <vnf-pm-job-id> <param-file> --os-tacker-api-version 2
Result:
.. code-block:: console
+----------------+---------------------------------------------------------+
| Field | Value |
+----------------+---------------------------------------------------------+
| Authentication | |
| Callback Uri | http://localhost:9990/notification/callback/callbackUri |
+----------------+---------------------------------------------------------+
Help:
.. code-block:: console
$ openstack vnfpm job update --os-tacker-api-version 2 --help
usage: openstack vnfpm job update [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent] [--prefix PREFIX]
[--max-width <integer>] [--fit-width]
[--print-empty]
<vnf-pm-job-id> <param-file>
Update information about an individual VNF PM job
positional arguments:
<vnf-pm-job-id> VNF PM job ID to update.
<param-file> Specify update PM job request parameters in a json file.
optional arguments:
-h, --help show this help message and exit
output formatters:
output formatter options
-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to
show multiple columns
json formatter:
--noindent whether to disable indenting the JSON
shell formatter:
a format a UNIX shell can parse (variable="value")
--prefix PREFIX
add a prefix to all variable names
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use
the CLIFF_MAX_TERM_WIDTH environment variable, but the
parameter takes precedence.
--fit-width Fit the table to the display width. Implied if --max-width
greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1
to always enable
--print-empty Print empty table if there is no data to show.
3. List PM jobs
^^^^^^^^^^^^^^^
.. code-block:: console
$ openstack vnfpm job list --os-tacker-api-version 2
Result:
.. code-block:: console
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
| Id | Object Type | Links |
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
| ca9b58cf-8493-44e3-9e76-678ea0e80a80 | Vnf | { |
| | | "self": { |
| | | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | | }, |
| | | "objects": [ |
| | | { |
| | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/7749c637-6e8d-4b6c-a6f4-563aa73744dd" |
| | | } |
| | | ] |
| | | } |
| 2067f412-6a02-4491-a5ab-426c772110f2 | Vnf | { |
| | | "self": { |
| | | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/2067f412-6a02-4491-a5ab-426c772110f2" |
| | | }, |
| | | "objects": [ |
| | | { |
| | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/492c6347-668f-4b04-bb98-e69af8194887" |
| | | } |
| | | ] |
| | | } |
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
Help:
.. code-block:: console
$ openstack vnfpm job list --os-tacker-api-version 2 --help
usage: openstack vnfpm job list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN]
[--quote {all,minimal,none,nonnumeric}]
[--noindent] [--max-width <integer>] [--fit-width]
[--print-empty] [--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--filter <filter>]
[--all_fields | --fields fields | --exclude_fields exclude-fields]
[--exclude_default]
List VNF PM jobs
optional arguments:
-h, --help show this help message and exit
--filter <filter> Attribute-based-filtering parameters
--all_fields Include all complex attributes in the response
--fields fields Complex attributes to be included into the response
--exclude_fields exclude-fields
Complex attributes to be excluded from the response
--exclude_default Indicates to exclude all complex attributes from the response. This
argument can be used alone or with --fields and --filter. For all
other combinations tacker server will throw bad request error
output formatters:
output formatter options
-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
--sort-column SORT_COLUMN
specify the column(s) to sort the data (columns specified first have a
priority, non-existing columns are ignored),
can be repeated
--sort-ascending sort the column(s) in ascending order
--sort-descending sort the column(s) in descending order
CSV Formatter:
--quote {all,minimal,none,nonnumeric}
when to include quotes, defaults to nonnumeric
json formatter:
--noindent whether to disable indenting the JSON
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater than
0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.
4. Show PM job
^^^^^^^^^^^^^^
The `<vnf-pm-job-id>` should be replaced with the 'ID' in result of
'1. Create PM job' or '3. List PM jobs'. In the following sample,
`ca9b58cf-8493-44e3-9e76-678ea0e80a80` is used.
.. code-block:: console
$ openstack vnfpm job show <vnf-pm-job-id> --os-tacker-api-version 2
Result:
.. code-block:: console
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback/callbackUri |
| Criteria | { |
| | "performanceMetric": [ |
| | "VCpuUsageMeanVnf.{7749c637-6e8d-4b6c-a6f4-563aa73744dd}" |
| | ], |
| | "collectionPeriod": 5, |
| | "reportingPeriod": 10 |
| | } |
| ID | ca9b58cf-8493-44e3-9e76-678ea0e80a80 |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | }, |
| | "objects": [ |
| | { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/7749c637-6e8d-4b6c-a6f4-563aa73744dd" |
| | } |
| | ] |
| | } |
| Object Instance Ids | [ |
| | "7749c637-6e8d-4b6c-a6f4-563aa73744dd" |
| | ] |
| Object Type | Vnf |
| Reports | [ |
| | { |
| | "href": "/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80/reports/53aafe25-7124-4880-8b58-47a93b3dc371", |
| | "readyTime": "2022-08-30T08:02:58Z" |
| | } |
| | ] |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
Help:
.. code-block:: console
$ openstack vnfpm job show --os-tacker-api-version 2 --help
usage: openstack vnfpm job show [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent] [--prefix PREFIX]
[--max-width <integer>] [--fit-width] [--print-empty]
<vnf-pm-job-id>
Display VNF PM job details
positional arguments:
<vnf-pm-job-id> VNF PM job ID to display
optional arguments:
-h, --help show this help message and exit
output formatters:
output formatter options
-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
json formatter:
--noindent whether to disable indenting the JSON
shell formatter:
a format a UNIX shell can parse (variable="value")
--prefix PREFIX add a prefix to all variable names
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater than
0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.
5. Delete PM job
^^^^^^^^^^^^^^^^
The `<vnf-pm-job-id>` should be replaced with the 'ID' in result of
'1. Create PM job' or '3. List PM jobs'. In the following sample,
`ca9b58cf-8493-44e3-9e76-678ea0e80a80` is used.
.. code-block:: console
$ openstack vnfpm job delete <vnf-pm-job-id> --os-tacker-api-version 2
Result:
.. code-block:: console
VNF PM job 'ca9b58cf-8493-44e3-9e76-678ea0e80a80' deleted successfully
Help:
.. code-block:: console
$ openstack vnfpm job delete --os-tacker-api-version 2 --help
usage: openstack vnfpm job delete [-h] <vnf-pm-job-id> [<vnf-pm-job-id> ...]
Delete VNF PM job
positional arguments:
<vnf-pm-job-id> VNF PM job ID(s) to delete
optional arguments:
-h, --help show this help message and exit
6. Show PM job report
^^^^^^^^^^^^^^^^^^^^^
The `<vnf-pm-job-id>` should be replaced with the 'ID' in result of
'1. Create PM job' or '3. List PM jobs'. In the following sample,
`500f538e-44a5-460a-a95e-e9189354c2be` is used.
The `<vnf-pm-report-id>` should be replaced with the last part marked by `/` of
'href'. The 'href' is part of 'Reports' in result of '4. Show PM job'.
In the following sample, `53aafe25-7124-4880-8b58-47a93b3dc371` is used.
.. code-block:: console
$ openstack vnfpm report show <vnf-pm-job-id> <vnf-pm-report-id> --os-tacker-api-version 2
Result:
.. code-block:: console
+---------+---------------------------------------------------------------------------------------+
| Field | Value |
+---------+---------------------------------------------------------------------------------------+
| Entries | [ |
| | { |
| | "objectType": "Vnf", |
| | "objectInstanceId": "495ffedf-2755-42c8-bf14-a5433701311e", |
| | "performanceMetric": "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e", |
| | "performanceValues": [ |
| | { |
| | "timeStamp": "2022-08-30T08:02:58Z", |
| | "value": "99.0" |
| | } |
| | ] |
| | } |
| | ] |
+---------+---------------------------------------------------------------------------------------+
Help:
.. code-block:: console
$ openstack vnfpm report show --os-tacker-api-version 2 --help
usage: openstack vnfpm report show [-h] [-f {json,shell,table,value,yaml}]
[-c COLUMN] [--noindent] [--prefix PREFIX]
[--max-width <integer>] [--fit-width] [--print-empty]
<vnf-pm-job-id> <vnf-pm-report-id>
Display VNF PM report details
positional arguments:
<vnf-pm-job-id>
VNF PM job id where the VNF PM report is located
<vnf-pm-report-id>
VNF PM report ID to display
optional arguments:
-h, --help show this help message and exit
output formatters:
output formatter options
-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
the output format, defaults to table
-c COLUMN, --column COLUMN
specify the column(s) to include, can be repeated to show multiple
columns
json formatter:
--noindent whether to disable indenting the JSON
shell formatter:
a format a UNIX shell can parse (variable="value")
--prefix PREFIX
add a prefix to all variable names
table formatter:
--max-width <integer>
Maximum display width, <1 to disable. You can also use the
CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes
precedence.
--fit-width Fit the table to the display width. Implied if --max-width greater than
0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
--print-empty Print empty table if there is no data to show.

View File

@ -24,6 +24,8 @@ Operations for ETSI NFV-SOL implementation
cli-etsi-vnfpkgm
cli-etsi-vnflcm
cli-etsi-vnffm
cli-etsi-vnfpm
Operations for Legacy implementation

View File

@ -0,0 +1,736 @@
===============================================================
ETSI NFV-SOL CNF Auto Healing With Prometheus via FM Interfaces
===============================================================
This document describes how to auto heal CNF in Tacker with Prometheus
via Fault Management Interfaces.
Overview
--------
Using the Fault Management interfaces, there are two ways to implement
auto heal, Polling Mode and Notification Mode.
The diagram below shows an overview of the CNF auto healing.
1. Create FM subscription(Notification Mode)
NFVO sends a request to Tacker to create a FM subscription.
2. Collect metrics
Prometheus collects metrics and decides whether triggering alert
is needed or not.
3. POST alert
Prometheus sends alerts to Tacker.
4. Convert alert to alarm
Tacker receives informed alerts, converts them to alarms, and saves
them to Tacker DB.
5. Get Alarms and return result(Polling Mode)
NFVO sends a request at regular intervals to get the alarm in
the Tacker. Tacker searches Tacker DB with the query condition
specified by NFVO, and returns the alarm that matches the
condition to NFVO.
6. Send alarm notification(Notification Mode)
VnffmDriver finds all FM subscriptions in the DB and matches the
alerts to them. If there is a FM subscription that can match
successfully, the alarm is sent to the specified path of the
NFVO. If the match is not successful, the processing ends.
7. Heal
NFVO recognizes the failure of the CNF from the alarm and sends
a heal request to the Tacker.
8. Call Kubernetes API
In tacker-conductor, the request is redirected again to an
appropriate infra-driver (in this case Kubernetes infra-driver)
according to the contents of the instantiate parameters. Then,
Kubernetes infra-driver calls Kubernetes APIs.
9. Create a new pod
Kubernetes Master adds the number of Pods according to the
API calls.
10. Delete the old pod
Kubernetes Master deletes the number of Pods according to the
API calls.
.. figure:: ../_images/etsi_cnf_auto_healing_fm.png
:align: left
Prerequisites
-------------
* The following packages should be installed:
* tacker
* python-tackerclient
At least one VNF instance with status of ``INSTANTIATED`` is required.
You can refer to :doc:`./etsi_containerized_vnf_usage_guide` for the
procedure to instantiate VNF.
The VNF Package used can refer to `the sample`_.
* The following third-party services should be installed
* NFVO
* Prometheus(including Alertmanager)
Each operator has its own NFVO, there is no restriction here, as long as
it conforms to `ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_,
it can be used.
For the installation of Prometheus and Alertmanager, please refer to
the `Prometheus official website`_.
How to configure Prometheus Plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Prometheus Plugin is disabled by default in Tacker.
For it to work, we need to find ``fault_management`` in
``tacker.conf`` and change its value to ``True``.
.. code-block:: console
$ vi /etc/tacker/tacker.conf
...
[prometheus_plugin]
fault_management = True
...
After modifying the configuration file, don't forget to restart the
Tacker service to take effect.
.. code-block:: console
$ sudo systemctl stop devstack@tacker
$ sudo systemctl restart devstack@tacker-conductor
$ sudo systemctl start devstack@tacker
How to configure Prometheus
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Unlike auto scale via PM interfaces, auto heal via FM interfaces does not
need to login Prometheus server via SSH to modify its configuration.
Users need to manually modify the configuration file of Prometheus, and
then it will monitor the specified resources.
For the setting method of Prometheus configuration file, please refer to
`Prometheus Configuration`_ for details.
The following is the content of a sample ``prometheus.yml``:
.. code-block:: yaml
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
- <IP of Alertmanager>:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
- "tacker-samplevnf-rules.yaml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "kube-state-metrics"
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ["<IP of Kubernetes>:<port of metrics>"]
The following is the content of a sample ``tacker-samplevnf-rules.yaml``:
.. code-block:: yaml
groups:
- name: example
rules:
- alert: KubePodCrashLooping
annotations:
probable_cause: The server cannot be connected.
fault_type: Server Down
fault_details: fault details
expr: |
rate(kube_pod_container_status_restarts_total{job="kube-state-metrics"}[10m]) * 60 * 5 > 0
for: 5m
labels:
receiver_type: tacker
function_type: vnffm
vnf_instance_id: <VNF instance ID>
perceived_severity: WARNING
event_type: EQUIPMENT_ALARM
The following is the content of a sample ``alertmanager.yml``:
.. code-block:: yaml
route:
group_by: ['cluster']
group_wait: 30s
group_interval: 2m
repeat_interval: 1h
receiver: 'web.boo'
routes:
- match:
alertname: KubePodCrashLooping
receiver: 'web.boo'
receivers:
- name: 'web.boo'
webhook_configs:
- url: 'http://<IP of Tacker>:9890/alert'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['dev', 'instance']
How does NFVO Auto Heal CNF
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Through the FM interfaces, there are two modes to auto heal the CNF.
Polling Mode
^^^^^^^^^^^^
This mode is where NFVO actively sends a get alarms request to Tacker
at an interval.
According to the content of the response, confirm the VNFC instance ID
of the CNF in which the problem occurred.
The following is an example of a response to a get alarms request:
.. code-block:: json
[
{
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"managedObjectId": "c61314d0-f583-4ab3-a457-46426bce02d3",
"vnfcInstanceIds": [
"VDU2-curry-probe-test001-766bdd79bf-wgc7m"
],
"alarmRaisedTime": "2021-09-03 10:21:03",
"alarmChangedTime": "",
"alarmClearedTime": "",
"alarmAcknowledgedTime": "",
"ackState": "UNACKNOWLEDGED",
"perceivedSeverity": "WARNING",
"eventTime": "2021-09-03 10:06:03",
"eventType": "EQUIPMENT_ALARM",
"faultType": "",
"probableCause": "The server cannot be connected.",
"isRootCause": "false",
"correlatedAlarmIds": [],
"faultDetails": [],
"_links": {
"self": "/vnffm/v1/alarms/78a39661-60a8-4824-b989-88c1b0c3534a",
"objectInstance": ""
}
}
]
.. note::
The value of ``managedObjectId`` is the VNF instance ID.
The value of ``vnfcInstanceIds`` is the VNFC instance IDs.
Then send a heal request specifying the VNFC instance ID to Tacker.
The format of the heal request can refer to `heal request`_.
.. _Notification Mode :
Notification Mode
^^^^^^^^^^^^^^^^^
This mode is that NFVO will create a FM subscription on Tacker.
In this FM subscription, multiple filter conditions can be set, so that
the VNF instance that has been instantiated in Tacker can be matched.
Create FM subscription can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm sub create sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"filter": {
"vnfInstanceSubscriptionFilter": {
"vnfdIds": [
"4d5ffa3b-9dde-45a9-a805-659dc8df0c02"
],
"vnfProductsFromProviders": [
{
"vnfProvider": "Company",
"vnfProducts": [
{
"vnfProductName": "Sample VNF",
"versions": [
{
"vnfSoftwareVersion": 1.0,
"vnfdVersions": [1.0, 2.0]
}
]
}
]
}
],
"vnfInstanceIds": [
"aad7d2fe-ed51-47da-a20d-7b299860607e"
],
"vnfInstanceNames": [
"test"
]
},
"notificationTypes": [
"AlarmNotification"
],
"faultyResourceTypes": [
"COMPUTE"
],
"perceivedSeverities": [
"WARNING"
],
"eventTypes": [
"EQUIPMENT_ALARM"
],
"probableCauses": [
"The server cannot be connected."
]
},
"callbackUri": "http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "auth_password",
"tokenEndpoint": "token_endpoint"
}
}
}
Here is an example of create FM subscription:
.. code-block:: console
$ openstack vnffm sub create sample_param_file.json --os-tacker-api-version 2
+--------------+-----------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------------------------------------------------+
| Callback Uri | /nfvo/notification |
| Filter | { |
| | "vnfInstanceSubscriptionFilter": { |
| | "vnfdIds": [ |
| | "4d5ffa3b-9dde-45a9-a805-659dc8df0c02" |
| | ], |
| | "vnfProductsFromProviders": [ |
| | { |
| | "vnfProvider": "Company", |
| | "vnfProducts": [ |
| | { |
| | "vnfProductName": "Sample VNF", |
| | "versions": [ |
| | { |
| | "vnfSoftwareVersion": "1.0", |
| | "vnfdVersions": [ |
| | "1.0", |
| | "2.0" |
| | ] |
| | } |
| | ] |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfInstanceIds": [ |
| | "aad7d2fe-ed51-47da-a20d-7b299860607e" |
| | ], |
| | "vnfInstanceNames": [ |
| | "test" |
| | ] |
| | }, |
| | "notificationTypes": [ |
| | "AlarmNotification" |
| | ], |
| | "faultyResourceTypes": [ |
| | "COMPUTE" |
| | ], |
| | "perceivedSeverities": [ |
| | "WARNING" |
| | ], |
| | "eventTypes": [ |
| | "EQUIPMENT_ALARM" |
| | ], |
| | "probableCauses": [ |
| | "The server cannot be connected." |
| | ] |
| | } |
| ID | a7a18ac6-a668-4d94-8ba0-f04c20cfeacd |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb" |
| | } |
| | } |
+--------------+-----------------------------------------------------------------------------------------------------+
After the FM subscription is created, whenever Prometheus sends an alert
to Tacker, Tacker will find a matching FM subscription based on the
information in the alert.
The following is an example of the request body that Prometheus sends
an alert:
.. code-block:: json
{
"receiver": "receiver",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"receiver_type": "tacker",
"function_type": "vnffm",
"vnf_instance_id": "aad7d2fe-ed51-47da-a20d-7b299860607e",
"pod": "curry-probe-test001-766bdd79bf-wgc7m",
"perceived_severity": "WARNING",
"event_type": "PROCESSING_ERROR_ALARM"
},
"annotations": {
"fault_type": "Server Down",
"probable_cause": "Process Terminated",
"fault_details": "pid 12345"
},
"startsAt": "2022-06-21T23:47:36.453Z",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://controller147:9090/graph?g0.expr=up%7Bjob%3D%22node%22%7D+%3D%3D+0&g0.tab=1",
"fingerprint": "5ef77f1f8a3ecb8d"
}
],
"groupLabels": {},
"commonLabels": {
"alertname": "NodeInstanceDown",
"job": "node"
},
"commonAnnotations": {
"description": "sample"
},
"externalURL": "http://controller147:9093",
"version": "4",
"groupKey": "{}:{}",
"truncatedAlerts": 0
}
Finally, a notification is sent to the Callback Uri (i.e. NFVO) in the FM
subscription. NFVO sends a heal request to Tacker according to the
content in the notification.
The format of the heal request can refer to `heal request`_.
The following is an example of the request body that Tacker sends
a notification:
.. code-block:: json
{
"id": "87bea1ed-6ced-403e-8640-2c631eb55d08",
"notificationType": "AlarmNotification",
"subscriptionId": "fb782658-af96-47e7-9faa-90ba8416e426",
"timeStamp": "2021-09-03 10:21:03",
"alarm": {
"id": "78a39661-60a8-4824-b989-88c1b0c3534a",
"managedObjectId": "c61314d0-f583-4ab3-a457-46426bce02d3",
"vnfcInstanceIds": [
"VDU2-curry-probe-test001-766bdd79bf-wgc7m"
],
"alarmRaisedTime": "2021-09-03 10:21:03",
"alarmChangedTime": "",
"alarmClearedTime": "",
"alarmAcknowledgedTime": "",
"ackState": "UNACKNOWLEDGED",
"perceivedSeverity": "WARNING",
"eventTime": "2021-09-03 10:06:03",
"eventType": "EQUIPMENT_ALARM",
"faultType": "",
"probableCause": "The server cannot be connected.",
"isRootCause": "false",
"correlatedAlarmIds": [],
"faultDetails": [],
"_links": {
"self": {
"href": "/vnffm/v1/alarms/78a39661-60a8-4824-b989-88c1b0c3534a"
},
"objectInstance": {
"href": "/vnffm/v1/vnf_instances/c61314d0-f583-4ab3-a457-46426bce02d3"
}
}
},
"_links": {
"subscription": {
"href": "/vnffm/v1/subscriptions/fb782658-af96-47e7-9faa-90ba8416e426"
}
}
}
How to use the CLI of FM interfaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get all alarms
^^^^^^^^^^^^^^
Get all alarms can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm alarm list --os-tacker-api-version 2
Here is an example of getting all alarms:
.. code-block:: console
$ openstack vnffm alarm list --os-tacker-api-version 2
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
| ID | Managed Object Id | Ack State | Event Type | Perceived Severity | Probable Cause |
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
| 1829331c-4439-4bda-bf57-832fb5786ce9 | fe9b053d-777a-442f-ad24-cfc9fd23b0c4 | ACKNOWLEDGED | PROCESSING_ERROR_ALARM | WARNING | Process Terminated |
| 70935ca5-e03c-4190-8eca-233dd4b2be9a | ca1999fd-44ef-43c0-b3e3-3290a54b2bb4 | ACKNOWLEDGED | PROCESSING_ERROR_ALARM | WARNING | Process Terminated |
+--------------------------------------+--------------------------------------+--------------+------------------------+--------------------+--------------------+
Get the specified alarm
^^^^^^^^^^^^^^^^^^^^^^^
Get the specified alarm can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm alarm show ALARM_ID --os-tacker-api-version 2
Here is an example of getting the specified alarm:
.. code-block:: console
$ openstack vnffm alarm show 1829331c-4439-4bda-bf57-832fb5786ce9 --os-tacker-api-version 2
+----------------------------+------------------------------------------------------------------------------------------------------+
| Field | Value |
+----------------------------+------------------------------------------------------------------------------------------------------+
| Ack State | ACKNOWLEDGED |
| Alarm Acknowledged Time | |
| Alarm Changed Time | 2022-08-31T07:47:05Z |
| Alarm Cleared Time | 2022-06-22T23:47:36Z |
| Alarm Raised Time | 2022-08-31T07:46:59Z |
| Correlated Alarm Ids | |
| Event Time | 2022-06-21T23:47:36Z |
| Event Type | PROCESSING_ERROR_ALARM |
| Fault Details | [ |
| | "fingerprint: 5ef77f1f8a3ecb8d", |
| | "detail: pid 12345" |
| | ] |
| Fault Type | Server Down |
| ID | 1829331c-4439-4bda-bf57-832fb5786ce9 |
| Is Root Cause | False |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/alarms/1829331c-4439-4bda-bf57-832fb5786ce9" |
| | }, |
| | "objectInstance": { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/fe9b053d-777a-442f-ad24-cfc9fd23b0c4" |
| | } |
| | } |
| Managed Object Id | fe9b053d-777a-442f-ad24-cfc9fd23b0c4 |
| Perceived Severity | WARNING |
| Probable Cause | Process Terminated |
| Root Cause Faulty Resource | |
| Vnfc Instance Ids | [ |
| | "VDU2-curry-probe-test001-766bdd79bf-wgc7m" |
| | ] |
+----------------------------+------------------------------------------------------------------------------------------------------+
Change target Alarm
^^^^^^^^^^^^^^^^^^^
Change the ackState of the alarm can be executed by the following CLI
command.
.. code-block:: console
$ openstack vnffm alarm update ALARM_ID --ack-state UNACKNOWLEDGED --os-tacker-api-version 2
.. note::
The value of ``--ack-state`` can only be ``ACKNOWLEDGED`` or
``UNACKNOWLEDGED``.
Here is an example of changing target alarm:
.. code-block:: console
$ openstack vnffm alarm update 1829331c-4439-4bda-bf57-832fb5786ce9 --ack-state UNACKNOWLEDGED --os-tacker-api-version 2
+-----------+----------------+
| Field | Value |
+-----------+----------------+
| Ack State | UNACKNOWLEDGED |
+-----------+----------------+
Create a new FM subscription
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The creation of FM subscription has been introduced in the
:ref:`Notification Mode` above, and the use case of the CLI command
can be referred to there.
Get all FM subscriptions
^^^^^^^^^^^^^^^^^^^^^^^^
Get all FM subscriptions can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm sub list --os-tacker-api-version 2
Here is an example of getting all FM subscriptions:
.. code-block:: console
$ openstack vnffm sub list --os-tacker-api-version 2
+--------------------------------------+--------------------------------------------------------------------------------+
| ID | Callback Uri |
+--------------------------------------+--------------------------------------------------------------------------------+
| 407cb9c5-60f2-43e8-a43a-925c0323c3eb | http://localhost:9990/notification/callback/test_faultmanagement_interface_max |
| c4f21875-c41d-42a8-967a-3ec7efe1d867 | http://localhost:9990/notification/callback/test_faultmanagement_interface_min |
+--------------------------------------+--------------------------------------------------------------------------------+
Get the specified FM subscription
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Get the specified FM subscription can be executed by the following CLI command.
.. code-block:: console
$ openstack vnffm sub show FM_SUBSCRIPTION_ID --os-tacker-api-version 2
Here is an example of getting the specified FM subscription:
.. code-block:: console
$ openstack vnffm sub show 407cb9c5-60f2-43e8-a43a-925c0323c3eb --os-tacker-api-version 2
+--------------+-----------------------------------------------------------------------------------------------------+
| Field | Value |
+--------------+-----------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback/test_faultmanagement_interface_max |
| Filter | { |
| | "vnfInstanceSubscriptionFilter": { |
| | "vnfdIds": [ |
| | "4d5ffa3b-9dde-45a9-a805-659dc8df0c02" |
| | ], |
| | "vnfProductsFromProviders": [ |
| | { |
| | "vnfProvider": "Company", |
| | "vnfProducts": [ |
| | { |
| | "vnfProductName": "Sample VNF", |
| | "versions": [ |
| | { |
| | "vnfSoftwareVersion": "1.0", |
| | "vnfdVersions": [ |
| | "1.0" |
| | ] |
| | } |
| | ] |
| | } |
| | ] |
| | } |
| | ], |
| | "vnfInstanceIds": [ |
| | "aad7d2fe-ed51-47da-a20d-7b299860607e" |
| | ], |
| | "vnfInstanceNames": [ |
| | "test" |
| | ] |
| | }, |
| | "notificationTypes": [ |
| | "AlarmNotification", |
| | "AlarmClearedNotification" |
| | ], |
| | "faultyResourceTypes": [ |
| | "COMPUTE" |
| | ], |
| | "perceivedSeverities": [ |
| | "WARNING" |
| | ], |
| | "eventTypes": [ |
| | "PROCESSING_ERROR_ALARM" |
| | ], |
| | "probableCauses": [ |
| | "Process Terminated" |
| | ] |
| | } |
| ID | 407cb9c5-60f2-43e8-a43a-925c0323c3eb |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnffm/v1/subscriptions/407cb9c5-60f2-43e8-a43a-925c0323c3eb" |
| | } |
| | } |
+--------------+-----------------------------------------------------------------------------------------------------+
Delete the specified FM subscription
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Delete the specified FM subscription can be executed by the following CLI
command.
.. code-block:: console
$ openstack vnffm sub delete FM_SUBSCRIPTION_ID --os-tacker-api-version 2
Here is an example of deleting the specified FM subscription:
.. code-block:: console
$ openstack vnffm sub delete a7a18ac6-a668-4d94-8ba0-f04c20cfeacd --os-tacker-api-version 2
VNF FM subscription 'a7a18ac6-a668-4d94-8ba0-f04c20cfeacd' deleted successfully
.. _the sample : https://docs.openstack.org/tacker/latest/user/etsi_cnf_healing.html#how-to-create-vnf-package-for-healing
.. _Prometheus Configuration : https://prometheus.io/docs/prometheus/latest/configuration/configuration/
.. _Prometheus official website : https://prometheus.io/docs/prometheus/latest/getting_started/
.. _ETSI NFV-SOL 002 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_nfv-sol002v030301p.pdf
.. _ETSI NFV-SOL 003 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_nfv-sol003v030301p.pdf
.. _heal request : https://docs.openstack.org/api-ref/nfv-orchestration/v2/vnflcm.html?expanded=heal-a-vnf-instance-v2-detail#heal-a-vnf-instance-v2

View File

@ -0,0 +1,650 @@
===============================================================
ETSI NFV-SOL CNF Auto Scaling With Prometheus via PM Interfaces
===============================================================
This document describes how to auto scale CNF in Tacker with Prometheus
via Performance Management Interfaces.
Overview
--------
The diagram below shows an overview of the CNF auto scaling.
1. Create PM job
The NFVO sends a request to the Tacker to create a PM job.
2. Set PM job
Prometheus Plugin sets PM job to Prometheus.
3. Trigger event
Prometheus collects metrics and decides whether triggering event is
needed or not.
4. POST event
Prometheus sends POST request to Tacker with specified URI. Tacker
collects data related to the PM event.
5. Convert event to report
Tacker receives informed event, converts it to report, and saves
it to DB. Tacker also saves timestamp of the event.
6. Send report notification
VnfPmDriverV2 finds all jobs in the DB and matches the report to
job. If there is a job that can match successfully, the report is
sent to the specified path of the NFVO. If the match is not successful,
the processing ends.
7. Get PM report
The NFVO make a request for the content of the report, then make a
decision of scaling.
8. Scale
Upon receiving a request to scale VNF from NFVO, tacker-server
redirects it to tacker-conductor.
9. Call Kubernetes API
In tacker-conductor, the request is redirected again to an
appropriate infra-driver (in this case Kubernetes infra-driver)
according to the contents of the instantiate parameters. Then,
Kubernetes infra-driver calls Kubernetes APIs.
10. Change the number of Pods
Kubernetes Master change the number of Pods according to the
API calls.
.. figure:: ../_images/etsi_cnf_auto_scaling_pm.png
:align: left
Prerequisites
-------------
* The following packages should be installed:
* tacker
* python-tackerclient
At least one VNF instance with status of ``INSTANTIATED`` is required.
You can refer to :doc:`./etsi_containerized_vnf_usage_guide` for the
procedure to instantiate VNF.
The VNF Package used can refer to `the sample`_.
* The following third-party services should be installed
* NFVO
* Prometheus(including Alertmanager)
Each operator has its own NFVO, there is no restriction here, as long as
it conforms to `ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_,
it can be used.
For the installation of Prometheus and Alertmanager, please refer to
the `official website`_.
How to configure Prometheus Plugin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Prometheus Plugin is disabled by default in Tacker.
For it to work, we need to find ``performance_management`` in
``tacker.conf`` and change its value to ``True``.
.. code-block:: console
$ vi /etc/tacker/tacker.conf
...
[prometheus_plugin]
performance_management = True
...
After modifying the configuration file, don't forget to restart the
Tacker service to take effect.
.. code-block:: console
$ sudo systemctl stop devstack@tacker
$ sudo systemctl restart devstack@tacker-conductor
$ sudo systemctl start devstack@tacker
.. _Create PM job :
How to create a PM job
~~~~~~~~~~~~~~~~~~~~~~
After having a CNF that can scale, we need to create a PM job. It
determines the monitoring metrics and monitoring resources to be
used by Prometheus.
.. note::
When having an NFVO client, the request is sent by NFVO.
The interface for creating PM jobs is defined in both
`ETSI NFV-SOL 002 v3.3.1`_ and `ETSI NFV-SOL 003 v3.3.1`_.
The following are the parameters required by this interface.
.. list-table:: additional params
:widths: 18 18 10 50
:header-rows: 1
* - Attribute name
- Data type
- Cardinality
- Description
* - objectType
- String
- 1
- Type of the measured object. The applicable measured object type for a
measurement is defined in clause 7.2 of `ETSI GS NFV-IFA 027`_.
* - objectInstanceIds
- Identifier
- 1..N
- Identifiers of the measured object instances for which performance
information is requested to be collected.
* - subObjectInstanceIds
- IdentifierInVnf
- 0..N
- Identifiers of the measured object instances in case of a structured
measured object.
* - criteria
- PmJobCriteria
- 1
- Criteria of the collection of performance information.
* - >performanceMetric
- String
- 0..N
- This defines the types of performance metrics for the specified object
instances. Valid values are specified as "Measurement Name" values in
clause 7.2 of `ETSI GS NFV-IFA 027`_. At least one of the two
attributes (performance metric or group) shall be present.
* - >performanceMetricGroup
- String
- 0..N
- Group of performance metrics. A metric group is a pre-defined list of
metrics, known to the API producer that it can decompose to individual
metrics. Valid values are specified as "Measurement Group" values in
clause 7.2 of `ETSI GS NFV-IFA 027`_. At least one of the two
attributes (performance metric or group) shall be present.
* - >collectionPeriod
- UnsignedInt
- 1
- Specifies the periodicity at which the API producer will collect
performance information. The unit shall be seconds.
* - >reportingPeriod
- UnsignedInt
- 1
- Specifies the periodicity at which the API producer will report to
the API consumer. about performance information. The unit shall be
seconds. The reportingPeriod should be equal to or a multiple of
the collectionPeriod.
* - >reportingBoundary
- DateTime
- 0..1
- Identifies a time boundary after which the reporting will stop. The
boundary shall allow a single reporting as well as periodic reporting
up to the boundary.
* - callbackUri
- Uri
- 1
- The URI of the endpoint to send the notification to.
* - authentication
- SubscriptionAuthentication
- 0..1
- Authentication parameters to configure the use of Authorization when
sending notifications corresponding to this subscription. See as
clause 8.3.4 of `ETSI GS NFV-SOL 013`_.
* - metadata
- Structure
- 1
- Additional parameters to create PM job.
* - >monitoring
- Structure
- 1
- Treats to specify such as monitoring system and driver information.
* - >>monitorName
- String
- 1
- In case specifying “prometheus”, backend of monitoring feature is
to be Prometheus.
* - >>driverType
- String
- 1
- “external”: SCP/SFTP for config file transfer.
* - >>targetsInfo
- Structure
- 1..N
- Information about the target monitoring system.
* - >>>prometheusHost
- String
- 1
- FQDN or ip address of target PrometheusServer.
* - >>>prometheusHostPort
- Int
- 1
- Port of the ssh target PrometheusServer.
* - >>>alertRuleConfigPath
- String
- 1
- Path of alertRuleConfig path for target Prometheus.
* - >>>prometheusReloadApiEndpoint
- String
- 1
- Endpoint url of reload API of target Prometheus.
* - >>>authInfo
- Structure
- 1
- Define authentication information to access host.
* - >>>>ssh_username
- String
- 1
- The username of the target host for ssh.
* - >>>>ssh_password
- String
- 1
- The password of the target host for ssh.
.. note::
* If ``subObjectInstanceIds`` is present, the cardinality of the
``objectInstanceIds`` attribute shall be 1.
* ``performanceMetric`` and ``performanceMetricGroup``, at least one of
the two attributes shall be present.
* ``objectType`` has only the following values: ``Vnf``, ``Vnfc``,
``VnfIntCP``, ``VnfExtCP``.
Create PM job can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job create sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"objectType": "Vnf",
"objectInstanceIds": ["495ffedf-2755-42c8-bf14-a5433701311e"],
"subObjectInstanceIds": [],
"criteria": {
"performanceMetric": [
"VcpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e"
],
"performanceMetricGroup": [
"VirtualizedComputeResource"
],
"collectionPeriod": 5,
"reportingPeriod": 10,
"reportingBoundary": "2022-06-23T04:56:00.910Z"
},
"callbackUri": "http://localhost:9990/notification/callback/test_performancemanagement_interface_min_1",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "auth_password",
"tokenEndpoint": "token_endpoint"
}
},
"metadata": {
"monitoring": {
"monitorName": "prometheus",
"driverType": "external",
"targetsInfo": [
{
"prometheusHost": "prometheusHost",
"prometheusHostPort": "22",
"authInfo": {
"ssh_username": "ssh_username",
"ssh_password": "ssh_password"
},
"alertRuleConfigPath": "/etc/prometheus/rules/tacker-rule.yml",
"prometheusReloadApiEndpoint": "http://localhost:9990/-/reload"
}
]
}
}
}
Here is an example of create PM job:
.. code-block:: console
$ openstack vnfpm job create sample_param_file.json --os-tacker-api-version 2
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback/test_performancemanagement_interface_min_1 |
| Criteria | { |
| | "performanceMetric": [ |
| | "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e" |
| | ], |
| | "collectionPeriod": 5, |
| | "reportingPeriod": 10 |
| | } |
| ID | ca9b58cf-8493-44e3-9e76-678ea0e80a80 |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | }, |
| | "objects": [ |
| | { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/495ffedf-2755-42c8-bf14-a5433701311e" |
| | } |
| | ] |
| | } |
| Object Instance Ids | [ |
| | "495ffedf-2755-42c8-bf14-a5433701311e" |
| | ] |
| Object Type | Vnf |
| Reports | [] |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
When creating a PM job, Tacker will modify the configuration file on the
specified Prometheus based on ``metadata``.
Then Prometheus will monitor the specified resource and send the monitored
information to Tacker.
Tacker converts the received monitoring information into a report and
sends a notification request to NFVO.
The following is the request body of a sample notification request.
.. code-block:: console
{
'id': 'c045dae8-cd94-4a29-b09c-96729060f2ad',
'notificationType': 'PerformanceInformationAvailableNotification',
'timeStamp': '2022-09-05T06:56:39Z',
'pmJobId': '34f7a186-88fa-4a42-a35f-30ea9ad710f1',
'objectType': 'Vnf',
'objectInstanceId': 'e30f5f45-522c-4e84-9b2d-9e1669708fff',
'_links': {
'objectInstance': {
'href': 'http://127.0.0.1:9890/vnflcm/v2/vnf_instances/e30f5f45-522c-4e84-9b2d-9e1669708fff'
},
'pmJob': {
'href': 'http://127.0.0.1:9890/vnfpm/v2/pm_jobs/34f7a186-88fa-4a42-a35f-30ea9ad710f1'
},
'performanceReport': {
'href': 'http://127.0.0.1:9890/vnfpm/v2/pm_jobs/34f7a186-88fa-4a42-a35f-30ea9ad710f1/reports/46e95584-7f11-4fd0-b59c-4688c37177ff'
}
}
}
.. note::
The target URL of this notification request is the ``Callback Uri``
field in the PM job.
How does NFVO Auto Scale CNF
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NFVO will send a get PM report request to Tacker according to the URL
of the report in the notification request.
The response returned by Tacker is as follows:
.. code-block:: console
{
'entries': [
{
'objectType': 'Vnf',
'objectInstanceId': 'e30f5f45-522c-4e84-9b2d-9e1669708fff',
'subObjectInstanceId': 'VDU2-curry-probe-test001-766bdd79bf-wgc7m',
'performanceMetric': 'VCpuUsageMeanVnf.e30f5f45-522c-4e84-9b2d-9e1669708fff',
'performanceValues': [
{
'timeStamp': '2022-09-05T08:02:58Z',
'value': 99.0
}
]
}
]
}
NFVO will determine whether a scale operation is required based on
the report data. If needed, a scale request will be sent to Tacker.
How to use the CLI of PM interfaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Create a PM job
^^^^^^^^^^^^^^^
The creation of PM job has been introduced in the
:ref:`Create PM job` above, and the use case of the CLI
command can be referred to there.
Get all PM jobs
^^^^^^^^^^^^^^^
Get all PM jobs can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job list --os-tacker-api-version 2
Here is an example of getting all PM jobs:
.. code-block:: console
$ openstack vnfpm job list --os-tacker-api-version 2
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
| Id | Object Type | Links |
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
| b8b4095a-148d-42b5-b714-9d703e6c7c62 | Vnf | { |
| | | "self": { |
| | | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/b8b4095a-148d-42b5-b714-9d703e6c7c62" |
| | | }, |
| | | "objects": [ |
| | | { |
| | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/97efce79-34c4-474d-87a0-38ad954f64af" |
| | | } |
| | | ] |
| | | } |
| ca9b58cf-8493-44e3-9e76-678ea0e80a80 | Vnf | { |
| | | "self": { |
| | | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | | }, |
| | | "objects": [ |
| | | { |
| | | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/495ffedf-2755-42c8-bf14-a5433701311e" |
| | | } |
| | | ] |
| | | } |
+--------------------------------------+-------------+----------------------------------------------------------------------------------------------------------+
Get the specified PM job
^^^^^^^^^^^^^^^^^^^^^^^^
Get the specified PM job can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job show JOB_ID --os-tacker-api-version 2
Here is an example of getting the specified PM job:
.. code-block:: console
$ openstack vnfpm job show ca9b58cf-8493-44e3-9e76-678ea0e80a80 --os-tacker-api-version 2
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback/test_performancemanagement_interface_min_1 |
| Criteria | { |
| | "performanceMetric": [ |
| | "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e" |
| | ], |
| | "collectionPeriod": 5, |
| | "reportingPeriod": 10 |
| | } |
| ID | ca9b58cf-8493-44e3-9e76-678ea0e80a80 |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | }, |
| | "objects": [ |
| | { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/495ffedf-2755-42c8-bf14-a5433701311e" |
| | } |
| | ] |
| | } |
| Object Instance Ids | [ |
| | "495ffedf-2755-42c8-bf14-a5433701311e" |
| | ] |
| Object Type | Vnf |
| Reports | [ |
| | { |
| | "href": "/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80/reports/53aafe25-7124-4880-8b58-47a93b3dc371", |
| | "readyTime": "2022-08-30T08:02:58Z" |
| | } |
| | ] |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
Change target PM job
^^^^^^^^^^^^^^^^^^^^
Updating a PM job can only change two fields, callbackUri and authentication.
It can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job update JOB_ID sample_param_file.json --os-tacker-api-version 2
The content of the sample ``sample_param_file.json`` in this document is
as follows:
.. code-block:: json
{
"callbackUri": "http://localhost:9990/notification/callback",
"authentication": {
"authType": [
"BASIC",
"OAUTH2_CLIENT_CREDENTIALS"
],
"paramsBasic": {
"userName": "nfvo",
"password": "nfvopwd"
},
"paramsOauth2ClientCredentials": {
"clientId": "auth_user_name",
"clientPassword": "auth_password",
"tokenEndpoint": "token_endpoint"
}
}
}
Here is an example of changing target PM job:
.. code-block:: console
$ openstack vnfpm job update ca9b58cf-8493-44e3-9e76-678ea0e80a80 sample_param_file.json --os-tacker-api-version 2
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
| Callback Uri | http://localhost:9990/notification/callback |
| Criteria | { |
| | "performanceMetric": [ |
| | "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e" |
| | ], |
| | "collectionPeriod": 5, |
| | "reportingPeriod": 10 |
| | } |
| ID | ca9b58cf-8493-44e3-9e76-678ea0e80a80 |
| Links | { |
| | "self": { |
| | "href": "http://127.0.0.1:9890/vnfpm/v2/pm_jobs/ca9b58cf-8493-44e3-9e76-678ea0e80a80" |
| | }, |
| | "objects": [ |
| | { |
| | "href": "http://127.0.0.1:9890/vnflcm/v2/vnf_instances/495ffedf-2755-42c8-bf14-a5433701311e" |
| | } |
| | ] |
| | } |
| Object Instance Ids | [ |
| | "495ffedf-2755-42c8-bf14-a5433701311e" |
| | ] |
| Object Type | Vnf |
| Reports | [] |
| Sub Object Instance Ids | |
+-------------------------+------------------------------------------------------------------------------------------------------------------------+
Delete the specified PM job
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Delete the specified PM job can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm job delete JOB_ID --os-tacker-api-version 2
Here is an example of deleting the specified PM job:
.. code-block:: console
$ openstack vnfpm job delete ca9b58cf-8493-44e3-9e76-678ea0e80a80 --os-tacker-api-version 2
VNF PM job 'ca9b58cf-8493-44e3-9e76-678ea0e80a80' deleted successfully
Get the specified PM report
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Get the specified PM report can be executed by the following CLI command.
.. code-block:: console
$ openstack vnfpm report show JOB_ID REPORT_ID --os-tacker-api-version 2
Here is an example of getting the specified PM report:
.. code-block:: console
$ openstack vnfpm report show ca9b58cf-8493-44e3-9e76-678ea0e80a80 53aafe25-7124-4880-8b58-47a93b3dc371 --os-tacker-api-version 2
+---------+---------------------------------------------------------------------------------------+
| Field | Value |
+---------+---------------------------------------------------------------------------------------+
| Entries | [ |
| | { |
| | "objectType": "Vnf", |
| | "objectInstanceId": "495ffedf-2755-42c8-bf14-a5433701311e", |
| | "performanceMetric": "VCpuUsageMeanVnf.495ffedf-2755-42c8-bf14-a5433701311e", |
| | "performanceValues": [ |
| | { |
| | "timeStamp": "2022-08-30T08:02:58Z", |
| | "value": "99.0" |
| | } |
| | ] |
| | } |
| | ] |
+---------+---------------------------------------------------------------------------------------+
.. _ETSI NFV-SOL 002 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/002/03.03.01_60/gs_nfv-sol002v030301p.pdf
.. _ETSI NFV-SOL 003 v3.3.1 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_nfv-sol003v030301p.pdf
.. _official website : https://prometheus.io/docs/prometheus/latest/getting_started/
.. _the sample : https://docs.openstack.org/tacker/latest/user/etsi_cnf_scaling.html#how-to-create-vnf-package-for-scaling
.. _ETSI GS NFV-IFA 027 : https://www.etsi.org/deliver/etsi_gs/NFV-IFA/001_099/027/03.03.01_60/gs_nfv-ifa027v030301p.pdf
.. _ETSI GS NFV-SOL 013 : https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/013/03.04.01_60/gs_nfv-sol013v030401p.pdf

View File

@ -162,3 +162,22 @@ VM
:maxdepth: 1
practical_sample_package_usage_guide
Prometheus Plugin
^^^^^^^^^^^^^^^^^
Auto Scaling
~~~~~~~~~~~~
.. toctree::
:maxdepth: 1
etsi_cnf_auto_scaling_pm
Auto Healing
~~~~~~~~~~~~
.. toctree::
:maxdepth: 1
etsi_cnf_auto_healing_fm

View File

@ -52,3 +52,4 @@ Use Case Guide
legacy_use_case_guide
oauth2_usage_guide
fault_notification_use_case_guide
prometheus_plugin_use_case_guide

View File

@ -0,0 +1,336 @@
================================
Prometheus Plugin Use Case Guide
================================
Overview
~~~~~~~~
This document describes about Prometheus Plugin that provides
monitoring functions in combination with External Monitoring Tool
The Prometheus Plugin has 3 functions:
- Alerting function for ETSI NFV-SOL 002/003 based Performance Management.
- Alerting function for ETSI NFV-SOL 002/003 based Fault Management.
- Alerting function for Prometheus Plugin AutoScaling.
The Prometheus Plugin works in conjunction with the External Monitoring
Tool. External Monitoring Tool is a monitoring service based on Prometheus.
When External Monitoring Tool detects an alerting event on CNF,
External Monitoring Tool sends an alert to Prometheus Plugin.
The External Monitoring Tool is implemented by each operators,
thus it is not included in Tacker.
Configuration
~~~~~~~~~~~~~
Prometheus Plugin is disabled by default.
It can be enabled by configuration file (e.g. /etc/tacker/tacker.conf).
To enable Prometheus Plugin, be sure to set true for
performance_management, fault_management or auto_scaling below.
.. list-table::
:header-rows: 1
:widths: 20 10 40
* - Configuration
- Default
- Description
* - ``CONF.prometheus_plugin.performance_management``
- false
- Enable prometheus plugin performance management.
* - ``CONF.prometheus_plugin.reporting_period_margin``
- 1
- Some margin time for PM jos's reportingPeriod.
When multiple alerts are received within a time period
shorter than (reportingPeriod - reporting_period_margin),
the subsequent alerts are ignored.
* - ``CONF.prometheus_plugin.fault_management``
- false
- Enable prometheus plugin fault management.
* - ``CONF.prometheus_plugin.auto_scaling``
- false
- Enable prometheus plugin autoscaling.
System
~~~~~~
Prometheus Plugin needs external service called External
Monitoring Tool.
Prometheus Plugin operates the External Monitoring Tool
along the Performance Management, Fault Management or Auto scaling.
The flow of each process is as follows.
- ``ETSI NFV-SOL 002/003 based Performance Management``
.. code-block:: console
+---------------------------------+
| Client (NFVO/EM) |
| 8. Perform scaling if necessary <--+
+----+----------------------------+ |
| 1.Create PM job | 7. Notify PM event
+----v-------------------------------+---------------+
| Tacker |
+-------------+ | +------------------------------------------------+ |
| External | 3. Set alert rule | | Prometheus Plugin | |
| Monitoring <-------------------+ | 2. Convert PM job to Prometheus Alert Rule | |
| Tool | 5. Send alert | | | |
| +-------------------> | 6. Convert Prometheus Alert event to PM event | |
| | | +------------------------------------------------+ |
+--+----------+ +----------------------------------------------------+
| 4. Performance
| monitoring +----------------------------------------------------+
| | CISM/CIS |
| | +------------+ +------------+ +------------+ |
+------------------------------> | CNF | | CNF | | CNF | |
| +------------+ +------------+ +------------+ |
+----------------------------------------------------+
- ``ETSI NFV-SOL 002/003 based Fault Management``
.. code-block:: console
+---------------------------------+
| Client (NFVO/EM) |
+----------------------------+ 7. Perform healing if necessary <--+
| 2. Set alert rule +----+----------------------------+ |
| | 1. Subscribe FM alarms | 6. Notify FM alarm
| +----v-------------------------------+---------------+
| | Tacker |
+---v---------+ | +------------------------------------------------+ |
| External | 4. Send alert | | Prometheus Plugin | |
| Monitoring +------------------> | 5. Convert Prometheus Alert event to FM alarm | |
| Tool | | +------------------------------------------------+ |
+--+----------+ +----------------------------------------------------+
| 3. Fault
| monitoring +----------------------------------------------------+
| | CISM/CIS |
| | +------------+ +------------+ +------------+ |
+-----------------------------> | CNF | | CNF | | CNF | |
| +------------+ +------------+ +------------+ |
+----------------------------------------------------+
- ``Prometheus Plugin AutoScaling``
.. code-block:: console
+--------------------------+
+----------------------------+ Client (NFVO/EM) |
| 1. Set alert rule +--------------------------+
|
| +----------------------------------------------------+
| | Tacker |
+---v---------+ | +------------------------------------------------+ |
| External | 3. Send alert | | Prometheus Plugin | |
| Monitoring +------------------> | 4. Perform scaling | |
| Tool | | +------------------------------------------------+ |
+--+----------+ +-----------------------+----------------------------+
| 2. Scaling event | 5. Delete or Create pods
| monitoring +-----------------------|----------------------------+
| | +-----------+--------------+ CISM/VIM |
| | +---------v--+ +----v-------+ +--v---------+ |
+-----------------------------> | CNF/VNF | | CNF/VNF | | CNF/VNF | |
| +------------+ +------------+ +------------+ |
+----------------------------------------------------+
External Monitoring Tool
~~~~~~~~~~~~~~~~~~~~~~~~
External Monitoring Tool is consist of Prometheus Server,
AlertManager and SSH Server.
This section describes the requirements for each service.
Prometheus Server
-----------------
Prometheus Server needs config to scrape kubernetes information.
For example:
.. code-block:: yaml
global:
scrape_interval: 30s
evaluation_interval: 30s
rule_files:
- /etc/prometheus/rules/*.json
alerting:
alertmanagers:
- static_configs:
- targets:
- <alertmanager_host>
scrape_configs:
- job_name: "kubestatemetrics"
static_configs:
- targets: ["<kube-state-metrics exporter host>"]
- job_name: "k8smetricsresourceworker1"
static_configs:
- targets: ["<worker1 exporter host>"]
metrics_path: "/api/v1/nodes/worker1/proxy/metrics/resource"
- job_name: "k8smetricscadvisorworker1"
static_configs:
- targets: ["<worker1 exporter host>"]
metrics_path: "/api/v1/nodes/worker1/proxy/metrics/cadvisor"
- job_name: "k8smetricsresourceworker2"
static_configs:
- targets: ["<worker2 exporter host>"]
metrics_path: "/api/v1/nodes/worker2/proxy/metrics/resource"
- job_name: "k8smetricscadvisorworker2"
static_configs:
- targets: ["<worker2 exporter host>"]
metrics_path: "/api/v1/nodes/worker2/proxy/metrics/cadvisor"
Alert Manager
-------------
Alert manager needs to setup to send alert to Tacker.
For example:
.. code-block:: yaml
global:
route:
group_by:
- "k8smetricsresourceworker1"
- "k8smetricscadvisorworker1"
- "k8smetricsresourceworker2"
- "k8smetricscadvisorworker2"
group_wait: 30s
group_interval: 30s
repeat_interval: 30s
receiver: default-receiver
routes:
- matchers:
- function_type = vnfpm
receiver: vnfpm
- matchers:
- function_type = vnffm
receiver: vnffm
- matchers:
- function_type = auto-scale
receiver: auto-scale
receivers:
- name: default-receiver
- name: vnfpm
webhook_configs:
- url: "http://<tacker_host>/pm_event"
- name: vnffm
webhook_configs:
- url: "http://<tacker_host>/alert"
- name: auto-scale
webhook_configs:
- url: "http://<tacker_host>/alert/vnf_instances"
SSH server
----------
Tacker sends alert rule file via SSH. So External Monitoring Tool
needs to activate sshd.
- PasswordAuthentication setting should be "yes".
- The directory indicated by "rule_files" setting of prometheus
server config should be accessible by SSH.
Alert rule registration
~~~~~~~~~~~~~~~~~~~~~~~
ETSI NFV-SOL 002/003 based Performance Management
--------------------------------------------------
Registration of alerting rule is performed through
PM job creation. Below is example of request body
of PM job creation.
Access information of External Monitoring Tool must be set
at "metadata" field.
.. code-block:: json
{
"objectType": "Vnf",
"objectInstanceIds": ["507280d8-bfc5-4b88-904b-9280ba6bc3ea"],
"criteria": {
"performanceMetric": [
"VCpuUsageMeanVnf.507280d8-bfc5-4b88-904b-9280ba6bc3ea"],
"collectionPeriod": 30,
"reportingPeriod": 30,
"reportingBoundary": "2099-08-05T02:24:46Z"
},
"callbackUri": "<client_callback_uri>",
"metadata": {
"monitoring": {
"monitorName": "prometheus",
"driverType": "external",
"targetsInfo": [
{
"prometheusHost": "<prometheus_server_hostname>",
"authInfo": {
"ssh_username": "ubuntu",
"ssh_password": "ubuntu"
},
"alertRuleConfigPath":
"/etc/prometheus/rules",
"prometheusReloadApiEndpoint":
"http://<prometheus_server_hostname>/-/reload"
}
]
}
}
}
ETSI NFV-SOL 002/003 based Fault Management
-------------------------------------------
Registration of alerting rule is performed by updating
rule file directly. Below is example of alert rule.
.. code-block:: yaml
groups:
- name: example
rules:
- alert: Test
expr: sum(pod_memory_working_set_bytes{namespace="default"}) > 10000000000
for: 30s
labels:
receiver_type: tacker
function_type: vnffm
vnf_instance_id: 3721ab69-3f33-44bc-85f1-f416ad1b765e
pod: test\\-test1\\-[0-9a-f]{1,10}-[0-9a-z]{5}$
perceived_severity: CRITICAL,
event_type: PROCESSING_ERROR_ALARM
annotations:
probable_cause: Server is down.
fault_type: Error
fault_details: Fault detail
Prometheus Plugin AutoScaling
-----------------------------
Registration of alerting rule is performed by updating
rule file directly. Below is example of alert rule.
.. code-block:: yaml
groups:
- name: example
rules:
- alert: Test
expr: sum(pod_memory_working_set_bytes{namespace="default"}) > 10000000000
for: 30s
labels:
receiver_type: tacker
function_type: auto_scale
vnf_instance_id: 3721ab69-3f33-44bc-85f1-f416ad1b765e
auto_scale_type: SCALE_OUT,
aspect_id: VDU1_aspect
annotations: