[ZBXNEXT-4799] Translate perflib-names from English to the servers local language Created: 2018 Oct 09  Updated: 2018 Oct 10  Resolved: 2018 Oct 10

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Agent (G)
Affects Version/s: None
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Patrik Mattsson Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Issue Links:
Duplicate
duplicates ZBXNEXT-1287 Multi-language Performance Counters Closed

 Description   

As it currently stands, if you have an environment with Windows-servers running with different default locales (languages), you need to create templates for all the different languages.

The idea of using the different perflib ID's fails as soon as you have features that might have different ID's between different versions of Windows, sometimes, for Hyper-V for example, I've seen the same version of Windows Server have different ID's  for the same Hyper-V check. Their names in English however has stayed the same for almost all versions of Windows.

Instead of hacking all the different servers Counter-key for "CurrentLanguage" or having one template per language, it would be FAR superior if the Agent could translate a check written for English to the servers CurrentLanguage.

I.e, "translate" the check from 

\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009\Counter

to 

\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\CurrentLanguage\Counter

And by doing so, work for those of us who works with Zabbix in Windows-environments would be so much simpler, and we could create far better templates for all Zabbix-users without having to care about the locale for the server!



 Comments   
Comment by Glebs Ivanovskis [ 2018 Oct 09 ]

Once upon a time I was wondering why Zabbix uses PdhAddCounter() function, while there is a more suitable PdhAddEnglishCounter(). Quoting documentation:

Note that the counter path specified in the PdhAddCounter function must be localized. The PdhAddEnglishCounter function provides a locale-neutral way to add performance counters to the query. This function is the recommended way to add locale-neutral counters to a query.

However, nowadays just replacing one function with another will likely break existing items. This is probably the reason why this hasn't been fixed. Why was PdhAddCounter() chosen in the first place? God knows...

P.S. Seems to be a duplicate of ZBXNEXT-1287.

Comment by Vitaly Zhuravlev [ 2018 Oct 10 ]

Thank you. Let's continue the discussion in ZBXNEXT-1287 then

Generated at Thu Mar 28 19:01:48 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.