Grafana Integration

As an example to integrating Grafana, these instructions will lead you through setting up an EC2 instance to use with Grafana and configuring Grafana to work with Hydrolix. It is a bare minimum configuration and is not meant for production. For information on how to install Grafana in a reliable way, refer to their documentation.

  1. Launch EC2 instance
  2. Install Grafana and driver
  3. Run Grafana as a service
  4. Connect to Hydrolix
  5. Validate connection

Launching an EC2 instance for Grafana

In a VPC with public access, and access to Hydrolix, launch and EC2 instance that has the following attributes:

OSUbuntu Server 20.04 LTS (HVM), SSD Volume Type
Instance typet2.micro
SubnetNeeds connectivity to Hydrolix VPC. It needs a public route out, either through a load balancer, or by having a public IP. For this example, we will choose a public subnet, and assign a public IP
Security groupLeave the default SSH access, and add access to the default Grafana port, 3000
AccessChoose a key pair

All other settings should be left as default.

Grafana Instance Security Group

Once the instance has started, SSH to it and run the following prerequisite steps:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apt-transport-https
sudo apt-get install software-properties-common wget
wget -q -O - | sudo apt-key add -
echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
sudo apt-get update

These steps add the required underlying components required by Grafana, and adds Grafana to apt-get so it can be installed.

Install Grafana and Driver

To install Grafana, execute the following steps:

sudo apt-get install grafana
sudo grafana-cli plugins install vertamedia-clickhouse-datasource

The vertamedia plugin will need to be allowed in the grafana.ini file.

sudo vi /etc/grafana/grafana.ini

Update [plugins] with:


Restart grafana and verify it is running:

sudo systemctl restart grafana-server
sudo systemctl status grafana-server

Configure the Data Source

Login into Grafana and add new data source. The Clickhouse plugin will show up in the list of available connection types.

Grafana Data Source

Under HTTP Configuration:

URL: https://<your Hydrolix system>/query/, for example,

Click Save and Test to verify.

Add a Dashboard

  • Select your Clickhouse Data Source
  • Setup your query but replace your timestamps with ($from AND $to)
  • Timestamps variables are set up at the top (red box)

Create Dashboard