Better Stack Windows logging

Start logging in 2 minutes

Collect logs and metrics from your Windows server using Vector.

1. Install Vector

Run in PowerShell as administrator:

Install Vector
Invoke-WebRequest https://packages.timber.io/vector/latest/vector-x64.msi -OutFile vector-latest-x64.msi
Start-Process msiexec.exe -ArgumentList "/i", "vector-latest-x64.msi", "/passive" -Wait

2. Download Vector configuration

Download Vector config
$config_yaml_path = "C:\Program Files\Vector\config\vector.yaml"
$backup_path = "C:\Program Files\Vector\config\vector-backup.yaml"
Move-Item -Path "$config_yaml_path" -Destination "$backup_path" -Force
$docker_present = if ((Get-Command docker -ErrorAction SilentlyContinue) -and (docker info 2>$null)) { "true" } else { "false" }
Invoke-RestMethod -Uri "https://telemetry.betterstack.com/vector-yaml/windows/$SOURCE_TOKEN?docker=$docker_present" |
  Set-Content $config_yaml_path


What does the configuration collect?

  • The System and Application channels of the Windows Event Log.
  • Host metrics such as CPU, memory, disk and network.
  • Logs of PostgreSQL, MySQL, MongoDB, Apache and Nginx from their default Windows locations. Adjust the paths in vector.yaml if your logs live elsewhere.
  • Docker container logs and stats when Docker is running.

3. Run Vector

Install Vector as a Windows service and start it:

Start Vector
& "C:\Program Files\Vector\bin\vector" service install --config "C:\Program Files\Vector\config\vector.yaml"
& "C:\Program Files\Vector\bin\vector" service start

You should see your logs in Better Stack โ†’ Live tail.

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! ๐Ÿ™

Additional information

Changed the configuration?

Restart the service to apply it:

Restart Vector
& "C:\Program Files\Vector\bin\vector" service restart

Looking for manual instructions to set up Vector?

Find step-by-step instructions in our dedicated Vector guide.