設定方法
1. サポートバージョン
| 項目 | バージョン |
|---|---|
| exemONE | v3.0.507 以降サポート |
| ClickHouse | v24.8.6.70 サポート |
- exemONE v3.0.507 以上のバージョンがインストールされている必要があり、これによりClickHouseモニタリングが可能になります。
- Cloudモニタリングサポート表にClickHouseは含まれていないため、On-Premise環境での使用を基本とします。
2. 必須権限
必要権限
- SELECT、KILL QUERY
権限付与SQL
モニタリングアカウントに以下のsystemテーブルに対するSELECT権限を付与する必要があります:
grant select on system.events to monitor_user;
grant select on system.merges to monitor_user;
grant select on system.metrics to monitor_user;
grant select on system.mutations to monitor_user;
grant select on system.parts to monitor_user;
grant select on system.part_log to monitor_user;
grant select on system.processes to monitor_user;
grant select on system.query_log to monitor_user;
grant select on system.replicas to monitor_user;
grant select on system.clusters to monitor_user;
grant select on system.text_log to monitor_user;
grant select on system.disks to monitor_user;
grant select on system.distribution_queue to monitor_user;
grant kill query ON *.* TO exemone;
grant show on *.* to exemone;
権限別用途の要約
| 対象テーブル | 用途 |
|---|---|
system.events | サーバーイベント統計 (OverflowBreakなど) の収集 |
system.merges | マージ(Merge)イベントのモニタリング |
system.metrics | インスタンス性能指標の収集 |
system.mutations | Mutation作業のモニタリング |
system.parts | Part Activityデータの収集 |
system.part_log | Part Log履歴の照会 |
system.processes | Active Processのモニタリング |
system.query_log | Query Logの照会 |
system.replicas | 複製状態のモニタリング |
system.clusters | クラスター情報の照会 |
system.text_log | Text Logの照会 |
system.disks | Disk情報の収集 |
system.distribution_queue | 分散キュー状態の収集 |
| KILL QUERY | Active Processでのセッション(クエリ)終了機能 |
| SHOW | replicaテーブルの照会 |
3. 事前設定事項
exemONEモニタリングオプションの設定
ClickHouseインスタンスは、Setting > DatabaseのInstance登録/編集画面のCustom Configurationに以下のキー値を設定することで、指標収集方式を詳細に調整できます。
パス: Setting > Database > Custom Configuration
| オプション名 | 説明 |
|---|---|
clickhouse.querylog_duration_ms | クエリログ収集条件の最小実行時間(デフォルト値5ms) |
clickhouse.slow_query_time_ms | スロークエリと判断される最小実行時間(ミリ秒)基準、デフォルト値500ミリ秒 |