メインコンテンツまでスキップ

設定方法

1. サポートバージョン​

項目バージョン
exemONEv3.0.507 以降サポート
ClickHousev24.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.mutationsMutation作業のモニタリング
system.partsPart Activityデータの収集
system.part_logPart Log履歴の照会
system.processesActive Processのモニタリング
system.query_logQuery Logの照会
system.replicas複製状態のモニタリング
system.clustersクラスター情報の照会
system.text_logText Logの照会
system.disksDisk情報の収集
system.distribution_queue分散キュー状態の収集
KILL QUERYActive Processでのセッション(クエリ)終了機能
SHOWreplicaテーブルの照会

3. 事前設定事項​

exemONEモニタリングオプションの設定​

ClickHouseインスタンスは、Setting > DatabaseのInstance登録/編集画面のCustom Configurationに以下のキー値を設定することで、指標収集方式を詳細に調整できます。

パス: Setting > Database > Custom Configuration

オプション名説明
clickhouse.querylog_duration_msクエリログ収集条件の最小実行時間(デフォルト値5ms)
clickhouse.slow_query_time_msスロークエリと判断される最小実行時間(ミリ秒)基準、デフォルト値500ミリ秒