Skip to content

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

nodetool resetfullquerylog

Resets the full query logging path to the configured value.


Terminal window
nodetool [connection_options] resetfullquerylog

See connection options for connection options.

nodetool resetfullquerylog stops full query logging and cleans up log files in the configured log directory (and any path specified via JMX). This command effectively disables FQL if it was enabled.

Cleans Log Directory

This command stops FQL and cleans log files in the configured directories. It does not simply reset the path—it deactivates logging and removes log data.


Terminal window
nodetool resetfullquerylog
Terminal window
nodetool resetfullquerylog
nodetool getfullquerylog

When resetfullquerylog is executed:

  1. FQL is disabled if it was enabled
  2. Log files in the configured directory are cleaned up
  3. Log files in any JMX-specified path are also cleaned
  4. The FQL configuration is reset to defaults
AspectBeforeAfter
FQL enabledYes (if was enabled)No
Log filesPresentCleaned
Log pathCustom or configuredReset to config

After using a temporary custom path:

Terminal window
# Previously enabled with custom path
nodetool enablefullquerylog --path /tmp/fql_debug
# Reset to configured path
nodetool resetfullquerylog
# Verify
nodetool getfullquerylog

Align runtime settings with configuration file:

Terminal window
# Check current runtime path
nodetool getfullquerylog | grep log_dir
# Check configured path
grep "log_dir" /etc/cassandra/cassandra.yaml
# Reset to match config
nodetool resetfullquerylog

Return to normal operation after debug session:

Terminal window
# Debug session used custom path
# Now restore normal path
nodetool resetfullquerylog
# Continue with normal FQL path
nodetool getfullquerylog

fql_debug_session.sh
#!/bin/bash
DEBUG_PATH="/tmp/fql_debug_$(date +%Y%m%d_%H%M%S)"
mkdir -p $DEBUG_PATH
echo "=== FQL Debug Session ==="
# 1. Save current configuration
echo "1. Current FQL configuration:"
nodetool getfullquerylog
# 2. Enable with debug path
echo ""
echo "2. Enabling FQL with debug path: $DEBUG_PATH"
nodetool enablefullquerylog --path $DEBUG_PATH --roll-cycle MINUTELY
# 3. Wait for data collection
echo ""
echo "3. Collecting data... Press Enter when done."
read
# 4. Disable FQL
echo ""
echo "4. Disabling FQL..."
nodetool disablefullquerylog
# 5. Process debug logs
echo ""
echo "5. Debug logs captured at: $DEBUG_PATH"
echo " Size: $(du -sh $DEBUG_PATH)"
echo " Entries: $(fqltool dump $DEBUG_PATH 2>/dev/null | wc -l)"
# 6. Reset to default path
echo ""
echo "6. Resetting to default path..."
nodetool resetfullquerylog
# 7. Verify reset
echo ""
echo "7. Configuration after reset:"
nodetool getfullquerylog
echo ""
echo "=== Debug Session Complete ==="
echo "Debug logs remain at: $DEBUG_PATH"

cassandra.yaml
full_query_logging_options:
log_dir: /var/log/cassandra/fql
# ... other settings
Terminal window
# Override configured path at runtime
nodetool enablefullquerylog --path /custom/path
# Reset to cassandra.yaml path
nodetool resetfullquerylog

reset_fql_cluster.sh
#!/bin/bash
echo "Resetting 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 resetfullquerylog 2>/dev/null && echo "reset" || echo "FAILED"'
done
echo ""
echo "Verification:"
for node in $nodes; do
echo "=== $node ==="
ssh "$node" 'nodetool getfullquerylog 2>/dev/null | grep "log_dir"'
done

Terminal window
# Check if cassandra.yaml has FQL configuration
grep -A 10 "full_query_logging_options" /etc/cassandra/cassandra.yaml
# If no config, reset has nothing to reset to
# The path may remain unchanged or empty
Terminal window
# Verify the reset command succeeded
nodetool resetfullquerylog
# Check current configuration
nodetool getfullquerylog
# Check cassandra.yaml for configured path
grep "log_dir" /etc/cassandra/cassandra.yaml
# If cassandra.yaml doesn't have a path configured,
# the runtime path may remain
Terminal window
# After reset, existing logs remain at old path
# They are not moved or deleted
# Check old path
ls -la /old/custom/path/
# Move or archive if needed
mv /old/custom/path/* /archive/

cleanup_fql_paths.sh
#!/bin/bash
# Get current configured path
current_path=$(nodetool getfullquerylog | grep "log_dir" | awk '{print $2}')
echo "Current FQL path: $current_path"
echo ""
# Find other potential FQL directories
echo "Potential FQL directories on this system:"
find /var/log/cassandra /tmp -type d -name "*fql*" 2>/dev/null
echo ""
echo "Review and clean up old FQL directories as needed."

Reset Guidelines

  1. Document custom paths - Track when and why custom paths are used
  2. Clean up after reset - Archive or remove logs at old paths
  3. Verify configuration - Check cassandra.yaml has valid FQL config
  4. Cluster consistency - Reset on all nodes if custom path was cluster-wide
  5. Check disk space - Ensure default path has sufficient space

When to Reset

  • After temporary debugging sessions
  • To align runtime with configuration
  • After maintenance operations that used custom paths
  • To restore normal operational logging

CommandRelationship
enablefullquerylogEnable FQL (with optional custom path)
disablefullquerylogDisable FQL
getfullquerylogView FQL configuration