This guide shows how to configure data storage in InfluxDB and visualize it in Grafana.
In order to complete these instructions, you must have Monokot Server, InfluxDB and Grafana installed on your computer. It is assumed that the tags, whose values will be saved in InfluxDB, are already created and configured in Monokot Server.
Monokot Server Administrator
Open Monokot Server Administrator and connect to the local server. Double-click Stores on the Server Explorer pane. Click the New Store button and select InfluxDB from the drop-down menu.
On the Server Explorer pane, double-click Time Series. Create the necessary time series, assign them the appropriate tags as the data source, and choose influx_db as store.
In this guide, we use Path addressing of time series. To see the path to a time series, right-click it and choose Properties in the context menu.
The Object Path field contains the path to the series, which will be used as the time series record metadata in InfluxDB.
In order for the changes to take effect on the server, click the Sync button.
Grafana is an open source data visualization, monitoring and analysis platform that allows users to create dashboards with panels displaying specific indicators for a set period of time. Every dashboard is universal, so it can be customized for a specific project or to meet any needs.
Open your web browser and go to http://localhost:3000. By default, the login and password are admin.
Click Configuration → DataSource.
Click the Add data source button and choose InfluxDB.
Enter timeseries into the Database field. This is the default database name used by InfluxDB store.
Click Create → Dashboard.
On the panel that appeared, click the Add Query button.
In the graphical query editor (at the bottom of the page), specify the query as shown in the image below.
Or enter raw text as follows: SELECT "v" FROM "autogen"."tssamples" WHERE ("tsid" = 'Area1.Building1.temperature1' OR "tsid" = 'Area1.Building1.temperature2' OR "tsid" = 'Area1.Building1.temperature3' OR "tsid" = 'Area1.Building1.temperature4') AND $timeFilter GROUP BY "tsid".
Configure the timeline and set the update rate for the dashboard. Save the dashboard after making all the changes. Now it is ready to use!