Skip to content

Receiver for Mira monitoring data

You can configure Mira nodes to send monitoring data.

Together with the Mira Gateway, the monitoring receiver program will then receive the data and store it in databases.

Prerequisites

InfluxDB 2 is required. InfluxDB can be found here.

Mira Gateway running with the monitor db enabled.

The nodes in the Mira network also have to enable the monitoring sender with at least one field enabled. (see mira_diag_enable_monitoring_sender). This feature is available in Mira 2.10.0 and later.

Installation

Required files to install the system on linux is under the '/libmira/gateway' directory. Under there are arm64 (64 bit ARM), armhf (32 bit ARM) and x86_64 (Intel).

For ARM targets there are debian packages suitable for Raspberry Pi OS.

For the ARM64 target, there is also an deploy/install_mira_monitoring.sh script that can be used to install the Mira Monitoring & Web API services together with grafana and influx.

If the archive has been extracted on the target, run:

cd libmira/gateway/arm64/deploy
sudo ./install_mira_monitoring.sh

The service is also available as binaries for the three supported platforms: libmira/gateway/*/monitoring_receiver-*.

Configuration file

The configuration file is using the toml format.

Configure the following fields:

tundev_address = "<address>" # IPv6 Address assigned to the tundev interface
gw_monitor_db = "<path>"     # Path including name of the gateway monitor database

[influx_config]              # Configuration needed to connect to the Influx database
url = "<url>"                # URL to the database, usually "http://localhost:8086"
bucket_name = "<bucket>"     # Name of the bucket/database created in Influx
auth_token = "<token>"       # Authentication token for the Influx server

NOTE

Due to a bug in the Mira 2.10.0 release, all fields needs to be present and have values of the right type. A complete file can look like this:

tundev_address = "fd00::1"
gw_monitor_db = "mon.db"
mira_nbr_db = "mira_nbr.db"

[influx_config]
url = "http://localhost:8086"
bucket_name = "miramon"
auth_token = "auth-token"

[api_config]
ip_address = "0.0.0.0"
port = 3001


The same configuration file works with the Mira Gateway API service. By using the same file to both services, there is less risk of having incorrect configuration.

How to run

Start InfluxDB and create a bucket/database.

Run the monitoring_receiver executable:

./monitoring_receiver --config-file <toml config file>

The application now start to listen for monitoring messages coming from nodes in the Mira network.

The argument --debug will cause extra debug messages to be logged.

The monitoring receiver will fail to bind to the UDP port if the tunedev address isn't yet available, which happens if the gateway hasn't yet started.

Back to top