[ZBX-20013] Windows performance counters not working after autoregistration Created: 2021 Sep 23  Updated: 2021 Dec 27  Resolved: 2021 Oct 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent2 plugin (G)
Affects Version/s: 5.4.4
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Nathan Slusher Assignee: Aigars Kadikis
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix server 5.4.4
Zabbix proxy 5.4.4
Zabbix agent 2 5.4.4 (Windows x64)


Attachments: PNG File image-2021-09-23-08-12-40-150.png    
Issue Links:
Causes
Duplicate
duplicates ZBX-20356 Collecting perf_counter problem on Wi... Closed

 Description   

Steps to reproduce:

  1. Install and start agent 2 on a Windows server with line `HostMetadataItem=system.uname` in the agent configuration file.
  2. Create an autoregistration rule with the following:
    Condition: Host metadata contains Windows
    Operation: Link to templates: Windows by Zabbix agent active

Result:
The host will register with the server but all items using performance counters will not collect data. In the agent logs the following message shows up multiple times:

2021/09/23 07:05:23.360574 plugin 'WindowsPerfMon' collector failed: The handle is not a valid PDH object.

Expected:
I was able to get the items to start collecting data by restarting the agents on the hosts. I think the expected behavior should be that the items begin collecting data without requiring a restart of the agent on the monitored machines.



 Comments   
Comment by Aigars Kadikis [ 2021 Sep 27 ]

Thank you for contacting us.

I cannot reproduce the issue on Zabbix instance 5.4.4 with Windows Version 10.0.19042.1237 while using Zabbix agent 2 (x64) 5.4.4. All 13 'perf_counter_en' items work on the first boot up.

Try to open 'PerfMon.msc' console open on Windows system and try simulating auto registration again. If you have any Antivirus/hardening software, try to unload them.

Let us know the outcome.

Comment by Nathan Slusher [ 2021 Sep 27 ]

Hello Aigars.

I removed an existing host and added a new host to the system and I could not reproduce the issue - all performance related items were working.

When I reported this issue it was a brand new server installation and the only host being monitored was the server itself. After I set up the auto registration rule I had four Windows hosts created and all four had problems with the performance counter items.

You can close this issue - I will reopen it if it happens again and I can reproduce it.

Thanks

Comment by Aigars Kadikis [ 2021 Oct 04 ]

Hi Nathan,

Thank you for details. Closing with your permission.

Generated at Wed Jul 16 09:43:02 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.