Ad Widget

Collapse

Perfcounter values from M$ SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • erisan500
    Senior Member
    Zabbix Certified Specialist
    • Aug 2005
    • 285

    #1

    Perfcounter values from M$ SQL

    Hi all,

    is anyone monitoring an M$ SQL server?

    I tried to use the following but without succes:
    PerfCounter= SQLServer[Connections], "\SQLServer:General Statistics()\User Connections",5

    I'm not sure about the () because when you add the counter in perfmon, the right column is empty and perfmon itself shows under instance ---

    Any thoughts ?

    Thanks in advance
    EriSan
    Zabbix Certified Specialist
  • ab1
    Junior Member
    • Aug 2005
    • 2

    #2
    Hello erisan500,
    My experience with Zabbix is limited, but this is what I've found out on how to monitor any item that you can monitor using Windows Performance Monitor. To set this up, and get everything in the correct location, open your zabbix_agentd.conf file and at the bottom add a line similar to this:
    PerfCounter= PrivilegedTime,"\Processor(_Total)\% Privileged Time",5

    Open Performance monitor and add the counters you want to monitor (this is only done so you can see which items go where in the conf file). When viewing performance monitor the line in your conf file breaks down like this:
    PerfCounter=ItemKeyUsedOnZabbixServer,"\Object(Ins tance)\Counter",HowOftenToCheckInSeconds

    After you've done this, go to your zabbix server and add an item with the key name of whatever you typed in for the "ItemKeyUsedOnZabbixServer".

    I hope this helps,
    --AB

    Comment

    • erisan500
      Senior Member
      Zabbix Certified Specialist
      • Aug 2005
      • 285

      #3
      Thanks for the reply, but i'm monitoring succesfully various performance counters. The problem was that when under instance there is "---".

      Anyway, for those who have the same problem, you need to use () in case instance is "---"

      Thanks EriSan
      EriSan
      Zabbix Certified Specialist

      Comment

      • ab1
        Junior Member
        • Aug 2005
        • 2

        #4
        Sorry for the non-answer erisan500, you are correct, for an instance of --- just enter it as blank (). One more thing to note, if you are running SQL Server 2000 sp3a (maybe previous service packs as well) and you have performance counters running using zabbix (or other applications as well, including the windows performance monitor) and you restart sqlserver, you will lose your counters, meaning they completely dissappear. This is a known bug, the workaround is to stop all SQL Server performance monitors before restarting the SQL services. The fix is SQL Server 2000 SP4.

        Thanks,
        --AB

        Comment

        • navtek007
          Senior Member
          • May 2005
          • 100

          #5
          What about when the instance is just blank eg no "---". For example what would you put if you wanted to monitor the following performance counter:

          "\Memory\Page Faults/sec"

          I have tried adding () but that doesn't work. I only get a value of 0 whatever method i try.

          Any ideas?

          Thanks.

          Comment

          • erisan500
            Senior Member
            Zabbix Certified Specialist
            • Aug 2005
            • 285

            #6
            I's using such a counter with success:

            perf_counter[\Memory\Committed Bytes]

            so in your case that would be: perf_counter[\Memory\Page Faults/sec]

            Greetings EriSan
            EriSan
            Zabbix Certified Specialist

            Comment

            • navtek007
              Senior Member
              • May 2005
              • 100

              #7
              are you adding this to the config file on teh server or adding a new item in zabbix?

              thanks.

              Comment

              • elkor
                Senior Member
                • Jul 2005
                • 299

                #8
                that particular syntax would be a new item for the host in zabbix

                Comment

                • navtek007
                  Senior Member
                  • May 2005
                  • 100

                  #9
                  thats strange because either way i still get a value of 0. Am i doing something wrong? When i do try and add it via the zabbix interface it reformats the key to read the following:

                  perf_counter[\\Memory\\Page Faults/sec]

                  this doesn't seem right.

                  Comment

                  • elkor
                    Senior Member
                    • Jul 2005
                    • 299

                    #10
                    It's not, and that is probably your problem.

                    there is a bug somewhere around here where somebody brought the double backslash issue to Alexei's attention.

                    Comment

                    • navtek007
                      Senior Member
                      • May 2005
                      • 100

                      #11
                      do you know if there is a way around it? or do u have to modify the key manually in mysql?

                      Comment

                      • bytesize
                        Member
                        • Aug 2005
                        • 71

                        #12
                        Hi,

                        Edit your php.ini and change make sure the values below are set to Off:

                        magic_quotes_gpc = Off
                        magic_quotes_runtime = Off

                        Restart apache, then edit the items so your perf_counter only has one backslash. Click "Update" and hey presto, it should work!

                        If not, try deleting the item and re-adding it again. If it works, the item will only show one backslash in the host items listing.

                        Regards,

                        John
                        Last edited by bytesize; 06-10-2005, 12:36.

                        Comment

                        • chocho63
                          Member
                          • Jun 2005
                          • 53

                          #13
                          perf_counter

                          The problem of '//' is resolved on the forum. You have to add the following lines to php.ini :

                          magic_quotes_gpc = Off
                          magic_quotes_runtime = Off

                          But the counter still returns a value of 0 with Zabbix_Agent (perf_counter), although the value is good from zabbix_agentd.conf (with perfcounter = ).

                          Comment

                          Working...