Visualize Hydrolix Data 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
running
state, connect to it with SSH.ssh <my-instance-url>
-
Update the package list.
sudo apt-get update
1.Upgrade the packages to the latest available version with the built-in package manager.
sudo apt-get upgrade
Set up Grafana prerequisites
-
Install
apt-transport-https
.sudo apt-get install apt-transport-https
-
Install
software-properties-common
andwget
.sudo apt-get install software-properties-common wget
-
Use
wget
to download the Grafana GPG key.wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
-
Update the package list again.
sudo apt-get update
Install Grafana
-
Install Grafana.
sudo apt-get install grafana
Install ClickHouse plugin
-
Install the ClickHouse plugin to connect to Hydrolix.
sudo grafana-cli plugins install vertamedia-clickhouse-datasource
-
Add the plugin to the
grafana.ini
configuration file before Grafana runs. Open the file with administrator permissions.sudo vim /etc/grafana/grafana.ini
-
Add this text at the end of the
[plugins]
block:allow_loading_unsigned_plugins=vertamedia-clickhouse-datasource
-
Restart Grafana.
sudo systemctl restart grafana-server
-
Verify that Grafana is running.
sudo systemctl status grafana-server
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
.
Updated 8 days ago