Ad Widget

Collapse

Monitoring MS SQL Databases

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bturnbough
    Member
    • Mar 2011
    • 70

    #1

    Monitoring MS SQL Databases

    Can someone please provide a step by step how-to on monitoring MS SQL databases? Primarilly, I'm interested in being able to perform SQL queries via zabbix and being able to report on the values returned.
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    type this in cmd:

    typeperf -qx > output.txt

    and now search for SQL-Server.. all hits can you monitor..
    Debian-User

    Sorry for my bad english

    Comment

    • Rudd
      Member
      • Mar 2011
      • 69

      #3
      Not a step by step, but perhaps a helpful pointer.

      Look at the MySQL user parameters in the Unix zabbix_agentd.conf.

      You should be able to do something similar for MS SQL using osql, for example:

      UserParameter=mssql.servertime,osql -E -S .\Server -Q "print + getdate()"

      Comment

      • bturnbough
        Member
        • Mar 2011
        • 70

        #4
        Rudd -- Exactly what I was looking for. I didn't even think of OSQL. Thanks a lot. I thought I had read something about zabbix having some sort of ODBC connector. Is this used for something different?

        Comment

        • Rudd
          Member
          • Mar 2011
          • 69

          #5
          I think you are referring to the Item Type Database Monitor. Apparently that is not supported yet: http://www.zabbix.com/forum/showthread.php?t=21339

          One note on the UserParameter. If you are planning to monitor a lot of items this method turns our rather expensive as each check has to fork osql, login etc.

          In that case it may be worth looking into zabbix_sender. This will allow you to use an external script/program that can more efficiently gather all data and pipeline it all back in one go to Zabbix.

          Pros and cons in everything

          Comment

          • Alex_SYB
            Senior Member
            • Feb 2012
            • 133

            #6
            Old thread but still relevant I think

            Is there any way to create discovery rules for MS SQL DB's ?

            Alex

            Comment

            • Heilig
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Mar 2013
              • 366

              #7
              LLD for MS SQL Server (just in case)

              Comment

              • jairoalves
                Junior Member
                • Jan 2015
                • 15

                #8
                I'm trying to configure an item to run a select query on a SQL Server and I can't seem to get past this error:

                Data source name not found, and no default driver specified


                .

                Tried editing the odbc.ini file but it didn't work. Tried testing using isql, but it alwayes return "Could not SQLConnect".

                Comment

                • Heilig
                  Senior Member
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Mar 2013
                  • 366

                  #9
                  If you cannot get a value from a command line, Zabbix will not be able to connect also.
                  Try to double check your unixODBC configuration (https://support.zabbix.com/browse/ZB...#comment-86065).
                  Is it possible that credentials are not correct? Have you checked this?

                  Comment

                  • jairoalves
                    Junior Member
                    • Jan 2015
                    • 15

                    #10
                    Thanks for the help. Unfortunately, the credentials are correct. I think it requires a MS SQL specific driver to be installed and that one may or maynot be free.

                    Comment

                    • Heilig
                      Senior Member
                      Zabbix Certified Trainer
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Mar 2013
                      • 366

                      #11
                      It is not necessary to install any drivers on MS SQL Server side. I believe unixODBC configuration is not correct. Have you used the following steps to configure it (https://support.zabbix.com/browse/ZB...#comment-86065)?

                      Comment

                      Working...