Skip to content

SQL

Needed information

MySQL

measure target user password databasae query
measure_id 192.168.0.100:3306 read_data MyPass my_database SELECT time,data_field FROM data_table WHERE ...
... ... ... ... ... ...

PostgreSQL

measure target user password databasae query
measure_id 192.168.0.100:5432 read_data MyPass my_database SELECT time,data_field FROM data_table WHERE ...
... ... ... ... ... ...

SQLServer

measure target user password databasae query
measure_id 192.168.0.100:1433 read_data MyPass my_database SELECT time,data_field FROM data_table WHERE ...
... ... ... ... ... ...

Measure

A unique friendly name of the measurement, e.g. overall_energy_consumption, compartment1_temperature, compartment2_temperature.

Target

The target IP in the form of IP:port, e.g. 192.168.0.100:3306.

User, Password, Database

Credentials (user, password) and database where to query data. NOTE: it is reccomended to proviode read-only credentials.

Query

The SQL query returning data. The query should return 2 values: couples of time, data.

Instead of specifying individual measurement queries, it is also possible to execute a query returing the measure. When the query returns 3 values, they are expected to be in the form of: of time,measure,data. When 3 values are returned, the query measure will override above table measure.