feat(clickhouse): enable Prometheus monitoring
This commit is contained in:
@@ -44,3 +44,31 @@ ClickHouse can use the following Linux capabilities for enhanced performance, bu
|
||||
| `SYS_NICE` | Thread priority control via `os_thread_priority` | Setting has no effect |
|
||||
|
||||
These capabilities are disabled by default to comply with baseline Pod Security Standards. To enable them, the namespace must allow privileged pods, and you need to uncomment the `add` line in `clickhouse-installation-template.yaml`.
|
||||
|
||||
## Monitoring
|
||||
|
||||
ClickHouse exposes Prometheus metrics on port 9363. When Prometheus (kube-prometheus-stack) is installed, monitoring can be enabled during installation or manually.
|
||||
|
||||
### Enable Monitoring
|
||||
|
||||
```bash
|
||||
just clickhouse::setup-monitoring
|
||||
```
|
||||
|
||||
This creates a ServiceMonitor and a metrics Service for Prometheus to scrape.
|
||||
|
||||
### Grafana Dashboard
|
||||
|
||||
Import the ClickHouse dashboard from Grafana.com:
|
||||
|
||||
1. Open Grafana → **Dashboards** → **New** → **Import**
|
||||
2. Enter Dashboard ID: `14192`
|
||||
3. Click **Load**, select **Prometheus** data source, then **Import**
|
||||
|
||||
The dashboard includes panels for memory, connections, queries, I/O, replication, merge operations, cache, and ZooKeeper metrics.
|
||||
|
||||
### Remove Monitoring
|
||||
|
||||
```bash
|
||||
just clickhouse::remove-monitoring
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user