Gamer-Server-Utility-Scripts/Mumble/README.md
2025-07-29 14:55:27 -04:00

2.2 KiB

Mumble Server Statistics

This package includes scripts to display statistics about your Mumble server and collect user activity data over time.

Files

  • mumble_stats.php: Main statistics display page
  • mumble_stats_collector.php: Data collection script (can run via cron job)
  • mumble_users.json: Stored user statistics
  • mumble_stats_errors.txt: Error log for the stats page
  • mumble_stats_collector.log: Log file for the collector script

Setup Instructions

  1. Make sure PHP has the Ice extension installed
  2. Ensure MumbleServer.php is in the same directory (generated from Slice)
  3. Set the correct permissions:
    chown www-data:www-data /var/www/html/bludit/mumble_users.json
    chmod 664 /var/www/html/bludit/mumble_users.json
    chown www-data:www-data /var/www/html/bludit/mumble_stats_collector.log
    chmod 664 /var/www/html/bludit/mumble_stats_collector.log
    

Configuration

Update these variables in both script files:

  • $iceConnectionString: Your Ice endpoint (default: "Meta:tcp -h 127.0.0.1 -p 6502")
  • $serverId: Your Mumble server ID (default: 1)
  • $iceSecret: Your icesecretread value
  • $serverHostname: Your server's hostname (default: "voice.claytonia.net")

How it Works

The system works in two ways:

  1. On-demand: When someone visits mumble_stats.php, it runs the collector script to update statistics and displays current server information.

  2. Cron job: For more accurate tracking, set up a cron job to run the collector regularly:

    */5 * * * * cd /var/www/html/bludit && /usr/bin/php mumble_stats_collector.php
    

Statistics Collected

  • User connection count
  • First and last seen timestamps
  • Total connection time
  • Days active
  • Favorite channels
  • Current online status

Customizing

The stats page uses Bootstrap and a dark theme. You can customize the appearance by modifying the CSS in mumble_stats.php.

Troubleshooting

If you encounter problems:

  1. Check mumble_stats_errors.txt for any errors during page load
  2. Check mumble_stats_collector.log for collector script issues
  3. Make sure Ice is properly configured and the secret matches your Mumble server's icesecretread value
  4. Verify file permissions allow the web server to write to JSON and log files