Prerequisites
To follow the steps on this page:- Create a target with the Real-time analytics capability enabled. You need your connection details. This procedure also works for .
Simulate a dataset
To simulate a dataset, run the following queries:-
Create the
sensorstable: -
Create the
sensor_dataIf you are self-hosting v2.19.3 and below, create a relational table, then convert it using create_hypertable. You then enable with a call to ALTER TABLE. -
Populate the
sensorstable: -
Verify that the sensors have been added correctly:
Sample output:
-
Generate and insert a dataset for all sensors:
-
Verify the simulated dataset:
Sample output:
Run basic queries
After you simulate a dataset, you can run some basic queries on it. For example:-
Average temperature and CPU by 30-minute windows:
Sample output:
-
Average and last temperature, average CPU by 30-minute windows:
Sample output:
-
Query the metadata:
Sample output: