InfluxDB 2.0 built-in visualization tools.

If InfluxDB version 2.0 is used as TSDB, to visualize data stored in the TSDB you can use its built-in visualization tools. For details, refer to InfluxDB documentation at

Visualization with Grafana.

The open source platform Grafana can be used to visualize data in 2 different ways:

  • without accessing TSDB, with SimpleJson data source plugin via ogamma Visual Logger for OPC REST API endpoint (real time data - always, and historical data - in case if OPC UA Server supports historical data);
  • accessing data already stored in the TSDB by ogamma Visual Logger for OPC, with PostgreSQL/TimescaleDB or InfluxDB plugin.

Next sections describe how to install and use Grafana.

Install Grafana

If ogamma Visual Logger for OPC is installed using Docker cofiguration file as described in section Getting Started and runs in Docker container, then Grafana is already installed, running and accessible on endpoint URL http://localhost:3000.

If ogamma Visual Logger for OPC is deployed manually using distribution package, then Grafana needs to be installed manually following instructions from Grafana web site.

Instructions on Grafana web page suggest to use wget tool to download the installer. If you don’t have wget tool installed, then you can download it from here: For your convenience it is also included into distribution package for Windows.

Setup Grafana data source.

Data from OPC UA Servers can be visualized in Grafana using 2 types of data sources: SimpleJson or PostgreSQL.

Using SimpleJson data source.

  • Install SimpleJson data source plugin (instructions are available at

    In Docker setup, this data source plugin will be already installed.

  • Add data source of SimpleJson type, and configure it to connect to the Grafana endpoint of the ogamma Visual Logger for OPC (http://localhost:3000/grafana):

    • From the left side menu bar, select icon Configuration;
    • Click on Data Sources;
    • Click on button Add data source;
    • From the list of data sources, select SimpleJson;

    • Configure settings:

      • In the field HTTP/URL enter URL of the ogamma Visual Logger for OPC. If ogamma Visual Logger and Grafana are installed in the same machine, localhost can be used as host name:


        If both ogamma Visual Logger for OPC and Grafana are running within Docker container, using file docker-compose.yml from GitHub project, and field access is set to server, then host name should be set to ogamma-logger:



        Adjust host name according to your setup.

      • Click on button Save and Test. If settings are correct, message should appear saying that data source is working.

Using PostgreSQL data source.


Applicable only when time-series database type is PostgreSQL.

  • Open Data Sources page in Grafana, and click on button Add Data Sources.
  • Select PostgreSQL and edit connection settings as shown in the screenshot:

Setup dashboards.

Create new dashboard.

To create new dashboard, from the left side menu bar click on icon with plus sign, select Dashboard, abd click on button Add Query (it suggests to add new panel into new dashboard right away):


Reading values from SimpleJson data source

In this case requests to get data values sent to the ogamma Visual Logger for OPC through its REST endpoint by Grafana’s SimpleJson plugin. Then, depending on settings in columns Get History From and Read Type, data values are read by ogamma Visual Logger either from TSDB, or from OPC UA Server by calling Read or HistoryRead request.

Configure settings in the new panel selecting SimpleJson as data source:


Reading values stored in PostgreSQL database.

It is possible also to read already logged data values from PostgreSQL database, using PostgreSQL data source plugin for Grafana (installation is not required, included into Grafana by default):


Example of the SQL query can be found below:

    $__timeFilter(time) and sourceid='2'

Here time, value and sourceid are column names in the values table. You can figure out corresponding to the OPC UA variable sourceid from Logged Variables data grid on the configuration GUI (column id).



For details on how to configure Grafana dahsboards and panels please refer to its documentation here

Typical Grafana dashboard is illustrated below: