locked
Event 4001 Get-PerfCounter: Unable to retrieve localized name RRS feed

  • Question

  • Hi, everyone! Just found new error after installing latest Windows Server and MS SQL 2012 cumulative updates - on some servers Operations Manager Health Service starts to drop errors with Event ID 4001:

    Management Group: NPO. Script: ModuleAction Module: DBDiskLatencyDataSource.ps1 Version: 7.0.2.0 : 
    Computer Name = 'DB1-AVI.npo.lan' WMI = 'ComputerManagement11' Service Name = 'MSSQL$SCOM' SQL Instance Name = 'SCOM' Connection String = 'DB1-AVI\SCOM' Tcp Port = '49081'
    Error occurred during DB Disk Latency data source executing.
    Computer:DB1-AVI.npo.lan 
    Reason: Get-PerfCounter : Unable to retrieve localized name. (Index : 236  Name : LogicalDisk) 
    Position:348 
    Offset:26 
    Instance:SCOM
    
    Detailed error output: Get-PerfCounter : Unable to retrieve localized name. (Index : 236  Name : LogicalDisk)
    
    
    Management Group: NPO. Script: Main Module: CPUUsagePercentDataSource.ps1 Version: 7.0.2.0 : 
    Error occurred during CPU Usage for SQL Instances data source executing.
    Computer:DB1-AVI 
    Reason: Get-PerfCounter : Unable to retrieve localized name. (Index : 230  Name : Process) 
    Position:440 
    Offset:26
    Detailed error output: Get-PerfCounter : Unable to retrieve localized name. (Index : 230  Name : Process)

    What did I try so far:

    1) Update MS SQL Management pack to latest version

    2) Restart agent service, restart server, flush state and cache of agent service

    3) Agent is running from SYSTEM account, so it`s not a local admin rights problem

    4) MS SQL monitoring runs from HealthService account and it has sysadmin role

    4) mofcomp sqlmgmproviderxpsp2up.mof - Done! MS SQL configuration manager connects just fine

    Any ideas?



    Monday, February 19, 2018 11:31 AM

Answers

All replies

  • That one is a bit tricky.

    Let's examine one of these scripts : http://systemcenter.wiki/?GetElement=Microsoft.SQLServer.2012.DBEngine.DiskLatency.DataSource&Type=DataSourceModuleType&ManagementPack=Microsoft.SQLServer.2012.Monitoring&Version=7.0.2.0

    You can see that it builds a hashtable of localized counter names on the local server, and try to read the ones with id 236\210 (LogicalDisk\Avg. Disk sec/Write) and 236\208 (LogicalDisk\Avg. Disk sec/Read).

    For some reason your servers do not have id 236 so the script fails.

    This is the case when I manually run the script on my personnal laptop as well, and I can confirm that the LogicalDisk counter doesn't exist in perfmon (nor it's localized name, since I'm not running an english OS).

    Have you checked that the counter exists in perfmon on your servers?

    • Marked as answer by EvgenGematogen Monday, February 19, 2018 2:42 PM
    Monday, February 19, 2018 2:22 PM
  • Yep, looks like you are right. It was Windows Server problem, not SCOM. Perfmon couldn't load a lot of counters, so I rebuild them manualy and now the problem is gone!

    How to manually rebuild Performance Counters:

    https://support.microsoft.com/en-us/help/2554336/how-to-manually-rebuild-performance-counters-for-windows-server-2008-6

    Monday, February 19, 2018 2:45 PM