Visualize in Grafana
You can use Grafana to visualize data stored in your Hydrolix Cluster. This guide shows how to create a new instance of Grafana in EC2, install the ClickHouse plugin to communicate with Hydrolix, and connect Grafana to Hydrolix.
Prerequisites⚓︎
- A VPC with public access and access to the Hydrolix instance, either through a load balancer or using a public IP address
Create Grafana instance⚓︎
Already Running Grafana?
Already have an instance of Grafana running? Skip this section, but configure your Grafana instance to allow communication with Hydrolix. Verify that you have administrator access to the instance.
Create an EC2 instance⚓︎
- In a VPC, launch an EC2 instance with the following attributes:
| Parameter | Setting |
|---|---|
| OS | Ubuntu Server 20.04 LTS (HVM), SSD Volume Type |
| Instance type | t2.micro |
| Subnet | Choose "public" and assign a public IP. |
| Security group | Default SSH access. Add access to the default Grafana port, 3000. |
| Access | Choose a key pair. |
Use the default option for all other settings.
- Click Launch instance to create the EC2 instance.
Connect to instance and upgrade⚓︎
-
Connect to the instance after launching it. Once the instance is in the
runningstate, connect to it with SSH. -
Update the package list.
1.Upgrade the packages to the latest available version with the built-in package manager.
Set up Grafana prerequisites⚓︎
-
Install
apt-transport-https. -
Install
software-properties-commonandwget. -
Use
wgetto download the Grafana GPG key. -
Update the package list again.
Install Grafana⚓︎
-
Install Grafana.
Install ClickHouse plugin⚓︎
-
Install the ClickHouse plugin to connect to Hydrolix.
-
Add the plugin to the
grafana.iniconfiguration file before Grafana runs. Open the file with administrator permissions. -
Add this text at the end of the
[plugins]block: -
Restart Grafana.
-
Verify that Grafana is running.
Connect Grafana to Hydrolix⚓︎
Admin Access Required
You must have administrator access to your Grafana instance for this step.
-
Follow the instructions in the Grafana documentation to add a new data source.
-
From the list of available data source types, select the ClickHouse plugin.
-
In the HTTP section, enter the Hydrolix instance URL with the path suffix
/query/. For example, if the Hydrolix instance uses the URLhttps://my.hydrolix.io, enter the following URL:https://my.hydrolix.io/query/ -
Click Save and Test to verify the connection.
Add a dashboard⚓︎
-
Select the ClickHouse data source created in the previous section.
-
Configure the query. Replace timestamps with
$from AND $to.