Telegraf Error Guide: '[inputs.win_perf_counters] object was not found' — Fix Windows Counters
Fix Telegraf's [inputs.win_perf_counters] 'The specified object was not found on the computer' error: correct counter/object names, rebuild counters with lodctr /R, and verify with Get-Counter.
- #telegraf
- #metrics
- #troubleshooting
- #errors
Fixing errors like this? Get 500 free DevOps AI prompts
500 copy-paste AI prompts for the stack you actually run — one PDF, free.
Overview
The win_perf_counters input reads Windows Performance Counters through the PDH (Performance Data Helper) API. When a configured object or counter name does not exist on the machine, PDH returns an error that Telegraf surfaces per counter set:
2026-07-12T12:00:00Z E! [inputs.win_perf_counters] Error in plugin: error while getting value for counter \Processor Information(*)\% Processor Time: The specified object was not found on the computer.
A related form names a whole object that is not installed at all — common when a role or feature that registers the counters is absent:
E! [inputs.win_perf_counters] Error in plugin: error while getting value for counter \MSSQL$INSTANCE:Buffer Manager\Page life expectancy: The specified object was not found on the computer.
Telegraf keeps collecting other counter sets, but the misnamed or missing object produces no win_* metrics.
Symptoms
- A specific
win_*measurement is missing while other Windows counters (CPU, memory) report normally. - The Telegraf log or Windows Event Log repeats
The specified object was not found on the computer. - The counter works in PerfMon under a slightly different name, or only in a localized (non-English) label.
- The object belongs to a role/feature (IIS, SQL Server, .NET) that is not installed on this host.
- The error appeared after a Windows update or an application (re)install that corrupted the counter registry.
Common Root Causes
- Wrong object or counter name — a typo, or
ProcessorvsProcessor Information,LogicalDiskvsPhysicalDisk. - Localized counter names — on non-English Windows the display names differ; PDH resolves by locale and the English string does not match.
- Missing role/feature — IIS, SQL Server, ASP.NET, or Hyper-V counters do not exist until that component is installed.
- Instance name wrong —
MSSQL$INSTANCEmust match the actual named instance; a default instance usesSQLServer:instead. - Corrupted performance counter registry — updates or a bad uninstall leave the counter index broken (
lodctrneeded). IncludeTotal/instance expectations — asking for a_Totalinstance on an object that does not expose one.- 32-bit vs 64-bit counter mismatch — a WOW64 process registered counters the 64-bit collector cannot see.
Diagnostic Workflow
Confirm the exact object and counter names as Windows actually exposes them, using PowerShell’s Get-Counter. This is the source of truth PDH uses:
# List every counter set (object) name on this machine
Get-Counter -ListSet * | Select-Object -ExpandProperty CounterSetName | Sort-Object
# Show the full counter paths for one object
(Get-Counter -ListSet "Processor Information").Paths
# Prove a specific counter returns a value
Get-Counter -Counter "\Processor Information(_Total)\% Processor Time"
If Get-Counter cannot find the object either, the counters are genuinely missing or the registry is corrupt. Rebuild the counter index from the system store and re-sync the WMI adapter:
# Run from an elevated prompt
lodctr /R
winmgmt /resyncperf
If Get-Counter succeeds but Telegraf fails, the config name is wrong. Match the config’s ObjectName/Counters to the Get-Counter output exactly:
[[inputs.win_perf_counters]]
[[inputs.win_perf_counters.object]]
ObjectName = "Processor Information"
Instances = ["*"]
Counters = ["% Processor Time", "% Idle Time"]
Measurement = "win_cpu"
IncludeTotal = true
[[inputs.win_perf_counters.object]]
ObjectName = "LogicalDisk"
Instances = ["*"]
Counters = ["% Free Space", "Free Megabytes"]
Measurement = "win_disk"
For a SQL Server named instance, the object prefix must include the instance; a default instance drops the $INSTANCE suffix:
[[inputs.win_perf_counters.object]]
ObjectName = "MSSQL$PROD:Buffer Manager"
Instances = ["------"]
Counters = ["Page life expectancy", "Buffer cache hit ratio"]
Measurement = "win_mssql"
Then run only this input to confirm the fix. On Windows, invoke the collector directly:
& "C:\Program Files\Telegraf\telegraf.exe" --config "C:\Program Files\Telegraf\telegraf.conf" --test --input-filter win_perf_counters --debug
Example Root Cause Analysis
A fleet of Windows app servers reported The specified object was not found on the computer for \ASP.NET Applications(*)\Requests/Sec. The same config worked on the web tier. Running Get-Counter -ListSet * on a failing host showed no ASP.NET Applications counter set at all — these servers ran the app as a Windows service, not under IIS, so the ASP.NET performance counters had never been registered.
Rather than force-install IIS just for counters, the team split the config: the ASP.NET object stayed only on hosts where Get-Counter -ListSet "ASP.NET Applications" succeeded, applied by role in configuration management. On one genuinely broken host where Get-Counter also failed for standard objects, lodctr /R followed by winmgmt /resyncperf and a Telegraf restart rebuilt the index and restored collection. The lesson: Get-Counter is the arbiter — if PowerShell cannot see the object, Telegraf never will, so verify counter existence per role before shipping the config.
Prevention Best Practices
- Validate every
ObjectName/Counterspair withGet-Counter -ListSetbefore deploying a config to a new server role. - Scope role-specific objects (IIS, SQL, .NET) to only the hosts that have that role, driven by configuration management.
- Prefer English-locale counter names and set the collector locale consistently, or use numeric counter paths on localized systems.
- After counter corruption, rebuild with
lodctr /Randwinmgmt /resyncperfrather than reinstalling applications. - Match named-instance prefixes exactly (
MSSQL$INSTANCE:vsSQLServer:) and confirm the instance exists. - Monitor for the “object was not found” string in the Event Log so a post-update counter break is caught quickly.
Quick Command Reference
# List all counter objects and inspect one set's paths
Get-Counter -ListSet * | Select-Object CounterSetName | Sort-Object CounterSetName
(Get-Counter -ListSet "Processor Information").Paths
# Prove a specific counter returns data
Get-Counter -Counter "\Processor Information(_Total)\% Processor Time"
# Rebuild corrupted counters (elevated)
lodctr /R
winmgmt /resyncperf
# Run only the win_perf_counters input with debug
& "C:\Program Files\Telegraf\telegraf.exe" --config "C:\Program Files\Telegraf\telegraf.conf" --test --input-filter win_perf_counters --debug
Related Guides
- Telegraf Error: invalid configuration
- Telegraf Error: unknown input plugin
- Telegraf Error: input took longer to collect
More fixes in the Telegraf guides.
Conclusion
[inputs.win_perf_counters] ... The specified object was not found on the computer means PDH cannot resolve the configured object or counter — because the name is wrong or localized, the role that registers it is not installed, or the counter registry is corrupt. Use Get-Counter -ListSet as the source of truth: match your ObjectName/Counters to what PowerShell reports, scope role-specific objects to the right hosts, and rebuild broken counters with lodctr /R. When Get-Counter succeeds and Telegraf still fails, the config name is the mismatch to fix.
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.