diff --git a/prometheus/alert.rules b/prometheus/alert.rules deleted file mode 100644 index 10d5b7cd..00000000 --- a/prometheus/alert.rules +++ /dev/null @@ -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 }}" - } - diff --git a/sample-functions/Nmap/Dockerfile b/sample-functions/Nmap/Dockerfile new file mode 100644 index 00000000..e0eb4570 --- /dev/null +++ b/sample-functions/Nmap/Dockerfile @@ -0,0 +1,8 @@ +FROM functions/alpine:latest + +RUN apk add --no-cache nmap + +ENV fprocess="xargs nmap" + + +CMD ["fwatchdog"] diff --git a/sample-functions/samples.yml b/sample-functions/samples.yml index 62f62f63..f1b791c2 100644 --- a/sample-functions/samples.yml +++ b/sample-functions/samples.yml @@ -83,3 +83,8 @@ functions: handler: ./WordCountFunction image: functions/wordcount:latest + nmap: + lang: Dockerfile + handler: ./Nmap + image: functions/nmap:0.1 +