Guide: Telemetry server

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,678
Reaction score
16,720
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
this is a work in progress guide, and like reef-pi code, i intend to update, improve it iteratively over the next few weeks. Please bare with me till then, I'll remove this header once i think first draft is done,
------------------------------------------------------------------------------------------------------------------------------------------

reef-pi 6.0 is just out with esp32 integration and x86 builds, this means we can now run reef-pi on non pi computers and offload the hadware interfacing to esp32 and raspberry pi pico like microcontroller. With the ongoaing shortage of chip supply and consequently raspberry pi 3/4/zeros, reef-pi 6.0 provides an alternative to raspberry pi based installation. But tangential to this(bypassing supply chain issue) running on x86 systems mean reef-pi controller can now have significantly more computing power. There are multitude of functionalities in reef-pi that are purpose built to work on low computing power environment (like metric retention, dashboard etc) and with low dependencies. While this gives a slim working controller runnable to raspberry pi, it deprives whole bunch of awesomeness opensource can offer. Running on x86, with all the firepower available now removes that limitation. In this guide i want to walk through one such awesome capabilities "telemetry" that was very hard to setup on raspberry pi, but can be easily run on mini pc, laptop or desktop based setup (x86 /intel systems).

We'll start with installing reef-pi in a common non raspberry pi computer (x86). Any laptop, PC, mini-pc should do. For this guide i am using a cheaper intel celeron based mini pc with ssd .


I am not covering how to install linux on mini pc, there are ample tutorials and youtube videos on this topic, please refer to one of those. I am also assuming users are familiar with terminal or command line. You will be using it to install and configure a few things.


This guide will walk through the installation and configuration of
- Prometheus - the metrics storage software. installation.
Download prometheus from github release page or their homepage.
Code:
wget -c https://github.com/prometheus/prometheus/releases/download/v2.40.4/prometheus-2.40.4.linux-amd64.tar.gz
Decompress to obtain the prometheus binary and move it in /usr/bin directory
Code:
tar -zxvf prometheus-2.40.4.linux-amd64.tar.gz
mv prometheus-2.40.4.linux-amd64/prometheus /usr/bin/

Copying over a starter example configuration file for prometheus
cp


Create a systemd unit file to be able to run and supervise promethus on this system across reboots.

Code:
[Unit]
Description=prometheus

[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/prometheus --config.file=/etc/prometheus.yml --storage.tsdb.path=/var/lib/prometheus/ --storage.tsdb.retention.time=5y --web.listen-address=:8888

[Install]
WantedBy=multi-user.target

Next lets ask systemd to read the new unit file and start prometheus
Code:
systemctl daemon-reload
sudo systemctl start prometheus.service
sudo systemctl enable prometheus.service
sudo systemctl status prometheus.service



- Grafana - the dashboard software. installation and integration with prometheus.
- How to setup reef-pi and prometheus integration
- How to create custom dashboards with reef-pi metrics
- Optionally: Node exporter - host metrics gathering software
 
Last edited:
Aquarium Specialty - dry goods & marine livestock
World Wide Corals
OP
Ranjib

Ranjib

7500 Club Member
Review score
+0 /0 /-0
View Badges
Joined
Apr 16, 2016
Messages
9,678
Reaction score
16,720
Review score
+0 /0 /-0
Location
Pleasant Hill, Concord
You forgot to link to the guide right? :) Please :)... @Ranjib I have hacked away at alot of the Grafana/Prometheus stuff, but would love to see all that I missed.
this is the guide, its just im planning to update it iteratively like code
 

Sral

Active Member
Review score
+0 /0 /-0
View Badges
Joined
May 2, 2022
Messages
361
Reaction score
429
Review score
+0 /0 /-0
Location
Germany
Quick question, since I don't remember this mentioned anywhere:
- How much Computation power does a Reef-Pi setup and a Prometheus-Server with a Grafana interface need ?
- e.g.: Could one run a Prometheus Server on a dedicated Pi and what version would this need ?
- In light of the new Pi Zero 2, which iirc has a dual core, would this be able to run both ?
 
Tenecor AIO Conversion Kits Now Available!

ColoredRock

Well-Known Member
Review score
+0 /0 /-0
View Badges
Joined
Aug 9, 2021
Messages
640
Reaction score
804
Review score
+0 /0 /-0
Location
Murrieta, CA (North of San Diego)
Quick question, since I don't remember this mentioned anywhere:
- How much Computation power does a Reef-Pi setup and a Prometheus-Server with a Grafana interface need ?
- e.g.: Could one run a Prometheus Server on a dedicated Pi and what version would this need ?
- In light of the new Pi Zero 2, which iirc has a dual core, would this be able to run both ?
I ran it on a RP 4b... got pretty hot... also a mcrosd card wont cut it.. to much IO so went with an external HD before my tank blew a seam... going to run a dedicated ubuntu box now when I get the 280 gallon wet. Sanding sucks... but its coming along.

Not sure on the new Pi Zero 2 have not looked at it yet,
 

Does it matter to you whether your fish are captive-bred or wild caught?

  • I only buy captive bred fish.

    Votes: 94 14.4%
  • It matters, but I will buy either captive-bred or wild-caught.

    Votes: 458 70.2%
  • I think wild-caught fish are the better option.

    Votes: 16 2.5%
  • I don’t care where the fish were bred.

    Votes: 84 12.9%
Top