enablefullquerylog — 전체 쿼리 로그 활성화
enablefullquerylog — 전체 쿼리 로그 활성화
nodetool enablefullquerylog 명령은 전체 쿼리 로그(full query log, FQL)를 활성화하는 명령이에요. 옵션 기본값은 cassandra.yaml에 설정돼 있어요.
본문
enablefullquerylog는 모든 쿼리를 기록하는 전체 쿼리 로그를 켜는 명령이에요. 로그 저장 경로(--path), 큐가 가득 찼을 때 동작(--blocking), 롤링 주기(--roll-cycle) 등을 인자로 지정할 수 있어요. 아래는 완전한 사용법이에요.
NAME
nodetool enablefullquerylog - Enable full query logging, defaults for
the options are configured in cassandra.yaml
SYNOPSIS
nodetool [(-h <host> | --host <host>)] [(-p <port> | --port <port>)]
[(-pp | --print-port)] [(-pw <password> | --password <password>)]
[(-pwf <passwordFilePath> | --password-file <passwordFilePath>)]
[(-u <username> | --username <username>)] enablefullquerylog
[--archive-command <archive_command>] [--blocking <blocking>]
[--max-archive-retries <archive_retries>]
[--max-log-size <max_log_size>] [--max-queue-weight <max_queue_weight>]
[--path <path>] [--roll-cycle <roll_cycle>]
OPTIONS
--archive-command <archive_command>
Command that will handle archiving rolled full query log files.
Format is "/path/to/script.sh %path" where %path will be replaced
with the file to archive Enable this by setting the
full_query_logging_options.allow_nodetool_archive_command: true in
the config.
--blocking <blocking>
If the queue is full whether to block producers or drop samples
[true|false].
-h <host>, --host <host>
Node hostname or ip address
--max-archive-retries <archive_retries>
Max number of archive retries.
--max-log-size <max_log_size>
How many bytes of log data to store before dropping segments. Might
not be respected if a log file hasn't rolled so it can be deleted.
--max-queue-weight <max_queue_weight>
Maximum number of bytes of query data to queue to disk before
blocking or dropping samples.
-p <port>, --port <port>
Remote jmx agent port number
--path <path>
Path to store the full query log at. Will have it's contents
recursively deleted.
-pp, --print-port
Operate in 4.0 mode with hosts disambiguated by port number
-pw <password>, --password <password>
Remote jmx agent password
-pwf <passwordFilePath>, --password-file <passwordFilePath>
Path to the JMX password file
--roll-cycle <roll_cycle>
How often to roll the log file (MINUTELY, HOURLY, DAILY).
-u <username>, --username <username>
Remote jmx agent username
--path로 지정한 로그 저장 경로의 기존 내용은 재귀적으로 삭제되니 주의하세요. 보관 명령은 --archive-command "/path/to/script.sh %path" 형태로 주고, 설정 파일에서 full_query_logging_options.allow_nodetool_archive_command: true를 켜야 해요.
더 알아보기 (Learn more)
- nodetool disablefullquerylog — 전체 쿼리 로그 비활성화
- 전체 쿼리 로깅 — FQL 설정