1. Home
  2. Knowledge Base
  3. ClickHouse
  4. Monitoring ClickHouse Metrics via Python
  1. Home
  2. Knowledge Base
  3. ClickHouse DBA
  4. Monitoring ClickHouse Metrics via Python
  1. Home
  2. Knowledge Base
  3. ClickHouse Support
  4. Monitoring ClickHouse Metrics via Python
  1. Home
  2. Knowledge Base
  3. ClickHouse Troubleshooting
  4. Monitoring ClickHouse Metrics via Python

Monitoring ClickHouse Metrics via Python

In this article, we will share a script that monitors ClickHouse metrics.

You will get an output of

  • Query execution time
  • Read operations
  • Written data size
  • Memory usage
  • CPU usage

First download file

 

git clone https://github.com/cansayin/Monitoring-ClickHouse-Metrics

Edit the following rows with your ClickHouse Server’s information

 

conn = clickhouse_driver.connect(
    host='localhost',
    port=9000,
    user='default',
    password='',
    database='default'
)

Then run the file

 

python monitoring_clickhouse.py

or

python3 monitoring_clickhouse.py

 

Was this article helpful?

Related Articles

CHISTADATA IS COMMITTED TO OPEN SOURCE SOFTWARE AND BUILDING HIGH PERFORMANCE COLUMNSTORES

In the spirit of freedom, independence and innovation. ChistaDATA Corporation is not affiliated with ClickHouse Corporation 

Need Support?

Can't find the answer you're looking for?
Contact Support

ChistaDATA Inc. Knowledge base is licensed under the Apache License, Version 2.0 (the “License”)

Copyright 2022 ChistaDATA Inc

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.