Sign inSign up

giannisb/rpi-prometheus

By giannisb

•Updated almost 8 years ago

Prometheus (https://prometheus.io/) for Raspberry Pi

Image
0

354

giannisb/rpi-prometheus repository overview

⁠rpi-prometheus

⁠How to run
⁠Default configuration

docker run -d --restart always --net host --name prometheus -v /opt/prometheus/data:/prometheus giannisb/rpi-prometheus:2.4.2

⁠Custom configuration with mounted data volume

docker run -d --restart always --net host --name prometheus -v /opt/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml -v /opt/prometheus/data:/prometheus giannisb/rpi-prometheus:2.4.2

⁠Dockerfile
FROM resin/rpi-raspbian:latest

ENV PROMETHEUS_VERSION 2.4.2

RUN apt-get update && \
    apt-get install -qy \
    curl ca-certificates

ADD https://github.com/prometheus/prometheus/releases/download/v$PROMETHEUS_VERSION/prometheus-$PROMETHEUS_VERSION.linux-armv7.tar.gz /tmp/prometheus.tar.gz

RUN mkdir /etc/prometheus
ADD prometheus.yml /etc/prometheus

RUN tar -xf /tmp/prometheus.tar.gz && rm -rf /tmp/prometheus.tar.gz && \
    mv prometheus-${PROMETHEUS_VERSION}.linux-armv7/console_libraries /etc/prometheus/ && \
    mv prometheus-${PROMETHEUS_VERSION}.linux-armv7/consoles /etc/prometheus/ && \
    mv prometheus-${PROMETHEUS_VERSION}.linux-armv7/prometheus /usr/bin/ && \
    mv prometheus-${PROMETHEUS_VERSION}.linux-armv7/promtool /usr/bin/ && \
    rm -rf prometheus-${PROMETHEUS_VERSION}.linux-armv7

VOLUME [ "/etc/prometheus/", "/prometheus" ]

EXPOSE 9090

ENTRYPOINT [ "/usr/bin/prometheus" ]
CMD ["--config.file=/etc/prometheus/prometheus.yml", \
     "--storage.tsdb.path=/prometheus", \
     "--web.console.libraries=/usr/share/prometheus/console_libraries", \
     "--web.console.templates=/usr/share/prometheus/consoles" ]

Tag summary

Content type

Image

Digest

Size

124.8 MB

Last updated

almost 8 years ago

docker pull giannisb/rpi-prometheus:2.4.3