Ad Widget

Collapse

W2K: Unable to add performance counter "\UnknownPerformanceCounter(_Total)\...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • helixblue
    Junior Member
    • Feb 2005
    • 6

    #1

    W2K: Unable to add performance counter "\UnknownPerformanceCounter(_Total)\...

    First I would like to thank the Zabbix crew for this fine product. We're in the midst of migrating our departmental monitoring (80 hosts) from Nagios to Zabbix 1.1a5. I just started rolling it out onto our Windows servers and hit a bit of a snag. While the Zabbix 1.1 agent worked great on our XP host, both the Zabbix 1.0 and 1.1a5 agents bomb out on our Windows 2000 backup server.

    This is what I get in the log file with DebugLevel=4:

    [16-Feb-2005 13:34:41] Log file opened
    [16-Feb-2005 13:35:24] Unable to add performance counter "\UnknownPerformanceCounter(_Total)\UnknownPerform anceCounter" to query: The specified object is not found on the system.
    I suspect that there may not be some service running on the machine that may be required for Zabbix to acquire it's performance information. Here are the normal 'microsoft' services that are currently running, am I missing any that may be required?

    Code:
       Background Intelligent Transfer Service
       COM+ Event System
       Disk Management Service
       Distributed Transaction Coordinator
       DNS Client
       Event Log
       Microsoft Console Manager
       Net Logon
       Network Connections
       Plug and Play
       Print Spooler
       Protected Storage
       Remote Procedure Call (RPC)
       Remote Procedure Call (RPC) Locator
       Remote Registry Service
       RunAs Service
       SavRoam
       Security Accounts Manager
       Server
       System Event Notification
       Task Scheduler
       TCP/IP NetBIOS Helper Service
       Windows Management Instrumentation
       Windows Management Instrumentation Driver Extensions
       Windows Time
       Workstation
    Let me know if there is anything I can do to help figure out the problem. Thanks!
  • helixblue
    Junior Member
    • Feb 2005
    • 6

    #2
    It seems to work great on another Windows 2000 machine that I have, so I'm pretty confused on what it may be. I tried to compare services on between the two hosts, and enabled the Telephony and Computer Browser just in case. Still the same error.

    I'm now thinking that it is not related to a particular service not running on the broken W2K box. Using the Performance Monitor in Control Panel works just fine. All obvious services are enabled. These are the only services that are running on the working server, but not the non-working one:

    Code:
    +   Distributed File System
    +   File Server for Macintosh
    +   Remote Access Connection Manager
    +   TCP/IP Print Server
    +   WMDM PMSP Service
    Nothing obvious. I wonder if it's some strange permissions thing? I'm pretty sure the Zabbix agent runs as SYSTEM, however.

    Comment

    • festivalman
      Junior Member
      • Mar 2005
      • 10

      #3
      Well, you're not alone. After over 100 successful windows agent setups with Zabbix, I hit my first snag which produces the error you mentioned above. I've tried setting both the performance service and zabbix to run as administrator, I've made sure all the files involved have the right permissions... The only thing I can think of that's different is that this particular server is Win2k3 Web edition. All the others are standard or enterprise for us. I'm stumped though.

      Comment

      • vkimball
        Junior Member
        • Feb 2005
        • 4

        #4
        I'm having the same problem on two Windows XP SP2 machines here. One works and the other one doesn't. Haven't been able to figure out why yet.

        Comment

        • rysar
          Junior Member
          • Apr 2005
          • 4

          #5
          I'm having a similar problem with 2 Windows 2003 servers, one standard, and one enterprise... the Enterprise server has Service Pack 1 for 2K3 installed, but the Standard Server doesn't.

          Has anyone gotten a fix for this?

          Comment

          • Lovespider
            Member
            • Sep 2004
            • 99

            #6
            Same for me. I opened a topic but no answers.
            I'm monitoring few server but the only one I got problem is Windows 2003.
            I played with the logon informations of the service, I checked the permissions but nope .
            I still cannot get performances from it.

            Comment

            • boylesa
              Junior Member
              • Dec 2004
              • 3

              #7
              Same problem on W2k (Small Business Server)

              Hi, unfortunately I ran into a dead-end with this one as well, very weird.

              I successfully installed 4 boxes that worked like a dream and then the 5th produced the Performance counter error. I spent ages trying to get to the bottom of it but in the end had to give up (& look at alternatives).

              While I was investigating this I found loads of similar posts, none of which ever seemed to get any hints as to the cause of the problem.

              Comment

              • timo
                Junior Member
                • Apr 2005
                • 19

                #8
                Hi everybody,

                please check how long your computer names are. I think I found the reason for the problem.

                It's enough to report the length of the name, not the name itself.

                Comment

                • Wolfgang
                  Senior Member
                  Zabbix Certified Trainer
                  Zabbix Certified Specialist
                  • Apr 2005
                  • 116

                  #9
                  Originally posted by timo
                  Hi everybody,

                  please check how long your computer names are. I think I found the reason for the problem.

                  It's enough to report the length of the name, not the name itself.
                  Any hint or direction beyond the computername, or do you think it is the length itself?

                  To all:

                  Does the eventlog say something about perfmon issues?
                  http://www.intellitrend.de
                  Specialised in monitoring large environments and Zabbix API programming.

                  Comment

                  • timo
                    Junior Member
                    • Apr 2005
                    • 19

                    #10
                    It's probably related to the computer name length, or the problem applies to platforms with Unicode charsets. I will investigate it tomorrow in-depth, as I have similar problems on a Windows 2003 Server.

                    The Win32 API function which returns the name of a performance counter expects a LPTSTR, which seems to be different size, depending on the platform type. I think LPTSTR is defined using a TCHAR, and the size of a TCHAR varies across platforms. However, the Win32 agent defines its MAX_COUNTER_LEN statically (which would be okay as the counter-name is a char), but also uses MAX_COUNTER_LEN for the call to the win32 api function which probably says "hey dude, your string is not long enough". I don't have the exact constant and function names in mind, but as I said above, I will check this tomorrow and send you a feedback and probably a bugfix.
                    Last edited by timo; 02-05-2005, 20:31.

                    Comment

                    • timo
                      Junior Member
                      • Apr 2005
                      • 19

                      #11
                      I've built a debug binary. Please run it from the console using

                      "zabbix_agent_win32.exe standalone"

                      Here's my debug build for the zabbix win32 agent:



                      You don't need to have a running zabbix server, and you can use the following config file (place in c:\zabbix_agentd.conf) for testing:

                      Code:
                      Server=127.0.0.1
                      DebugLevel=3
                      Timeout=30
                      If you are receiving the "Unable to add performance counter" message again, please post the whole output here.

                      Comment

                      • carls
                        Junior Member
                        • May 2005
                        • 3

                        #12
                        I am getting a similar error in my event log (application):

                        The timeout waiting for the performance data collection function "PerfProc" in the "M:\WINNT\system32\perfproc.dll" Library to finish has expired. There may be a problem with this extensible counter or the service it is collecting data from or the system may have been very busy when this call was attempted.

                        I install from the command line as in the documentation:
                        zabbixw32 --config c:\config.file install
                        zabbixw32 start

                        I get a successful install from the commandline, but zabbix shows "starting" under services, and I see lots of Perconf messages in the event viewer.

                        This server is running Windows 2000 server with service pack 3.

                        I have successfully installed zabbix on many similar servers. Only one of those servers so far has this problem. We have a mix of NT4.0, WIN2K and WIN2003 servers. The server with the zabbix error has a server name with 6 characters.

                        I checked in the registry and didn't see anything wrong - zabbix seems to add a key in "services".

                        I would like to try the debug version but I don't have visual studio 2005. The debug version (above) complains about a missing msvcr80d.dll. Is there any way to debug without vs 2005?

                        Comment

                        • timo
                          Junior Member
                          • Apr 2005
                          • 19

                          #13
                          You can find the DLL here:

                          Comment

                          • carls
                            Junior Member
                            • May 2005
                            • 3

                            #14
                            msvcr80d.dll

                            I copied msvcr80d.ddl to my system32 folder from the link above. However now I get a "The procedure entry point __report_gsfailure_gsfailure could not be located in the dynamic link library msvcr80d.dll"

                            Is this a dll version problem? Sorry I have no experience with windows debugging.

                            Thanks,

                            Carl

                            Comment

                            • timo
                              Junior Member
                              • Apr 2005
                              • 19

                              #15
                              yes, probably. I will create a static binary in a while.

                              Comment

                              Working...