Skip to main content

Overview

Proper monitoring ensures your TeamSpeak 6 Server runs smoothly and helps you identify issues before they impact users. This guide covers monitoring strategies for both Docker and binary installations.

Health Checks

Docker Health Checks

Add health checks to your Docker Compose configuration to monitor container status:
docker-compose.yaml
services:
  teamspeak:
    image: teamspeaksystems/teamspeak6-server:latest
    container_name: teamspeak-server
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "nc", "-z", "localhost", "9987"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    ports:
      - "9987:9987/udp"
      - "30033:30033/tcp"
    environment:
      - TSSERVER_LICENSE_ACCEPTED=accept
    volumes:
      - teamspeak-data:/var/tsserver

volumes:
  teamspeak-data:
Check container health status:
docker ps --format "table {{.Names}}\t{{.Status}}"

Process Monitoring

For binary installations, monitor the server process:
# Check if server is running
ps aux | grep tsserver

# Monitor server with systemd
systemctl status teamspeak

# View server uptime
ps -p $(pgrep tsserver) -o etime=

Port Connectivity

Verify that all required ports are accessible:
# Check voice port (UDP)
nc -zuv localhost 9987

# Check file transfer port (TCP)
nc -zv localhost 30033

# Check ServerQuery HTTP port (if enabled)
curl -I http://localhost:10080

# Check ServerQuery SSH port (if enabled)
telnet localhost 10022
External connectivity testing should be performed from client machines to ensure firewall rules are correctly configured.

Resource Usage

Docker Container Resources

Monitor resource consumption for Docker deployments:
# View real-time resource usage
docker stats teamspeak-server

# View detailed container information
docker inspect teamspeak-server

# Set resource limits in docker-compose.yaml
docker-compose.yaml
services:
  teamspeak:
    image: teamspeaksystems/teamspeak6-server:latest
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 2G
        reservations:
          cpus: '1.0'
          memory: 512M

System Resources

For binary installations, monitor system resources:
# CPU and memory usage
top -p $(pgrep tsserver)

# Detailed memory information
ps -p $(pgrep tsserver) -o pid,vsz,rss,comm

# Network connections
netstat -tulpn | grep tsserver

# Open file descriptors
lsof -p $(pgrep tsserver) | wc -l

Database Monitoring

SQLite Monitoring

For SQLite databases, monitor file size and integrity:
# Check database size
ls -lh /var/tsserver/ts6server.sqlite

# Run integrity check
sqlite3 /var/tsserver/ts6server.sqlite "PRAGMA integrity_check;"

# View database statistics
sqlite3 /var/tsserver/ts6server.sqlite ".dbinfo"
Do not run integrity checks during peak usage times as they can temporarily impact performance.

MariaDB Monitoring

For MariaDB databases, use standard monitoring tools:
-- Check connection count
SHOW STATUS LIKE 'Threads_connected';

-- View active queries
SHOW PROCESSLIST;

-- Check database size
SELECT 
  table_schema AS 'Database',
  ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS 'Size (MB)'
FROM information_schema.tables
WHERE table_schema = 'teamspeak'
GROUP BY table_schema;

-- Monitor slow queries
SHOW VARIABLES LIKE 'slow_query_log';
SHOW VARIABLES LIKE 'long_query_time';
Enable query logging for troubleshooting:
tsserver.yaml
server:
  database:
    config:
      log-queries: 1
Query logging can generate significant log volume. Only enable during troubleshooting.

ServerQuery Monitoring

Use ServerQuery to retrieve real-time server statistics:
# Connect via HTTP query
curl -X POST http://localhost:10080 \
  -d "use sid=1"

curl -X POST http://localhost:10080 \
  -d "serverinfo"

# Get virtual server statistics
curl -X POST http://localhost:10080 \
  -d "serverrequestconnectioninfo"
Key metrics to monitor:
  • virtualserver_clientsonline - Current connected clients
  • virtualserver_queryclientsonline - Active query connections
  • virtualserver_uptime - Server uptime in seconds
  • virtualserver_total_bytes_uploaded - Total data uploaded
  • virtualserver_total_bytes_downloaded - Total data downloaded
  • connection_bandwidth_sent_last_second_total - Current outbound bandwidth
  • connection_bandwidth_received_last_second_total - Current inbound bandwidth

Log Monitoring

Monitor server logs for errors and warnings:
# Follow live logs
docker logs -f teamspeak-server

# View recent logs with timestamps
docker logs -f --timestamps teamspeak-server

# Search logs for errors
docker logs teamspeak-server 2>&1 | grep -i error

# Export logs to file
docker logs teamspeak-server > teamspeak-logs.txt 2>&1
See the Logging page for detailed information on log management.

Automated Monitoring

Using Prometheus and Grafana

For advanced monitoring, integrate with Prometheus and Grafana:
1

Install Prometheus Node Exporter

Deploy node exporter to collect system metrics:
docker-compose.yaml
services:
  node-exporter:
    image: prom/node-exporter:latest
    container_name: node-exporter
    restart: unless-stopped
    ports:
      - "9100:9100"
2

Configure Prometheus

Add TeamSpeak server endpoints to Prometheus configuration:
prometheus.yml
scrape_configs:
  - job_name: 'teamspeak-node'
    static_configs:
      - targets: ['node-exporter:9100']
3

Create Grafana Dashboards

Import or create dashboards to visualize:
  • CPU and memory usage
  • Network traffic
  • Connected clients
  • Database performance

Alerting

Set up alerts for critical conditions:
  • Server process stopped
  • High CPU or memory usage (>80% for 5 minutes)
  • Disk space low (<10% free)
  • Connection failures
  • Database errors in logs
Use monitoring tools like Nagios, Zabbix, or Datadog for enterprise-grade monitoring and alerting.

Performance Benchmarks

Typical resource usage patterns:
ClientsCPU UsageMemory UsageBandwidth (Peak)
105-10%200-300 MB0.5-1 Mbps
3215-25%400-600 MB1.5-3 Mbps
5025-40%600-900 MB3-5 Mbps
Actual usage varies based on codec settings, activity levels, and hardware specifications.

Troubleshooting

Common monitoring issues:
IssuePossible CauseSolution
Health check failingServer not respondingCheck logs, verify ports, restart server
High memory usageMemory leak or large client loadMonitor trends, update server, increase resources
Database slow queriesMissing indexes, high loadEnable query logging, optimize database
Connection timeoutsNetwork issues, firewallCheck firewall rules, verify port forwarding
For more troubleshooting guidance, see the Logging page.

Build docs developers (and LLMs) love