Prometheus Plugin Interface

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.

POST
/pm_event

Alerting interface for ETSI NFV-SOL 002/003 based Performance Management

Alert Tacker when one or more Performance values are obtained.

Response Codes

Success

Code

Reason

204 - No Content

The server has fulfilled the request by deleting the resource.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

404 - Not Found

The Prometheus Plugin API is not enabled. (CONF.prometheus_plugin.performance_management)

Request Parameters

Name

In

Type

Description

alert

body

array(inlined)

alert message

>status

body

String

‘firing’: alert is fired, ‘resolved’: alert is cleared.

>labels

body

object (inlined)

static properties.

>>receiver_type

body

string

must be “tacker”.

>>function_type

body

string

must be “vnfpm”.

>>job_id

body

string

PM job id defined in ETSI PM interface.

>>object_instance_id

body

string

objectInstanceId defined in ETSI PM interface.

>>sub_object_instance_id

body

string

subObjectInstanceId defined in ETSI PM interface.

>>metric

body

string

PerformanceMetric defined in ETSI PM interface.

>annotations

body

object (inlined)

dynamic properties.

>>value

body

number

aspectId of the scaling target.

>startsAt

body

string

alert firing time.

>endsAt

body

string

alert expiration time.

>fingerprint

body

string

id to identify alert.

Request Example

{
    "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"
    }]
}
POST
/alert

Alerting interface for ETSI NFV-SOL 002/003 based Fault Management

Alert Tacker when one or more Fault event are obtained.

Response Codes

Success

Code

Reason

204 - No Content

The server has fulfilled the request by deleting the resource.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

404 - Not Found

The Prometheus Plugin API is not enabled. (CONF.prometheus_plugin.fault_management)

Request Parameters

Name

In

Type

Description

alert

body

array(inlined)

alert message

>status

body

String

‘firing’: alert is fired, ‘resolved’: alert is cleared.

>labels

body

object (inlined)

static properties.

>>receiver_type

body

string

must be “tacker”.

>>function_type

body

string

must be “vnffm”.

>>vnf_instance_id

body

string

Vnf Instance id.

>>pod

body

string

Regex string that matches pods of Healing target. For example, ‘test-test1-[0-9a-f]{1,10}-[0-9a-z]{5}’

>>perceived_severity

body

string

perceivedSeverity value defined in ETSI FM interface.

>>event_type

body

string

eventType value defined in ETSI FM interface.

>annotations

body

object (inlined)

dynamic properties.

>>probable_cause

body

string

probableCause defined in ETSI FM interface.

>>fault_type

body

string

faultType defined in ETSI FM interface.

>>fault_details

body

string

faultDetails defined in ETSI FM interface.

>startsAt

body

string

alert firing time.

>endsAt

body

string

alert expiration time.

>fingerprint

body

string

id to identify alert.

Request Example

{
    "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"
    }]
}
POST
/alert

Alerting interface for Prometheus Plugin AutoScaling

Alert Tacker when scaling should be performed.

Response Codes

Success

Code

Reason

204 - No Content

The server has fulfilled the request by deleting the resource.

Error

Code

Reason

400 - Bad Request

Some content in the request was invalid.

404 - Not Found

The Prometheus Plugin API is not enabled. (CONF.prometheus_plugin.auto_scaling)

Request Parameters

Name

In

Type

Description

alert

body

array(inlined)

alert message

>status

body

String

‘firing’: alert is fired, ‘resolved’: alert is cleared.

>labels

body

object (inlined)

static properties.

>>receiver_type

body

string

must be “tacker”.

>>function_type

body

string

must be “auto_scale”.

>>vnf_instance_id

body

string

Vnf Instance id.

>>auto_scale_type

body

string

‘SCALE_OUT’ for scaling out, ‘SCALE_IN’ for scaling in.

>>aspect_id

body

string

aspectId of the scaling target.

>annotations

body

object (inlined)

dynamic properties.

>startsAt

body

string

alert firing time.

>endsAt

body

string

alert expiration time.

>fingerprint

body

string

id to identify alert.

Request Example

{
    "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"
    }]
}