[ZBX-24672] Replace the sync collector for Agent2 windows perfmon plugin with async goroutine Created: 2024 Jun 18  Updated: 2025 Feb 06  Resolved: 2025 Jan 22

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 6.0.31, 6.4.16, 7.2.0alpha1
Fix Version/s: 6.0.38rc1, 7.0.9rc1, 7.2.3rc1, 7.4.0alpha1

Type: Problem report Priority: Trivial
Reporter: Michael Veksler Assignee: Aleksejs Sestakovs
Resolution: Fixed Votes: 2
Labels: None
Remaining Estimate: 0h
Time Spent: 32h
Original Estimate: 24h
Environment:

windows


Attachments: File zabbix_agent2-x64-v64-dev2.7z     File zabbix_agent2-x64-v64-dev3.7z     File zabbix_agent2-x64-v70-dev2.7z    
Issue Links:
Duplicate
is duplicated by ZBX-25130 Zabbix agent2 crashing on Windows ser... Closed
is duplicated by ZBX-25769 Windows Agent2 7.0.6 crashes after "l... Closed
Sub-task
part of ZBX-21703 Zabbix Agent2 is no longer retrieving... Reopened
Team: Team B
Sprint: S24-W26/27, S24-W34/35, S24-W38/39, S24-W40/41, S24-W42/43, S24-W44/45, S24-W46/47, S24-W48/49, S25-W2/3
Story Points: 3

 Description   

Due to large windows environments, sync collector does not have enough time to obtain all required perf counters. As the result we will get error like in ZBX-21703.

Proposal:
Replace the synk collector with an asynk goroutine. Goroutine should be started during plugin startup.



 Comments   
Comment by Michael Veksler [ 2024 Aug 13 ]

Hi AlexeyK , mma,

Be so kind to test the dev build [^zabbix_agent2-x64-v70.7z] or [^zabbix_agent2-x64-v64.7z]
What was done:

  • collection of perfCounters does not block data export to zabbix server ( ... 750 perf_counters with 60s interval... )
  • new plugin "Stats" was introduced as union of "cpu" and "perfmon" plugins ("cpu" and "perfmon" plugins where moved to "Stats"). This should help with "The system cannot find message text for message number 0x%1 in the message file for %2"
Comment by Mickael Martin [ 2024 Aug 19 ]

Hi !

I can try it, but I cannot reproduce the bug : I got it every week but never on the same host.

Comment by Mickael Martin [ 2024 Aug 21 ]

Test in progress!

Comment by Michael Veksler [ 2024 Sep 20 ]

Hi AlexeyK , mma,

Be so kind to test the dev build zabbix_agent2-x64-v70-dev2.7z or zabbix_agent2-x64-v64-dev2.7z
What was done:
 There was redundant lock for protection against "perf_instance_en.discovery".
I implemented RWlock for "perf_instance_en.discovery" and Rlock for other pdh calls. This is means that "sometimes" perf_instance_en.discovery can fail with "first network error" because long gathering of all perCounters values can block executions of perf_instance_en.discovery

Comment by Aleksejs Sestakovs [ 2025 Jan 16 ]

Available in versions:

Generated at Tue Apr 15 08:57:11 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.