diff --git a/Dockerfile b/Dockerfile index fa7e910..459a721 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,8 @@ FROM ${BASE_IMAGE}:${ALPINE_VERSION} MAINTAINER "f " ARG KNOT_VERSION=3.1.8 -RUN apk add --no-cache knot~${KNOT_VERSION} knot-prometheus-exporter daemonize +RUN apk add --no-cache knot~${KNOT_VERSION} COPY ./monit.conf /etc/monit.d/knot.conf -COPY ./prometheusd.sh /usr/local/bin/prometheusd EXPOSE 53 EXPOSE 53/udp diff --git a/monit.conf b/monit.conf index f3fee86..cd5d961 100644 --- a/monit.conf +++ b/monit.conf @@ -4,7 +4,3 @@ check process knot with pidfile /tmp/knot.pid if 5 restarts within 8 cycles then alert if failed port 53 type udp protocol dns for 3 times within 5 cycles then restart if failed port 53 type tcp protocol dns for 3 times within 5 cycles then restart - -check process prometheus with pidfile /tmp/prometheus.pid - start program = "/usr/local/bin/prometheusd start" - stop program = "/usr/local/bin/prometheusd stop" diff --git a/prometheusd.sh b/prometheusd.sh deleted file mode 100755 index 9194742..0000000 --- a/prometheusd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -e - -STATS=${STATS:-/tmp/stats.yaml} -pid=/tmp/prometheus.pid - -case $1 in - start) - test -f $pid && echo "prometheus-exporter already running" - daemonize -c /tmp -p $pid -l $pid -u knot /usr/local/bin/syslogize /usr/bin/knot-prometheus-exporter ${STATS} - ;; - stop) - test -f $pid && cat $pid | xargs -r kill || true - rm -f $pid - ;; -esac