This application can be used to monitor the system resources of a device based on the arm architecture (e.g. raspberry pi).
Rationale for this application
I am planning to run multiple services on a single raspberry pi as a multi container application using Balena. For this I would like to be able to check if the raspberry has sufficient resources (memory, cpu, disk) to run all these services. So therefore I have created as a start this monitoring application which I will then gradually extend with other services while keeping a close eye on the system metrics dashboard.
Here an example of the system metrics dashboard provided by this application:
Note that this is the first version of this application and I am well aware that it has many short comings. So I will welcome all feedback. Also any issues (for features or defects) you report in my github repository will be more than appreciated.
I have extended my github project with nginx that acts as reverse proxy server. It is currently mapping http/https requests to port 30000 (= port used by grafana UI).
This version of the repository is tagged in github with v1.01
The previous working version (see above post) without nginx is tagged with v1.00
Note that in the mean time this github repository has been extended with many containers (Node-RED, mqtt) and consequently I have also renamed this repository from balena-edge-device-monitoring into balena-node-red-mqtt-nginx-TIG-stack.
After more than one year since the thread was active and with the recent deployments of balena analytics, @chrisys would you say that there is a need or use for 3rd party analytics, such as Grafana or netdata?
I am referring to the fact that the balena dashboard offers the ability to periodically get analytics regarding the device. I want to see if there is value in attempting to integrate netdata and balena and sharing the results.
btw, netdata docker configuration has these requirements:
I don’t think bind mounting /proc, /etc and /sys from the host to a container is possible.
You can still try running netdata as a privileged container to see if it shows some interesting information.
When the operator executes docker run --privileged, Docker will enable access to all devices on the host as well as set some configuration in AppArmor or SELinux to allow the container nearly all the same access to the host as processes running outside containers on the host.
You won’t be able to install things in the host OS as it is read only.
I’d try running it without patching to see what it shows.
As soon as I have access to devices, I will be testing it myself (Thursday Morning). I though privileged was a balena flag and wasn’t aware of it’s existence in the docker.
Maybe use a custom app which uses dbus to serve as a pipe towards the needed files? (just throwing ideas, not sure even if it’s feasible).