Skip to content

Latest commit

 

History

History
154 lines (105 loc) · 6.25 KB

File metadata and controls

154 lines (105 loc) · 6.25 KB

The flespi-parameters-datasource plugin works with grafana 10+

Logo

Plugin allows to visualize parameters of flespi devices.

Installation


  1. Install grafana as standalone binaries

    • MacOS installation

      You can find the latest version of the commands here: Install Grafana

      curl -O https://dl.grafana.com/oss/release/grafana-10.2.3.darwin-amd64.tar.gz
      
      tar -zxvf grafana-10.2.3.darwin-amd64.tar.gz
    • Linux installation

      You can find the latest version of the commands here: Install Grafana

      curl -O https://dl.grafana.com/oss/release/grafana-10.2.3.linux-amd64.tar.gz
      
      tar -zxvf grafana-10.2.3.linux-amd64.tar.gz
  2. Install plugin
    cd grafana-v10.2.3
    
    mkdir  -p ./data/plugins
    
    ./bin/grafana cli --pluginsDir ./data/plugins --pluginUrl https://github.com/flespi-software/flespi-parameters-grafana-datasource/releases/latest/download/flespi-parameters-datasource.zip plugins install flespi-parameters-datasource

    As soon as flespi-parameters-datasource plugin is not signed, in order to be able to install and run the plugin, you should specify plugin's id in allow_loading_unsigned_plugins Grafana configuration variable.

    Make copy of your ./conf/defaults.ini

    cp ./conf/defaults.ini ./conf/custom.ini

    Now edit your ./conf/custom.ini and set

    allow_loading_unsigned_plugins = flespi-parameters-datasource

    Start grafana server

    ./bin/grafana server

Ubuntu/Debian system-wide installation
sudo apt-get install -y adduser libfontconfig1 musl

wget https://dl.grafana.com/oss/release/grafana_10.2.3_amd64.deb

sudo dpkg -i grafana_10.2.3_amd64.deb

You can find the latest version of the commands here: Install Grafana

As soon as flespi-parameters-datasource plugin is not signed, in order to be able to install and run the plugin, you should specify plugin's id in allow_loading_unsigned_plugins Grafana configuration variable:

allow_loading_unsigned_plugins = flespi-parameters-datasource

To install this plugin using the grafana cli tool, execute the following command:

cd /usr/share/grafana/bin
sudo ./grafana cli --pluginUrl https://github.com/flespi-software/flespi-parameters-grafana-datasource/releases/latest/download/flespi-parameters-datasource.zip plugins install flespi-parameters-datasource

and then restart your grafana server.

Alternatively, you may manually copy source code from flespi-parameters-datasource directory into grafana plugins directory and restart grafana server. By default plugins directory is: /var/lib/grafana/plugins To check plugins directory in Grafana interface open: Toggle menu in top left corner > Administration > Settings > paths/plugins

To remove plugin run:

cd /usr/share/grafana/bin
sudo ./grafana cli plugins remove flespi-parameters-datasource

To setup the datasource you need to configure your Flespi Token in datasource's settings.

Plugin supports template variables.

The following queries can be used to create variable:

Query Description
devices.* fetch all devices available for given token
devices.${device}.parameters.* fetch telemetry parameters for the selected device
accounts.* fetch account and subaccounts available for given token
accounts.${account}.statistics.* fetch statistics parameters for the selected (sub)accounts
streams.* fetch all streams available for given token
containers.* fetch all containers available for given token
containers.${container}.parameters.* fetch parameters of the selected container
calculators.* fetch all calculators available for given token
calculators.${calculator}.devices.* fetch devices assigned to the selectede calculator
calculators.${calculator}.devices.${device}.parameters.* fetch parameters of the selected calculator and assigned device

Dev setup

To install frontend dependencies run:

npm install

To build and watch the plugin frontend code:

npm run dev

Changelog

1.0.0 Initial implementation

1.1.0 Added visualization of flespi accounts' statistics

1.2.0 Added visualization of flespi containers' parameters

1.3.0 Added visualization of logs of flespi devices and streams

1.4.0 Added visualization of flespi analytics's intervals

1.4.8 Changed build release workflow. Readme updated accordingly