설정하기
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 밀리초 |