mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 12:06:37 +00:00
Include Alert endpoint in docs
This commit is contained in:
@ -62,6 +62,72 @@ paths:
|
|||||||
description: "OK"
|
description: "OK"
|
||||||
404:
|
404:
|
||||||
description: "Function not found in gateway"
|
description: "Function not found in gateway"
|
||||||
|
/system/alert:
|
||||||
|
post:
|
||||||
|
summary: "Event-sink for AlertManager, for auto-scaling"
|
||||||
|
description: "Internal use for AlertManager, requires valid AlertManager alert JSON"
|
||||||
|
consumes:
|
||||||
|
- "application/json"
|
||||||
|
produces:
|
||||||
|
- "application/json"
|
||||||
|
parameters:
|
||||||
|
- in: "body"
|
||||||
|
name: "body"
|
||||||
|
description: "Function to delete"
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
example: |-
|
||||||
|
{"receiver": "scale-up",
|
||||||
|
"status": "firing",
|
||||||
|
"alerts": [{
|
||||||
|
"status": "firing",
|
||||||
|
"labels": {
|
||||||
|
"alertname": "APIHighInvocationRate",
|
||||||
|
"code": "200",
|
||||||
|
"function_name": "func_nodeinfo",
|
||||||
|
"instance": "gateway:8080",
|
||||||
|
"job": "gateway",
|
||||||
|
"monitor": "faas-monitor",
|
||||||
|
"service": "gateway",
|
||||||
|
"severity": "major",
|
||||||
|
"value": "8.998200359928017"
|
||||||
|
},
|
||||||
|
"annotations": {
|
||||||
|
"description": "High invocation total on gateway:8080",
|
||||||
|
"summary": "High invocation total on gateway:8080"
|
||||||
|
},
|
||||||
|
"startsAt": "2017-03-15T15:52:57.805Z",
|
||||||
|
"endsAt": "0001-01-01T00:00:00Z",
|
||||||
|
"generatorURL": "http://4156cb797423:9090/graph?g0.expr=rate%28gateway_function_invocation_total%5B10s%5D%29+%3E+5\u0026g0.tab=0"
|
||||||
|
}],
|
||||||
|
"groupLabels": {
|
||||||
|
"alertname": "APIHighInvocationRate",
|
||||||
|
"service": "gateway"
|
||||||
|
},
|
||||||
|
"commonLabels": {
|
||||||
|
"alertname": "APIHighInvocationRate",
|
||||||
|
"code": "200",
|
||||||
|
"function_name": "func_nodeinfo",
|
||||||
|
"instance": "gateway:8080",
|
||||||
|
"job": "gateway",
|
||||||
|
"monitor": "faas-monitor",
|
||||||
|
"service": "gateway",
|
||||||
|
"severity": "major",
|
||||||
|
"value": "8.998200359928017"
|
||||||
|
},
|
||||||
|
"commonAnnotations": {
|
||||||
|
"description": "High invocation total on gateway:8080",
|
||||||
|
"summary": "High invocation total on gateway:8080"
|
||||||
|
},
|
||||||
|
"externalURL": "http://f054879d97db:9093",
|
||||||
|
"version": "3",
|
||||||
|
"groupKey": 18195285354214864953
|
||||||
|
}
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: "Alert handled successfully"
|
||||||
|
500:
|
||||||
|
description: "Internal error with swarm or request JSON invalid"
|
||||||
definitions:
|
definitions:
|
||||||
DeleteFunctionRequest:
|
DeleteFunctionRequest:
|
||||||
type: "object"
|
type: "object"
|
||||||
|
Reference in New Issue
Block a user