Skip to content

Latest commit

 

History

History
104 lines (78 loc) · 2.19 KB

Inspect-tool.md

File metadata and controls

104 lines (78 loc) · 2.19 KB

Foxhole Inspector Documentation

The Foxhole Inspector is a diagnostic tool that provides detailed information about your deployment's state, including database statistics, Redis status, MinIO storage, and filesystem information.

Prerequisites

  • Docker and Docker Compose must be running
  • The Foxhole application must be deployed and running
  • You must run the script from the project root directory

Usage

./inspect.sh [options]

Options

  • --format <format>: Output format (default: json)
    • json: Output in JSON format
    • text: Output in human-readable text format
  • --user-secret <secret>: Filter inspection by specific user secret
  • --hours <n>: Show recent activity for the last n hours (default: 24)
  • --output <file>: Write output to a file instead of stdout

Examples

  1. View help and available options:
./inspect.sh --help
  1. Basic inspection in text format:
./inspect.sh --format text
  1. Inspect specific user's data:
./inspect.sh --user-secret "user-secret-here" --format text
  1. Custom time range inspection:
./inspect.sh --hours 48 --format text
  1. Save inspection results to file:
./inspect.sh --format json --output inspection_results.json

Output Information

The inspector provides information about:

Database Status

  • Database file size
  • Table schemas
  • Entity counts (users, tasks, topics, people, notes)
  • Recent activity

Redis Status

  • Connection status
  • Memory usage
  • Total keys
  • Sample of stored keys

MinIO Status

  • Connection status
  • Bucket information
  • Recent objects

Filesystem Status

  • Data directory size
  • Directory contents
  • Path information

Troubleshooting

If you encounter any issues:

  1. Ensure the application containers are running:
docker-compose ps
  1. Check container logs:
docker-compose logs app
  1. Verify database path:
./inspect.sh --format text | grep "database"

Notes

  • The inspection is non-intrusive and read-only
  • Large datasets might take longer to process
  • Memory usage might spike temporarily during inspection
  • All timestamps are in ISO format
  • File sizes are in bytes unless otherwise specified