mirror of
https://github.com/openfaas/faas.git
synced 2025-06-14 03:06:46 +00:00
Add nmap sample
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
parent
44609aa189
commit
01450bdf17
@ -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 }}"
|
||||
}
|
||||
|
8
sample-functions/Nmap/Dockerfile
Normal file
8
sample-functions/Nmap/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
||||
FROM functions/alpine:latest
|
||||
|
||||
RUN apk add --no-cache nmap
|
||||
|
||||
ENV fprocess="xargs nmap"
|
||||
|
||||
|
||||
CMD ["fwatchdog"]
|
@ -83,3 +83,8 @@ functions:
|
||||
handler: ./WordCountFunction
|
||||
image: functions/wordcount:latest
|
||||
|
||||
nmap:
|
||||
lang: Dockerfile
|
||||
handler: ./Nmap
|
||||
image: functions/nmap:0.1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user