Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
==Introduction==
When dealing with IoT fleets, one of the major concerns is monitoring to monitor the devices' health status. The "health status" is a generic expression that may include tons of parameters, ranging from the system-on-chip's temperature to the number of processes running in Linux's user space.
This Technical Note (TN for short) illustrates how to combine some well-known, open-source software to implement a monitoring system for such devices. It is based on:
TBD
The IoT device used for this TN is an [[MISC-TN-004:_Running_Debian_(armbian)_on_SBCSPG|SBCSPG IIoT gateway]] running Debian [[MISC-TN-026:_Automated_test_equipment_(ATE)_monitoring_with_SBCSPG_gateway,_ThingsBoard_IoT,_and_Fledge|Bullseye]]GNU/Linux distribution. An instance of Glances runs on SBCSPG for collecting data (CPU load, memory usage, network traffic, etc.). These data are pushed into an InfluxDBdatabase. Grafana retrieves these data from the database and shows them in a beautiful dashboard.
For the sake of simplicity, Grafana and InfluxDB were installed on the same host running Ubuntu 20.04, but they can indeed run on different machines.
==Installing InfluxDB 2.0 and Grafana==
Please follow the instructions available [https://medium.com/@nanditasahu031/integration-of-influxdb2-with-grafana-28b4aebb3368 here], but refer to [https://repos.influxdata.com/ these page] for the InfluxDB GPG keyto use.
For convenience, a ready-to-use dashboard was installed, which is available [https://grafana.com/grafana/dashboards/2387-glances-for-flux/ here].
For accessing the bucketfrom Grafana, use the API token provided by InfluxDB. It can be copied from the page shown in the following picture.
==Installing Glances on the IoT device==
For convenience, a Python 3 virtual environment was created on the device first. Then, all the necessary packages were installed as illustrated in the following dump.
 
 
<pre class="board-terminal">
</pre>
The next steps consists of creating a configuration file suitable for our setup.
<pre class="board-terminal">
(venv) armbian@sbcspg:~/.config/glances$ cp -v ~/devel/glances/venv/share/doc/glances/glances.conf .
</pre>
In particulateparticular, make sure the the <code>influxdb2</code> section is edited properlyfor matching your setup:
<pre class="board-terminal">
...
4,650
edits