Add nmap sample

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis 2017-12-30 21:26:54 +00:00
parent 44609aa189
commit 01450bdf17
3 changed files with 13 additions and 16 deletions

View File

@ -1,16 +0,0 @@
ALERT service_down
IF up == 0
ALERT APIHighInvocationRate
IF sum ( rate(gateway_function_invocation_total{code="200"}[10s]) ) by (function_name) > 5
FOR 5s
LABELS {
service = "gateway",
severity = "major",
value = "{{$value}}"
}
ANNOTATIONS {
summary = "High invocation total on {{ $labels.instance }}",
description = "High invocation total on {{ $labels.instance }}"
}

View File

@ -0,0 +1,8 @@
FROM functions/alpine:latest
RUN apk add --no-cache nmap
ENV fprocess="xargs nmap"
CMD ["fwatchdog"]

View File

@ -83,3 +83,8 @@ functions:
handler: ./WordCountFunction handler: ./WordCountFunction
image: functions/wordcount:latest image: functions/wordcount:latest
nmap:
lang: Dockerfile
handler: ./Nmap
image: functions/nmap:0.1