Overview
The statistics system tracks bandwidth usage, connection status, and historical data for each VPN client.Available Metrics
Data Transfer
Real-time upload and download statistics for each client
Connection Status
Last seen timestamps and online/offline indicators
Traffic Charts
Visual representation of bandwidth usage over time
Endpoint Information
Client’s current public IP and port
Real-Time Traffic Monitoring
Transfer Statistics
Each client card displays current transfer rates:- B: Bytes (0-1023)
- KB: Kilobytes (1024-1048575)
- MB: Megabytes (1048576-1073741823)
- GB: Gigabytes (1073741824+)
Transfer statistics update every second, providing near real-time monitoring of your VPN traffic.
Traffic Charts
Visual bandwidth representation with sparkline charts:- Enabling Charts
- Chart Types
- Chart Features
Chart Configuration
Charts use the ApexCharts library with optimized settings:Connection Status
Last Seen Indicator
Tracks the most recent client activity: Time Formats:- Just now: Activity within the last 30 seconds
- X seconds ago: Within the last minute
- X minutes ago: Within the last hour
- X hours ago: Within the last day
- X days ago: Older than 24 hours
- Never: No recorded connection
The “Last Seen” timestamp updates based on WireGuard handshake activity. Clients must successfully complete a handshake to register as “seen”.
Endpoint Information
When viewing detailed client configuration, the endpoint field shows:- Client’s current public IP address
- Source port for the WireGuard connection
- Useful for troubleshooting NAT and firewall issues
The endpoint is read-only and automatically detected by WireGuard. It represents where the server sees traffic coming from.
Data Refresh Mechanism
Statistics automatically update at regular intervals:Refresh Settings
Frequency: 1 second (1000ms) What Updates:- Client transfer statistics
- Last seen timestamps
- Traffic chart data (if enabled)
- Connection status
- Charts only update when visible
- Background tabs reduce refresh rate
- Efficient delta updates
- Minimal server load
Manual Refresh
The system handles refresh automatically, but you can trigger updates by:- Navigating away and back to the page
- Toggling chart visibility
- Reloading the browser page
Understanding Transfer Data
Cumulative vs. Rate
WireGuard Easy displays both total transfer and transfer rate: Total Transfer:Reset Behavior
Transfer statistics reset when:- The WireGuard interface restarts
- The server reboots
- The client reconnects after interface restart
Performance Considerations
Impact on Server
Minimal Load:- Statistics read from WireGuard kernel module
- No additional background processes
- Efficient data structure access
- Negligible CPU overhead
Impact on Browser
Resource Usage:- Charts Disabled: Very low (simple DOM updates)
- Charts Enabled: Moderate (chart rendering)
- Many Clients: Linear increase with client count
- Optimization Tips
- Scaling Guidelines
For optimal performance with many clients:
- Disable Charts: Use the header toggle when charts aren’t needed
- Modern Browser: Ensure your browser is up to date
- Hardware Acceleration: Enable GPU acceleration in browser settings
- Close Unused Tabs: Reduce overall browser resource usage
Monitoring Best Practices
Identifying Issues
No Traffic Detected
No Traffic Detected
Possible Causes:
- Client is connected but idle (no active traffic)
- Client failed to establish connection
- Configuration error preventing traffic flow
- Firewall blocking packets
- Check Last Seen timestamp
- Verify client is enabled
- Test connectivity with ping
- Review client logs
Unexpected Traffic Patterns
Unexpected Traffic Patterns
High Upload, Low Download:
- Typical for client-initiated traffic
- Uploading files or backups
- Sending data to services
- Streaming or downloading content
- Normal browsing patterns
- File synchronization
- Video calls
- Real-time collaboration
- Peer-to-peer applications
Connection Drops
Connection Drops
Symptoms:
- Last Seen timestamp increasing
- Traffic charts showing gaps
- Periodic disconnections
- Enable Persistent Keepalive (25 seconds)
- Check client network stability
- Verify MTU settings
- Review server logs for errors
Security Monitoring
Use statistics to identify security concerns: Unusual Activity:- Unexpected traffic from inactive clients
- Abnormally high bandwidth usage
- Connections from unexpected endpoints
- Traffic patterns inconsistent with user behavior
Capacity Planning
Traffic statistics inform infrastructure decisions:- Bandwidth Usage: Monitor total traffic to ensure adequate server capacity
- Client Count: Track active clients vs. configured clients
- Peak Times: Identify high-traffic periods
- Growth Trends: Plan for future scaling needs
Limitations and Known Issues
Current Limitations
- No Historical Data: Statistics are not stored long-term
- Session-Based: Resets on server restart
- No Aggregation: No total across all clients
- No Export: Cannot export statistics data
- No Alerts: No threshold-based notifications
Future Enhancements
Planned improvements to the statistics system:- Long-term statistics storage
- Historical data visualization
- Bandwidth alerts and quotas
- Per-client traffic limits
- Statistics export (CSV, JSON)
- Aggregate dashboard view
- Client comparison tools
Advanced Monitoring
External Monitoring Integration
For advanced monitoring, integrate with external tools: Prometheus:API Access
Access statistics programmatically:- Custom monitoring dashboards
- Automated reporting
- Integration with billing systems
- Capacity planning automation