Using Clickhouse data source on Grafana
Table of contents
Install Clickhouse in Ubuntu
sudo apt-get install apt-transport-https ca-certificates dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv E0C56BD4
echo "deb https://repo.clickhouse.com/deb/stable/ main/" | sudo tee \
/etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y clickhouse-server clickhouse-client
sudo service clickhouse-server start
Launch and check
sudo service clickhouse-server start
Then, run curl -svo /dev/null http://localhost:8123/play
, getting 200.
Create Nginx config file
server {
listen 80;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name ch.example.com;
location / {
proxy_pass http://localhost:8123;
}
}
Install SSL cert: certbot --nginx -d ch.example.com
, and give auto-renew sudo certbot renew --dry-run
.
Create DNS
ch.example.com => A => server IP
Check in browser: https://ch.example.com/play