prometheus

This commit is contained in:
f 2020-09-09 15:26:37 -03:00
parent c06dc5a527
commit f106771da9
2 changed files with 16 additions and 0 deletions

View file

@ -1,2 +1,8 @@
FROM sutty/monit:latest FROM sutty/monit:latest
MAINTAINER "f <f@sutty.nl>" MAINTAINER "f <f@sutty.nl>"
RUN apk add --no-cache prometheus daemonize
COPY ./prometheusd.sh /usr/local/bin/prometheusd
EXPOSE 9090
VOLUME /var/lib/prometheus

10
prometheusd.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
pid=/tmp/prometheus.pid
var=/var/lib/prometheus
log=/dev/log
chown prometheus:prometheus /var/lib/prometheus/data
daemonize -p "${pid}" -l "${pid}" -u prometheus -c "${var}" -a -o "${log}" -e "${log}" \
/usr/bin/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.path="${var}/data"