Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

nodetool disablefullquerylog

Disables full query logging (FQL) on the node.


Terminal window
nodetool [connection_options] disablefullquerylog

See connection options for connection options.

nodetool disablefullquerylog deactivates full query logging on a Cassandra node. When disabled, the node stops recording query execution details to the FQL log files.

This command is typically used after completing performance analysis or debugging sessions where query logging was temporarily enabled.

Non-Persistent Setting

This setting is applied at runtime only and does not persist across node restarts. After a restart, full query logging reverts to the full_query_logging_options configuration in cassandra.yaml.

To permanently disable full query logging, ensure it is not configured in cassandra.yaml, or set:

full_query_logging_options:
# log_dir: /var/log/cassandra/fql # Comment out or remove to disable

Terminal window
nodetool disablefullquerylog
Terminal window
nodetool disablefullquerylog
nodetool getfullquerylog
# Expected output includes: enabled: false

When full query logging is disabled:

  1. No new queries are logged
  2. Existing log files remain on disk
  3. Log archival continues for existing files
  4. Disk I/O overhead from logging is eliminated
FeatureStatus
Existing FQL log filesPreserved
Archive commandRuns for existing logs
Query executionContinues normally
FeatureStatus
New query loggingStops
FQL log growthStops
Logging overheadEliminated

When analysis session is complete:

Terminal window
# Analysis complete
nodetool disablefullquerylog
# Process collected logs
fqltool dump /var/log/cassandra/fql/ > analysis_queries.txt

If FQL is consuming too much disk:

Terminal window
# Disable logging immediately
nodetool disablefullquerylog
# Check disk space recovered
df -h /var/log/cassandra/
# Clean up logs if needed
rm -rf /var/log/cassandra/fql/*

When issue investigation is complete:

Terminal window
# Debug session complete
nodetool disablefullquerylog
# Archive logs for reference
tar -czf debug_fql_$(date +%Y%m%d).tar.gz /var/log/cassandra/fql/
rm -rf /var/log/cassandra/fql/*

If FQL is causing latency problems:

Terminal window
# Check current impact
nodetool proxyhistograms
# Disable FQL
nodetool disablefullquerylog
# Verify latency improvement
nodetool proxyhistograms

AspectImpact
Query loggingStops immediately
Disk I/ODecreases
Query latencyMay improve (if blocking was enabled)
Log file growthStops
MetricExpected Change
Write latencyMay decrease
Disk utilizationDecreases
CPU usageSlight decrease
Query throughputMay increase

fql_session.sh
#!/bin/bash
FQL_PATH="/var/log/cassandra/fql"
ARCHIVE_DIR="/archive/cassandra/fql"
echo "=== FQL Session Management ==="
# 1. Check if FQL is currently enabled
echo "1. Current FQL status:"
nodetool getfullquerylog
# 2. Disable FQL
echo ""
echo "2. Disabling FQL..."
nodetool disablefullquerylog
# 3. Verify disabled
echo ""
echo "3. Verification:"
nodetool getfullquerylog
# 4. Check captured data
echo ""
echo "4. Captured FQL data:"
if [ -d "$FQL_PATH" ] && [ "$(ls -A $FQL_PATH 2>/dev/null)" ]; then
echo "Log directory size: $(du -sh $FQL_PATH)"
echo "Query count: $(fqltool dump $FQL_PATH 2>/dev/null | wc -l)"
else
echo "No FQL data found"
fi
# 5. Archive if requested
echo ""
read -p "Archive FQL logs? (y/n): " archive
if [ "$archive" = "y" ]; then
mkdir -p $ARCHIVE_DIR
archive_file="${ARCHIVE_DIR}/fql_$(date +%Y%m%d_%H%M%S).tar.gz"
tar -czf $archive_file $FQL_PATH
echo "Archived to: $archive_file"
fi
# 6. Clean up if requested
echo ""
read -p "Clean up FQL directory? (y/n): " cleanup
if [ "$cleanup" = "y" ]; then
rm -rf ${FQL_PATH}/*
echo "FQL directory cleaned"
fi
echo ""
echo "=== FQL Session Complete ==="

Terminal window
# After disabling, logs remain
ls -la /var/log/cassandra/fql/
# View log contents
fqltool dump /var/log/cassandra/fql/
Terminal window
# Create archive
tar -czf fql_$(date +%Y%m%d).tar.gz /var/log/cassandra/fql/
# Move to archive location
mv fql_*.tar.gz /archive/cassandra/
Terminal window
# Quick analysis before cleanup
echo "Query Distribution:"
fqltool dump /var/log/cassandra/fql/ | grep -oE "^(SELECT|INSERT|UPDATE|DELETE)" | sort | uniq -c
echo ""
echo "Log Size:"
du -sh /var/log/cassandra/fql/
Terminal window
# Remove all FQL logs
rm -rf /var/log/cassandra/fql/*
# Verify cleanup
du -sh /var/log/cassandra/fql/

disable_fql_cluster.sh
#!/bin/bash
echo "Disabling FQL cluster-wide..."# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for node in $nodes; do
echo -n "$node: "
ssh "$node" "nodetool disablefullquerylog 2>/dev/null && echo "disabled" || echo "FAILED""
done
echo ""
echo "Verification:"
for node in $nodes; do
echo -n "$node: "
status=$(ssh "$node" "nodetool getfullquerylog 2>/dev/null | grep "enabled")"
echo "$status"
done
collect_fql_cluster.sh
#!/bin/bash
DEST_DIR="/data/fql_collection_$(date +%Y%m%d)"
mkdir -p $DEST_DIR# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
for node in $nodes; do
echo "Collecting FQL from $node..."
scp -r $node:/var/log/cassandra/fql/ $DEST_DIR/$node/
done
echo "FQL logs collected to $DEST_DIR"

Terminal window
# Check JMX connectivity
nodetool info
# Check for errors
grep -i "fql\|fullquery" /var/log/cassandra/system.log | tail -20
Terminal window
# Verify disabled
nodetool getfullquerylog
# If still enabled, retry
nodetool disablefullquerylog
# Check for persistence in cassandra.yaml
grep -A 10 "full_query_logging" /etc/cassandra/cassandra.yaml
Terminal window
# FQL may not have been the bottleneck
# Check other metrics
nodetool tpstats
nodetool compactionstats
iostat -x 1

Disable Guidelines

  1. Disable when done - Don't leave FQL running indefinitely
  2. Archive before cleanup - Preserve logs if analysis is needed
  3. Check disk space - Verify space is freed after cleanup
  4. Document findings - Record analysis results before cleanup
  5. Cluster consistency - Disable on all nodes if enabled cluster-wide
  6. Verify disabled - Always check with getfullquerylog

Post-Disable Workflow

After disabling FQL:

  1. Verify disabled with getfullquerylog
  2. Analyze captured logs with fqltool dump
  3. Archive logs if needed for future reference
  4. Clean up log directory to reclaim space
  5. Document any findings from the analysis

CommandRelationship
enablefullquerylogEnable FQL
getfullquerylogView FQL configuration
resetfullquerylogReset FQL path
disableauditlogDisable audit logging