Compare commits
2 commits
45ca6a926b
...
23a0e3bdab
Author | SHA1 | Date | |
---|---|---|---|
|
23a0e3bdab | ||
|
f5abb9f427 |
2 changed files with 4 additions and 4 deletions
|
@ -18,9 +18,9 @@ RUN addgroup -S -g 777 ssl
|
|||
RUN addgroup nginx ssl
|
||||
|
||||
# Databases
|
||||
RUN wget "${CRAWLERS}" -O /tmp/crawler-user-agents.json
|
||||
RUN wget ${GEOIP2_DATABASE} -O - | tar -xJf - \
|
||||
&& rm usr/share/GeoIP/GeoLite2-ASN.mmdb .BUILDINFO .MTREE .PKGINFO
|
||||
RUN wget "${CRAWLERS}" -O /usr/share/nginx/crawler-user-agents.json
|
||||
|
||||
COPY ./monit.conf /etc/monit.d/nginx.conf
|
||||
COPY ./prometheusd.sh /usr/local/bin/prometheusd
|
||||
|
|
|
@ -5,13 +5,13 @@ pid=/tmp/prometheus.pid
|
|||
|
||||
case $1 in
|
||||
start)
|
||||
rm -f ${pid}
|
||||
daemonize -c /tmp -p ${pid} -l ${pid} -u nobody \
|
||||
/usr/local/bin/syslogize \
|
||||
/usr/bin/nginx-prometheus-exporter -nginx.scrape-uri http://127.0.0.1:8080/stub_status
|
||||
|
||||
;;
|
||||
stop)
|
||||
cat /tmp/prometheus.pid | xargs -r kill
|
||||
|
||||
test ! -f ${pid} || cat ${pid} | xargs -r kill
|
||||
rm -f ${pid}
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue