mirror of
https://github.com/openfaas/faas.git
synced 2025-06-26 16:53:26 +00:00
Move to HA for gateway
This commit is contained in:
@ -2,7 +2,7 @@ ALERT service_down
|
|||||||
IF up == 0
|
IF up == 0
|
||||||
|
|
||||||
ALERT APIHighInvocationRate
|
ALERT APIHighInvocationRate
|
||||||
IF rate ( gateway_function_invocation_total [10s] ) > 5
|
IF sum ( rate(gateway_function_invocation_total{code="200"}[10s]) ) by (function_name) > 5
|
||||||
FOR 5s
|
FOR 5s
|
||||||
LABELS {
|
LABELS {
|
||||||
service = "gateway",
|
service = "gateway",
|
||||||
@ -13,3 +13,4 @@ ALERT APIHighInvocationRate
|
|||||||
summary = "High invocation total on {{ $labels.instance }}",
|
summary = "High invocation total on {{ $labels.instance }}",
|
||||||
description = "High invocation total on {{ $labels.instance }}"
|
description = "High invocation total on {{ $labels.instance }}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,5 +30,11 @@ scrape_configs:
|
|||||||
|
|
||||||
- job_name: "gateway"
|
- job_name: "gateway"
|
||||||
scrape_interval: 5s
|
scrape_interval: 5s
|
||||||
static_configs:
|
dns_sd_configs:
|
||||||
- targets: ['gateway:8080']
|
- names: ['tasks.gateway']
|
||||||
|
port: 8080
|
||||||
|
type: A
|
||||||
|
refresh_interval: 5s
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user