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 5 functions:
Alerting interface for ETSI NFV-SOL 002/003 based Performance Management Job.
Alerting interface for ETSI NFV-SOL 002/003 based Performance Management Threshold.
Alerting interface for ETSI NFV-SOL 002/003 based Fault Management.
Alerting interface for Prometheus Plugin AutoScaling.
Alerting interface for Prometheus Plugin AutoHealing.
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 |
---|---|---|---|
alerts |
body |
array |
alerts messages. |
status |
body |
String |
‘firing’: alert is fired, ‘resolved’: alert is cleared. |
labels |
body |
object |
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 (Optional) |
body |
string |
subObjectInstanceId defined in ETSI PM interface. |
metric |
body |
string |
PerformanceMetric defined in ETSI PM interface. |
annotations |
body |
object |
dynamic properties. |
value (Optional) |
body |
number |
The result value returned by the PromQL statement. |
startsAt |
body |
string |
alert firing time. |
endsAt (Optional) |
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"
}]
}
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 |
---|---|---|---|
alerts |
body |
array |
alerts messages. |
status |
body |
String |
‘firing’: alert is fired, ‘resolved’: alert is cleared. |
labels |
body |
object |
static properties. |
receiver_type |
body |
string |
must be “tacker”. |
function_type |
body |
string |
must be “vnfpm_threshold”. |
threshold_id |
body |
string |
PM Threshold id defined in ETSI PM interface. |
object_instance_id |
body |
string |
objectInstanceId defined in ETSI PM interface. |
sub_object_instance_id (Optional) |
body |
string |
subObjectInstanceId defined in ETSI PM interface. |
metric |
body |
string |
PerformanceMetric defined in ETSI PM interface. |
annotations |
body |
object |
dynamic properties. |
value (Optional) |
body |
number |
The result value returned by the PromQL statement. |
startsAt |
body |
string |
alert firing time. |
endsAt (Optional) |
body |
string |
alert expiration time. |
fingerprint |
body |
string |
id to identify alert. |
Request Example¶
{
"alerts": [{
"status": "firing",
"labels": {
"receiver_type": "tacker",
"function_type": "vnfpm_threshold",
"threshold_id": "bb474274-c5eb-442b-e2a2-0c1c02437bac",
"metric": "VCpuUsageMeanVnf.4fcf78d6-52d9-4b6a-b3a6-49b2bef65843",
"object_instance_id": "4fcf78d6-52d9-4b6a-b3a6-49b2bef65843",
"sub_object_instance_id": "938f673e-1eae-44d1-8847-cce5f64ac00e"
},
"annotations": {
"value": 99
},
"startsAt": "2023-01-03T23:47:36.453Z",
"endsAt": "0001-01-01T00:00:00Z",
"fingerprint": "5ef77f1f8a3ecb8d"
}]
}
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 |
---|---|---|---|
alerts |
body |
array |
alerts messages. |
status |
body |
String |
‘firing’: alert is fired, ‘resolved’: alert is cleared. |
labels |
body |
object |
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 |
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 (Optional) |
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"
}]
}
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 |
---|---|---|---|
alerts |
body |
array |
alerts messages. |
status |
body |
String |
‘firing’: alert is fired, ‘resolved’: alert is cleared. |
labels |
body |
object |
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 |
dynamic properties. |
startsAt |
body |
string |
alert firing time. |
endsAt (Optional) |
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"
}]
}
Alert Tacker when healing should be performed.
This interface can be alerted by multiple times in a short period. To prevent invoking multiple heal operations to single VNF, the multiple requests by this interface are packed for a configured period of time (CONF.prometheus_plugin.timer_interval).
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_healing) |
Request Parameters¶
Name |
In |
Type |
Description |
---|---|---|---|
alerts |
body |
array |
alerts messages. |
status |
body |
String |
‘firing’: alert is fired, ‘resolved’: alert is cleared. |
labels |
body |
object |
static properties. |
receiver_type |
body |
string |
must be “tacker”. |
function_type |
body |
string |
must be “auto_heal”. |
vnf_instance_id |
body |
string |
Vnf Instance id. |
vnfc_info_id |
body |
string |
Vnfc Info id. |
annotations |
body |
object |
dynamic properties. |
startsAt |
body |
string |
alert firing time. |
endsAt (Optional) |
body |
string |
alert expiration time. |
fingerprint |
body |
string |
id to identify alert. |
Request Example¶
{
"alerts": [{
"status": "firing",
"labels": {
"receiver_type": "tacker",
"function_type": "auto_heal",
"vnf_instance_id": "503e635e-dcd8-4fae-9939-279af4c528b1",
"vnfc_info_id": "VDU1-85adebfa-d71c-49ab-9d39-d8dd7e393541"
},
"annotations": {
},
"startsAt": "2022-06-21T23:47:36.453Z",
"endsAt": "0001-01-01T00:00:00Z",
"fingerprint": "5ef77f1f8a3ecb8d"
}]
}