A lightweight Windows metrics collector specifically designed for WebRTC voice quality troubleshooting. This agent pushes metrics to a Prometheus Push Gateway and includes enhanced network interface detection for correlation with WebRTC statistics.
π Sister Application: Pairs with the WebRTC Chrome Extension for comprehensive voice quality monitoring. Both applications use the same
agent_idfor seamless correlation in Grafana dashboards.
- π Lightweight: ~80% smaller than full windows_exporter
- π‘ Push Gateway Integration: Pushes metrics instead of hosting HTTP endpoint
- π WebRTC Correlation: Agent ID labeling for correlation with WebRTC stats
- π Enhanced Network Detection: Detailed interface type detection (ethernet, wifi, cellular)
- β‘ Minimal Overhead: Focused on essential metrics only
- π οΈ Windows Service: Runs as a background Windows service
Download the latest release from GitHub Releases.
# Install as Windows service (no authentication)
.\windows-agent-collector.exe --agent-id=agent_001 --push.gateway-url=http://pushgateway:9091 install
# Start the service
sc start windows_agent_collector# Install with Push Gateway authentication
.\windows-agent-collector.exe `
--agent-id=agent_001 `
--push.gateway-url=http://pushgateway:9091 `
--push.username=monitoring_user `
--push.password=secure_password `
--push.interval=30s `
install
# Start the service
sc start windows_agent_collector- Create configuration file (
config.yaml):
# Push Gateway Configuration
push:
gateway-url: "http://pushgateway.example.com:9091"
username: "monitoring_user"
password: "secure_password"
interval: "30s"
job-name: "windows_agent"
# Agent Configuration
agent-id: "agent_001"
# Collectors Configuration
collectors:
enabled: "cpu,memory,net,pagefile"
# Logging Configuration
log:
level: "info"
format: "text"- Set file permissions (Administrator only):
icacls config.yaml /inheritance:d
icacls config.yaml /grant:r "Administrators:(R)"
icacls config.yaml /remove "Users"- Install and start service:
.\windows-agent-collector.exe --config.file=config.yaml install
sc start windows_agent_collector# Check service status
sc query windows_agent_collector
# Stop service
sc stop windows_agent_collector
# Restart service
sc stop windows_agent_collector && sc start windows_agent_collector
# Uninstall service
sc stop windows_agent_collector
.\windows-agent-collector.exe uninstall# Run directly (for testing)
.\windows-agent-collector.exe --agent-id=agent_001 --push.gateway-url=http://pushgateway:9091
# With authentication
.\windows-agent-collector.exe --agent-id=agent_001 --push.gateway-url=http://pushgateway:9091 --push.username=user --push.password=pass
# Using config file
.\windows-agent-collector.exe --config.file=config.yaml- CPU utilization percentage
- CPU frequency information
- Per-core statistics
- Available memory bytes
- Used memory bytes
- Memory utilization percentage
- Bytes sent/received per interface
- Network interface type (ethernet/wifi/cellular/vpn) - Key for WebRTC correlation
- Interface operational status
- Current bandwidth information
- Pagefile usage and availability
- Swap utilization percentage
| Flag | Description | Required | Default |
|---|---|---|---|
--agent-id |
Unique agent identifier for correlation | β Yes | - |
--push.gateway-url |
Prometheus Push Gateway URL | β Yes | - |
--push.username |
Basic auth username for push gateway | No | - |
--push.password |
Basic auth password for push gateway | No | - |
--push.interval |
Push frequency (e.g., 30s, 1m) | No | 30s |
--push.job-name |
Prometheus job name | No | windows_agent |
--collectors.enabled |
Comma-separated list of collectors | No | cpu,memory,net,pagefile |
--config.file |
Path to YAML configuration file | No | - |
--log.level |
Log level (debug, info, warn, error) | No | info |
--log.format |
Log format (text, json) | No | text |
Create a config.yaml file for more complex configurations:
# Basic configuration
push:
gateway-url: "http://pushgateway.example.com:9091"
username: "monitoring_user"
password: "secret_password"
interval: "30s"
job-name: "windows_agent"
# Agent identifier (must match Chrome extension)
agent-id: "agent_001"
# Enabled collectors
collectors:
enabled: "cpu,memory,net,pagefile"
# Logging configuration
log:
level: "info"
format: "text"
# Process configuration
process:
priority: "normal"
memory-limit: "0"You can override configuration using environment variables:
$env:AGENT_ID = "agent_001"
$env:PUSH_GATEWAY_URL = "http://pushgateway:9091"
$env:PUSH_USERNAME = "monitoring_user"
$env:PUSH_PASSWORD = "secure_password"# Production-ready configuration
push:
gateway-url: "https://pushgateway.prod.company.com:9091" # Use HTTPS
username: "${PUSH_USERNAME}" # Environment variable
password: "${PUSH_PASSWORD}" # Environment variable
interval: "30s"
job-name: "windows_agent_prod"
# Agent identifier from environment
agent-id: "${AGENT_ID}"
# Enabled collectors
collectors:
enabled: "cpu,memory,net,pagefile"
# Structured logging for production
log:
level: "info"
format: "json"
# Process configuration
process:
priority: "normal"
memory-limit: "0"This Windows agent works seamlessly with the WebRTC Chrome Extension to provide comprehensive voice quality monitoring:
- Windows Agent: Collects system metrics (CPU, memory, network interface types)
- Chrome Extension: Captures WebRTC statistics (audio quality, packet loss, jitter, bitrates)
- Shared Agent ID: Both use the same
agent_idfor correlation
In Grafana, you can create unified dashboards combining metrics from both sources:
# Windows system metrics
windows_cpu_time_total{agent_id="agent_001",mode="idle"}
windows_memory_available_bytes{agent_id="agent_001"}
windows_net_nic_info{agent_id="agent_001",nic="WiFi",interface_type="wifi"}
# WebRTC metrics (from Chrome extension)
webrtc_audio_packets_lost{agent_id="agent_001"}
webrtc_audio_jitter{agent_id="agent_001"}
webrtc_connection_state{agent_id="agent_001",interface_type="wifi"}
Correlate network issues with call quality:
- High CPU usage + packet loss = resource contention
- WiFi interface + high jitter = wireless connectivity issues
- Memory pressure + audio dropouts = system performance impact
Enhanced detection for WebRTC compatibility:
ethernet- Wired Ethernet connectionswifi- 802.11 wireless connectionscellular- Mobile/cellular connectionsvpn- VPN tunnel interfacesloopback- Loopback interfacesunknown- Unidentified interface types
# Download from releases or build from source
.\windows-agent-collector.exe --agent-id=agent_001 --push.gateway-url=http://pushgateway:9091 installInstall the WebRTC Chrome Extension and configure it with the same agent_id=agent_001.
Create dashboards that query both metric sources using the shared agent_id label for unified troubleshooting views.
# Run PowerShell as Administrator
# Right-click PowerShell -> "Run as Administrator"# Check Windows Event Log for errors
Get-EventLog -LogName Application -Source "windows_agent_collector" -EntryType Error -Newest 5
# Test configuration manually first
.\windows-agent-collector.exe --config.file=config.yaml --log.level=debug# Test Push Gateway connectivity
curl -u "monitoring_user:secure_password" http://pushgateway:9091/metrics
# Verify credentials in configuration
.\windows-agent-collector.exe --config.file=config.yaml --log.level=debug# Check service status and details
Get-Service -Name "windows_agent_collector"
sc qc windows_agent_collector
# View service logs
Get-EventLog -LogName Application -Source "windows_agent_collector" -Newest 10
# Check service executable path
(Get-WmiObject win32_service | Where-Object {$_.name -eq "windows_agent_collector"}).PathName# Test configuration file syntax (dry run)
.\windows-agent-collector.exe --config.file=config.yaml --help
# Test running with debug logging
.\windows-agent-collector.exe --config.file=config.yaml --log.level=debug
# Validate Push Gateway connectivity
Test-NetConnection -ComputerName pushgateway.example.com -Port 9091
# Test specific configuration
.\windows-agent-collector.exe --agent-id=test_001 --push.gateway-url=http://localhost:9091 --log.level=debug| Issue | Solution |
|---|---|
| Push Gateway unreachable | Check URL, firewall rules, and network connectivity |
| Authentication failed | Verify username/password, test with curl |
| Service crashes on startup | Check Event Log, validate configuration file |
| No metrics appearing | Verify agent_id matches Chrome extension |
| Permission denied | Run as Administrator, check file permissions |
# Create config.yaml
@"
push:
gateway-url: "http://pushgateway:9091"
username: "monitoring_user"
password: "secure_password"
interval: "30s"
job-name: "windows_agent"
agent-id: "agent_001"
collectors:
enabled: "cpu,memory,net,pagefile"
log:
level: "info"
format: "text"
"@ | Out-File -FilePath config.yaml -Encoding UTF8
# Install service
.\windows-agent-collector.exe --config.file=config.yaml install
# Start service
sc start windows_agent_collector# Install with command line flags
.\windows-agent-collector.exe --agent-id=agent_001 --push.gateway-url=http://pushgateway:9091 --push.username=user --push.password=pass install
# Start service
sc start windows_agent_collector# Test configuration without installing service
.\windows-agent-collector.exe --agent-id=test_001 --push.gateway-url=http://localhost:9091 --log.level=debug
# Test with config file
.\windows-agent-collector.exe --config.file=config.yaml --log.level=debug# Clone repository
git clone https://github.com/Brownster/agent-windows.git
cd agent-windows
# Build for Windows
GOOS=windows GOARCH=amd64 go build -o windows-agent-collector.exe ./cmd/agentThis agent is purpose-built for WebRTC troubleshooting:
| Feature | windows_exporter | windows-agent-collector |
|---|---|---|
| Architecture | HTTP server (pull) | Push Gateway (push) |
| Collectors | 50+ collectors | 4 essential collectors |
| Binary Size | ~50MB | ~10MB |
| Memory Usage | 200MB default | 50MB default |
| WebRTC Integration | None | Built-in agent correlation |
| Network Detection | Basic | Enhanced interface types |
| Deployment | HTTP endpoint | Push to gateway |
Licensed under the Apache License, Version 2.0. See LICENSE for details.
- WebRTC Chrome Extension - Sister application for capturing WebRTC statistics
- Original windows_exporter - Full-featured Windows metrics exporter
Built specifically for WebRTC voice quality monitoring and troubleshooting scenarios. Use together with the WebRTC Chrome Extension for comprehensive insights.