Use Docker to quickly install ClickHouse monitoring tool Grafana

Grafana

Grafana is a very popular tool that can be used to create interactive dashboards based on time series data. It is also a solution for the analysis and monitoring of each database. Grafana allows users to query, visualize, alert and understand metrics.
Many great features provided by Grafana:

  1. Visualization

From heat maps to histograms, common graphics to geographic maps. Grafana provides a large number of visualization options to help users understand data beautifully.
2. Monitoring alarm

When accessing data, define thresholds according to business requirements and seamlessly define alarms.
3. Integration

Grafana is integrated with many projects, such as Graphite, Elasticsearch, InfluxDB and
Prometheus that we are familiar with and commonly used . Integrate data together to obtain a more perfect solution.
4. Open source

Grafana is completely open source and supported by a vibrant community.
5. Extension

The official library provides hundreds of dashboards and plugins. Today the author is introducing the Grafana ClickHouse plugin developed by Vertamedia, which is now
maintained by the Altinity team.
6. Collaboration

Bring everyone together and share data and dashboards between teams. Grafana enhanced user capabilities and helped build a data-driven culture.

Grafana ClickHouse plug-in address

Official website
https://grafana.com/grafana/plugins/vertamedia-clickhouse-datasource/installation
Github
https://github.com/Vertamedia/clickhouse-grafana

Get started quickly with Docker

  1. Download the grafana mirrordocker pull grafana/grafana
[root@kubesphere3 ~]# docker pull grafana/grafana
Using default tag: latest
latest: Pulling from grafana/grafana
801bfaa63ef2: Pull complete 
bfa9705a3cb2: Pull complete 
12c11a7e9d94: Pull complete 
377c2dc21544: Pull complete 
4a20d1f981fb: Pull complete 
4f4fb700ef54: Pull complete 
5d9743dc37f2: Pull complete 
ec2035efdb39: Pull complete 
Digest: sha256:29e4e68a557fac7ead72496acea16a9b89626f3311ba7c4a9e39f7fb99f8f68f
Status: Downloaded newer image for grafana/grafana:latest
docker.io/grafana/grafana:latest
  1. Start the grafana containerdocker run -d -p 23000:3000 - grafana/grafana
[root@kubesphere3 ~]# docker run -d -p 23000:3000 - grafana/grafana
a8b768626cda7c4ef675d4d59fd720c2f3b5d3d0e488dac5c4ea9779ff947706
  1. Install ClickHouse data source plugingrafana-cli plugins install vertamedia-clickhouse-datasource
[root@kubesphere3 ~]# docker exec -it a8b7 /bin/bash
bash-5.0$ grafana-cli plugins install vertamedia-clickhouse-datasource
installing vertamedia-clickhouse-datasource @ 2.2.3
from: https://grafana.com/api/plugins/vertamedia-clickhouse-datasource/versions/2.2.3/download
into: /var/lib/grafana/plugins

✔ Installed vertamedia-clickhouse-datasource successfully 

Restart grafana after installing plugins . <service grafana-server restart>

bash-5.0$ exit
  1. Submit the container after installing the plug-in as a new image to ensure persistencedocker commit a8b7 grafana-clickhouse
[root@kubesphere3 ~]# docker commit a8b7 grafana-clickhouse
sha256:98b3abee7beca75321e97775870cbe21c871812d40b6b37d7c5f053ad535cd35

  1. Run the container after installing the plugindocker run -d -p 23000:3000 grafana-clickhouse
[root@kubesphere3 ~]# docker run -d -p 23000:3000  grafana-clickhouse
b19d8b0f109600a683bdfeb4135dfa5d2b4af5274bd67b997b13d04277f3c270

Visit Grafana

http://localhost:23000

Account: admin Password: admin

Configure ClickHouse

Enter the data source add page, click Add data source to search for clickhouse,
Insert picture description here
Insert picture description here
click Save & Test to verify the connection
Insert picture description here

Guess you like

Origin blog.csdn.net/wenyichuan/article/details/113883424