├── README.md ├── prometheus.yml └── prometheus ├── Dockerfile ├── README.md └── prometheus.yml /README.md: -------------------------------------------------------------------------------- 1 | # A Dockerized Prometheus Image for Raspberry Pi 3 2 | 3 | Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true. 4 | 5 | In case you are Raspberry Pi user and want to try it, check this out ! 6 | 7 | Features 8 | ------------- 9 | 10 | Prometheus's main features are: 11 | 12 | - a multi-dimensional data model (time series identified by metric name and key/value pairs) 13 | - a flexible query language to leverage this dimensionality 14 | - no reliance on distributed storage; single server nodes are autonomous 15 | - time series collection happens via a pull model over HTTP 16 | - pushing time series is supported via an intermediary gateway 17 | - targets are discovered via service discovery or static configuration 18 | - multiple modes of graphing and dashboarding support 19 | 20 | To learn more, refer : https://prometheus.io/docs/introduction/overview/ 21 | 22 | Tested Platform 23 | -------------------- 24 | 25 | Raspberry Pi 3 26 | 27 | 28 | How to run this Docker Image? 29 | ---------------------------------------- 30 | 31 | ```sh 32 | $ sudo docker run -d --net=host -v /prometheus.yml:/etc/prometheus/prometheus.yml ajeetraina/prometheus-armv7 33 | ``` 34 | -------------------------------------------------------------------------------- /prometheus.yml: -------------------------------------------------------------------------------- 1 | # my global config 2 | global: 3 | scrape_interval: 15s # By default, scrape targets every 15 seconds. 4 | evaluation_interval: 15s # By default, scrape targets every 15 seconds. 5 | # scrape_timeout is set to the global default (10s). 6 | 7 | # Attach these labels to any time series or alerts when communicating with 8 | # external systems (federation, remote storage, Alertmanager). 9 | external_labels: 10 | monitor: 'codelab-monitor' 11 | 12 | # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. 13 | rule_files: 14 | # - "first.rules" 15 | # - "second.rules" 16 | 17 | # A scrape configuration containing exactly one endpoint to scrape: 18 | # Here it's Prometheus itself. 19 | scrape_configs: 20 | # The job name is added as a label `job=` to any timeseries scraped from this config. 21 | - job_name: 'prometheus' 22 | 23 | # Override the global default and scrape targets from this job every 5 seconds. 24 | scrape_interval: 5s 25 | 26 | # metrics_path defaults to '/metrics' 27 | # scheme defaults to 'http'. 28 | 29 | static_configs: 30 | - targets: ['localhost:9090'] 31 | -------------------------------------------------------------------------------- /prometheus/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM resin/rpi-raspbian:latest 2 | MAINTAINER "Ajeet Singh Raina" 3 | 4 | RUN apt-get update && apt-get install -qy curl ca-certificates 5 | WORKDIR /root/ 6 | RUN mkdir /root/prometheus 7 | 8 | RUN curl -sSLO https://s3-eu-west-1.amazonaws.com/downloads.robustperception.io/prometheus/prometheus-linux-arm-nightly.tar.gz && \ 9 | tar -xvf prometheus-linux-arm-nightly.tar.gz -C /root/prometheus/ --strip-components=1 && \ 10 | rm prometheus-linux-arm-nightly.tar.gz 11 | 12 | workdir /root/prometheus 13 | 14 | RUN mkdir -p /usr/share/prometheus 15 | RUN mkdir -p /etc/prometheus 16 | RUN mv ./prometheus /usr/bin/ 17 | RUN mv ./promtool /usr/bin/ 18 | RUN mv ./console_libraries /usr/share/prometheus/ 19 | RUN mv ./consoles /usr/share/prometheus/ 20 | 21 | RUN ln -s /usr/share/prometheus/console_libraries /etc/prometheus/ 22 | 23 | EXPOSE 9090 24 | VOLUME [ "/prometheus" ] 25 | WORKDIR /prometheus 26 | ENTRYPOINT [ "/usr/bin/prometheus" ] 27 | CMD ["-config.file=/etc/prometheus/prometheus.yml", \ 28 | "-storage.local.path=/prometheus", \ 29 | "-web.console.libraries=/usr/share/prometheus/console_libraries", \ 30 | "-web.console.templates=/usr/share/prometheus/consoles" ] 31 | -------------------------------------------------------------------------------- /prometheus/README.md: -------------------------------------------------------------------------------- 1 | # A Dockerized Prometheus Image for Raspberry Pi 2/3 2 | 3 | Prometheus is a systems and service monitoring system. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true. 4 | 5 | In case you are Raspberry Pi user and want to try it, check this out ! 6 | 7 | Features 8 | ------------- 9 | 10 | Prometheus's main features are: 11 | 12 | - a multi-dimensional data model (time series identified by metric name and key/value pairs) 13 | - a flexible query language to leverage this dimensionality 14 | - no reliance on distributed storage; single server nodes are autonomous 15 | - time series collection happens via a pull model over HTTP 16 | - pushing time series is supported via an intermediary gateway 17 | - targets are discovered via service discovery or static configuration 18 | - multiple modes of graphing and dashboarding support 19 | 20 | To learn more, refer : https://prometheus.io/docs/introduction/overview/ 21 | 22 | Tested Platform 23 | -------------------- 24 | 25 | Raspberry Pi 2/3 26 | 27 | 28 | How to run this Docker Image? 29 | ---------------------------------------- 30 | 31 | ```sh 32 | $ docker build -t prometheus-armv7 . 33 | $ docker run -d --net=host -v `pwd`/prometheus.yml:/etc/prometheus/prometheus.yml prometheus-armv7 34 | ``` 35 | 36 | Changelog 37 | --------------- 38 | 39 | * Removed golden binaries 40 | * Added curl to fetch prometheus 41 | * Fixed README file instructions 42 | 43 | [Alex Ellis](https://twitter.com/alexellisuk/) 44 | -------------------------------------------------------------------------------- /prometheus/prometheus.yml: -------------------------------------------------------------------------------- 1 | # my global config 2 | global: 3 | scrape_interval: 15s # By default, scrape targets every 15 seconds. 4 | evaluation_interval: 15s # By default, scrape targets every 15 seconds. 5 | # scrape_timeout is set to the global default (10s). 6 | 7 | # Attach these labels to any time series or alerts when communicating with 8 | # external systems (federation, remote storage, Alertmanager). 9 | external_labels: 10 | monitor: 'codelab-monitor' 11 | 12 | # Load rules once and periodically evaluate them according to the global 'evaluation_interval'. 13 | rule_files: 14 | # - "first.rules" 15 | # - "second.rules" 16 | 17 | # A scrape configuration containing exactly one endpoint to scrape: 18 | # Here it's Prometheus itself. 19 | scrape_configs: 20 | # The job name is added as a label `job=` to any timeseries scraped from this config. 21 | - job_name: 'prometheus' 22 | 23 | # Override the global default and scrape targets from this job every 5 seconds. 24 | scrape_interval: 5s 25 | 26 | # metrics_path defaults to '/metrics' 27 | # scheme defaults to 'http'. 28 | 29 | static_configs: 30 | - targets: ['localhost:9090'] 31 | --------------------------------------------------------------------------------