Compare commits

..

No commits in common. "815f9b23d85e1998ffe8e6bb620cafd4b607a911" and "c4d0c8ac35dd6fee2060a3e494f5c7be5fee5201" have entirely different histories.

4 changed files with 1 additions and 33 deletions

View file

@ -4,7 +4,7 @@ pipeline:
settings:
registry: registry.nulo.in
username: sutty
repo: registry.nulo.in/sutty/prometheus
repo: registry.nulo.in/sutty/CHANGEME
tags:
- ${ALPINE_VERSION}
- latest

View file

@ -2,10 +2,3 @@ ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>"
RUN apk add --no-cache prometheus daemonize
COPY ./monit.conf /etc/monit.d/prometheus.conf
COPY ./prometheusd.sh /usr/local/bin/prometheusd
EXPOSE 9090
VOLUME /var/lib/prometheus

View file

@ -1,4 +0,0 @@
check process prometheus with pidfile /tmp/prometheus.pid
start program = "/usr/local/bin/prometheusd start"
stop program = "/usr/local/bin/prometheusd stop"
if 5 restarts within 8 cycles then alert

View file

@ -1,21 +0,0 @@
#!/bin/sh
pid=/tmp/prometheus.pid
var=/var/lib/prometheus
case $1 in
stop)
test ! -f $pid || cat ${pid} | xargs -r kill
rm -f ${pid}
;;
start)
chown -R prometheus:prometheus "${var}"
chmod -R u=rwX,g=rX,o= "${var}"
daemonize -p "${pid}" -l "${pid}" -u prometheus -c "${var}" \
/usr/local/bin/syslogize \
/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path="${var}/data"
;;
esac
exit $?