Move to HA for gateway

This commit is contained in:
Alex Ellis
2017-06-26 12:38:00 +01:00
parent 8b593f348f
commit 79b13f685e
2 changed files with 10 additions and 3 deletions

View File

@ -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 }}"
} }

View File

@ -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