How to Set Up Uptime Monitoring with PRTG on Windows Server 2012 R2
PRTG Network Monitor by Paessler is a widely deployed network and infrastructure monitoring platform that provides comprehensive uptime monitoring, performance metrics, and alerting for Windows Server 2012 R2 environments. PRTG uses a combination of ping checks, WMI queries, SNMP polling, and the PRTG Windows sensor agent to monitor server health at granular detail. This guide covers deploying the PRTG remote probe on Windows Server 2012 R2, configuring sensors for uptime and performance monitoring, setting alert thresholds, and configuring notification channels.
Prerequisites
A PRTG Core Server must be installed and accessible within the network. The PRTG Core Server can be the dedicated monitoring server or an existing Windows Server. The target Windows Server 2012 R2 must be reachable from the PRTG Core Server. WMI access must be enabled on the target server. For remote probe deployment, the PRTG probe installer must be accessible. Firewall rules must permit TCP port 23560 (PRTG Probe-to-Core communication) if a remote probe is being deployed. Administrator credentials for the target server are required for WMI-based sensors.
Step 1: Configure WMI for Remote PRTG Access
PRTG uses WMI to query Windows performance counters, service states, and system information. Enable WMI remote access on the target Windows Server 2012 R2:
# Enable WMI firewall exceptions
netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes
# Add WMI firewall rules via PowerShell
Enable-NetFirewallRule -DisplayGroup "Windows Management Instrumentation (WMI)"
# Verify WMI service is running
Get-Service -Name "winmgmt" | Select-Object Name, Status, StartType
Set-Service -Name "winmgmt" -StartupType Automatic
Start-Service -Name "winmgmt"
Grant the PRTG service account WMI access on the target server (if using a dedicated monitoring account rather than a domain administrator):
# Add PRTG monitoring account to Performance Monitor Users and Remote Management Users
$prtgAccount = "DOMAINprtg-monitor"
Add-LocalGroupMember -Group "Performance Monitor Users" -Member $prtgAccount
Add-LocalGroupMember -Group "Remote Management Users" -Member $prtgAccount
Add-LocalGroupMember -Group "Distributed COM Users" -Member $prtgAccount
Step 2: Install the PRTG Remote Probe (Optional)
For monitoring servers behind firewalls or in remote sites, deploy a PRTG Remote Probe on the target server or a local monitoring server. The remote probe connects outbound to the PRTG Core Server, eliminating the need for inbound firewall rules from the core server.
Download the PRTG remote probe installer from the PRTG web interface (Setup → Remote Probes → Add Remote Probe). Run the installer on the target server:
PRTG_Remote_Probe.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART ^
/CORENAME="prtg-server.yourdomain.com" ^
/COREPORT="23560" ^
/PROBEKEY="YOUR-PRTG-PROBE-KEY"
After installation, the probe service starts and connects to the PRTG Core Server. Approve the probe connection in the PRTG web interface under Setup → Remote Probes.
Step 3: Add the Windows Server to PRTG Monitoring
In the PRTG web interface, navigate to your device group and add a new device. Enter the server’s hostname or IP address, specify the authentication credentials (WMI user with appropriate rights), and select the operating system (Windows). PRTG will attempt auto-discovery of sensors based on the server’s role.
For command-line configuration, use the PRTG API:
# Add a device via PRTG API (run from any server with web access to PRTG)
$prtgServer = "prtg.yourdomain.com"
$username = "prtgadmin"
$passhash = "YOUR_PASSHASH"
$parentId = "1001" # ID of the device group to add under
$deviceName = "WS2012R2-SERVER01"
$deviceHost = "192.168.1.200"
$url = "https://$prtgServer/api/adddevice2.htm?name=$deviceName&host=$deviceHost&id=$parentId&username=$username&passhash=$passhash"
Invoke-RestMethod -Uri $url -Method Get
Step 4: Configure Core Uptime and Health Sensors
Add the essential sensors for Windows Server 2012 R2 uptime monitoring in the PRTG web interface by right-clicking the device and selecting Add Sensor:
Ping sensor: Verifies basic network reachability. Set timeout to 5 seconds and packet size to 32 bytes. WMI CPU Load: Monitors per-core and total CPU utilisation with configurable warning (80%) and error (95%) thresholds. WMI Memory: Monitors available physical memory and page file usage. WMI Disk IO: Monitors read/write bytes per second and average disk queue length. WMI Logical Disk Free Space: Monitors each drive volume’s free space percentage. Windows Services: Monitors named Windows services and alerts if any stop unexpectedly. Event Log Sensor: Monitors Windows event logs for error events matching defined criteria.
# Verify WMI connectivity from PRTG probe server before adding sensors
$cred = Get-Credential # Enter PRTG monitoring account credentials
Get-WmiObject -ComputerName "WS2012R2-SERVER01" -Credential $cred -Class Win32_OperatingSystem | Select-Object Caption, LastBootUpTime
Get-WmiObject -ComputerName "WS2012R2-SERVER01" -Credential $cred -Class Win32_Processor | Select-Object Name, LoadPercentage
Get-WmiObject -ComputerName "WS2012R2-SERVER01" -Credential $cred -Class Win32_LogicalDisk | Select-Object DeviceID, FreeSpace, Size
Step 5: Configure Alert Thresholds and Notifications
Set alert thresholds for each sensor. For the WMI CPU Load sensor, configure: Warning status at 80% for 5 minutes, Error status at 95% for 2 minutes. For disk free space: Warning at 20% free, Error at 10% free. For memory: Warning at 512 MB available, Error at 256 MB available.
Configure notification channels in PRTG (Setup → Notification Templates). Create an email notification template and a Teams or Slack webhook notification for critical alerts. Apply notifications to sensors or device groups using Notification Triggers.
Step 6: Create Custom Sensor with PowerShell
PRTG supports custom PowerShell-based sensors through the EXE/Script Advanced sensor type. Create a custom sensor script that checks specific application health:
# Custom PRTG sensor script - checks IIS application pool status
# Save as C:PRTGScriptsCheckIISAppPools.ps1
param($ComputerName = "localhost")
try {
Import-Module WebAdministration -ErrorAction Stop
$pools = Get-ChildItem IIS:AppPools
$stopped = $pools | Where-Object {$_.state -eq "Stopped"}
if ($stopped.Count -eq 0) {
Write-Output "0:All $($pools.Count) application pools running"
} else {
$stoppedNames = ($stopped | Select-Object -ExpandProperty Name) -join ", "
Write-Output "1:$($stopped.Count) app pools stopped: $stoppedNames"
}
} catch {
Write-Output "2:Error checking IIS app pools: $_"
}
In PRTG, add an EXE/Script Advanced sensor pointing to this script. PRTG interprets the output format “exitcode:message” where 0=OK, 1=Warning, 2=Error.
Step 7: Configure Uptime Reports and SLA Tracking
PRTG includes built-in reporting for uptime tracking and SLA compliance. Create a report in the PRTG web interface under Reports → Add Report. Select the device group and include the Uptime report type. Configure the report to run weekly and email to stakeholders.
For historical uptime data, query the PRTG API:
# Get uptime percentage for last 30 days via PRTG API
$sensorId = "12345" # Replace with actual sensor ID
$url = "https://prtg.yourdomain.com/api/historicdata.csv?id=$sensorId&avg=0&sdate=2026-04-17-00-00-00&edate=2026-05-17-00-00-00&username=prtgadmin&passhash=YOUR_PASSHASH"
$data = Invoke-RestMethod -Uri $url
Summary
PRTG provides comprehensive uptime and performance monitoring for Windows Server 2012 R2 with minimal configuration effort through its auto-discovery and WMI sensor libraries. By deploying appropriate sensors for CPU, memory, disk, network, and key Windows services, configuring alert thresholds aligned with your SLA targets, and setting up notification channels for immediate alerting, PRTG transforms reactive incident response into proactive monitoring that identifies degradation before it impacts users. Regular review of PRTG reports and trend data enables capacity planning based on factual performance history.