Ad Widget

Collapse

ORACLE MSSQL MYSQL Databases Monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alain Ganuchaud
    Member
    Zabbix Certified Trainer

    • Mar 2009
    • 49

    #1

    ORACLE MSSQL MYSQL Databases Monitoring

    I release an ORACLE MSSQL MYSQL Databases Monitoring integrated in Zabbix 1.8.x (2010 August). I thank you for any feedback, request or modification.

    ORACLE
    zabora.php & template (compatible versions Oracle 8, 9, 10 et 11)
    Based mainly on zabora.sh from Den Crane with the following new checks:
    - Segments with less than alarm level free extents
    - Non Autoextensible tablespaces above alarm level used% space
    - Autoextensible datafile with less alarm level free increments
    - Rewrite rcachehit according to METALINK Note 33883.1
    - Library Cache Hit Ratio
    - Search for ORA- strings in alert.log file
    Prerequisites: php-cli, php-oci8 et ZabbixAPI.class.php for alertlogpath check

    MYSQL
    zabmy.php & template (compatible version Mysql 5, thank you for feedbacks on other versions)
    Prerequisites: php-cli, php-mysql

    MSSQL
    zabsql.php & templates (compatible versions SQL 2000 et 2005, thank you for feedbacks on other versions)
    Prerequisites: php-cli, php-sybase or php-mssql (depending on distributions) and freetds

    Download Here the full solution zabbix-db-4.0.tar.gz (171 KB)

    Further versions will be maintained Here

    Have Fun!
    Alain / [email protected]
  • zabbix_zen
    Senior Member
    • Jul 2009
    • 426

    #2
    Looks great !

    Merci Alain.

    Comment

    • dpbaker57
      Member
      • Aug 2010
      • 33

      #3
      XML Errors

      When I try to do the import of the Oracle template I get:

      XML file contains errors. Fatal Error 68: xmlParseEntityRef: no name [ Line: 54 | Column: 88 ]

      Ubuntu 10.04.2 LTS
      Zabbix 1.8.4

      Comment

      • Alain Ganuchaud
        Member
        Zabbix Certified Trainer

        • Mar 2009
        • 49

        #4
        Hi,

        yes I confirm this problem, please replace all chains:
        )&(
        with
        )&(

        Thanks for the feedback.
        Alain

        Comment

        • Colttt
          Senior Member
          Zabbix Certified Specialist
          • Mar 2009
          • 878

          #5
          will be support for MSSQL 2008 coming soon?
          Debian-User

          Sorry for my bad english

          Comment

          • Alain Ganuchaud
            Member
            Zabbix Certified Trainer

            • Mar 2009
            • 49

            #6
            Hi,

            I am surprised, I was told it was tested successfully with MSSQL 2008 ???
            Please, send me your errors report.

            Thanks Alain

            Comment

            • sa22
              Member
              • Apr 2009
              • 30

              #7
              Hi Alain!
              Thanks for useful template.


              It seams freetds & zabsql.php works fine:

              Code:
              # php /etc/zabbix/externalscripts/zabsql.php dummy instance_name server04
              MSSQLSERVER
              
              # php /etc/zabbix/externalscripts/zabsql.php dummy version server04
              9.00.3353.00
              
              # php /etc/zabbix/externalscripts/zabsql.php dummy cpu_percent server04
              8368.5
              Zabbix obtains some data from mssql server, but with error for last 3 rows:





              Also zabbix-server log contains such errors:

              Code:
               27742:20110929:142449.677 Item [server04_sql:perf_counter[\SQLServer:Databases(_Total)\Transactions/s]] error: Not supported by Zabbix Agent
               27741:20110929:142455.379 Item [server04_sql:perf_counter[\SQLServer:Locks(_Total)\Attentes de verrous/s]] error: Not supported by Zabbix Agent
               27741:20110929:142456.784 Item [server04_sql:perf_counter[\SQLServer:Locks(_Total)\Nombre d'interblocages/s]] error: Not supported by Zabbix Agent
               27742:20110929:142459.102 Item [server04_sql:perf_counter[\SQLServer:General Statistics\Connexions utilisateur]] error: Not supported by Zabbix Agent
               27738:20110929:142459.526 Item [server04_sql:perf_counter[\SQLServer:Memory Manager\Demandes de mцLmoire en attente]] error: Not supported by Zabbix Agent
               27738:20110929:142459.691 Item [server04_sql:perf_counter[\SQLServer:Memory Manager\MцLmoire totale du serveur (Ko)]] error: Not supported by Zabbix Agent
               27742:20110929:142501.472 Item [server04_sql:perf_counter[\SQLServer:SQL Statistics\Nombre de requцLtes de lots/seconde]] error: Not supported by Zabbix Agent
               27740:20110929:142502.454 Item [server04_sql:perf_counter[\SQLServer:Databases(tempdb)\Taille des fichiers de donnцLes (Ko)]] error: Not supported by Zabbix Agent
               27742:20110929:142512.186 Item [server04_sql:zabsql.php[databases_list {$TNSNAME}]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27741:20110929:142512.189 Item [server04_sql:system.run[typeperf -qx|find "\MSSQL"]] error: Not supported by Zabbix Agent
               27738:20110929:142513.210 Item [server04_sql:zabsql.php[databases_size {$TNSNAME} 95]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27740:20110929:142516.641 Item [server04_sql:zabsql.php[database_size {$TNSNAME} DATABASE-NAME]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27741:20110929:142517.366 Item [server04_sql:system.run[typeperf -qx|find "\MSSQL${$INSTANCENAME}:"]] error: Not supported by Zabbix Agent
               27741:20110929:142518.487 Item [server04_sql:system.run[typeperf -qx|find "\SQLServer:"]] error: Not supported by Zabbix Agent
               27742:20110929:142518.554 Item [server04_sql:zabsql.php[disk_read {$TNSNAME}]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27738:20110929:142521.015 Item [server04_sql:zabsql.php[logs_size {$TNSNAME} 95]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27738:20110929:142523.093 Item [server04_sql:zabsql.php[ping {$TNSNAME}]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27740:20110929:142523.940 Item [server04_sql:zabsql.php[version {$TNSNAME}]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27742:20110929:142524.999 Item [server04_sql:zabsql.php[disk_write {$TNSNAME}]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27742:20110929:142525.117 Item [server04_sql:zabsql.php[instance_name {$TNSNAME}]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27741:20110929:142526.732 Item [server04_sql:zabsql.php[cpu_percent {$TNSNAME}]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.
               27742:20110929:142527.326 Item [server04_sql:zabsql.php[io_percent {$TNSNAME}]] error: Script /etc/zabbix/externalscripts/zabsql.php returned nothing.

              Host configuration:



              What can be wrong here?
              Last edited by sa22; 29-09-2011, 11:42.

              Comment

              • sa22
                Member
                • Apr 2009
                • 30

                #8
                I've found the problem with zabsql.php. It should be executable:
                chmod +x /etc/zabbix/externalscripts/zabsql.php

                Comment

                • Alain Ganuchaud
                  Member
                  Zabbix Certified Trainer

                  • Mar 2009
                  • 49

                  #9
                  Hi,

                  you have two kinds of errors:
                  - some perf counters are not valid, those errors are normal because the template contains French counters and English counters, if your server is english based, all french counters will become Unsupported. This was designed to support both langages.
                  - the other errors come from external script, when executed by zabbix, the macros {$INSTANCENAME} & {$TNSNAME} seem not to be translated ??? This is related to Zabbix ... not the DB Monitoring. This conclusion is confirmed by the fact that when you launch the script from CI, this OK.

                  Could you upgrade to 1.8.7 (not 1.8.6, some problems with macros are registred)?

                  Is somebody in the forum aware about macros problems in version 1.8.3?

                  Thanks Alain

                  Comment

                  • sa22
                    Member
                    • Apr 2009
                    • 30

                    #10
                    After the zabsql.php became executable, records from log have gone.
                    At the moment zabbix receive such information from sql server:



                    it seams {$TNSNAME} not translated, but it works. However, last 3 rows not translated and doesn't work.

                    Another question, how it is possible to use this item:
                    zabsql.php[database_size {$TNSNAME} DATABASE-NAME]
                    Where DETABASE-NAME should be specified? In the host configuration or somewhere else?

                    Comment

                    • Alain Ganuchaud
                      Member
                      Zabbix Certified Trainer

                      • Mar 2009
                      • 49

                      #11
                      Hi,

                      about {$TNSNAME} not translated, apparently this is only an issue with the frontend but, as you mentionned, zabbix server translates correctly. Update in 1.8.7 and the frontend will be ok too.

                      About this item zabsql.php[database_size {$TNSNAME} DATABASE-NAME] DATABASE-NAME is just an example, you have to replace it by a true database name; you have another item that lists them.

                      Take care,
                      Alain

                      Comment

                      • nappino87
                        Junior Member
                        • Jun 2012
                        • 1

                        #12
                        error config

                        Hi,
                        my freetds config
                        [global]
                        text size = 64512
                        tds version = 8.0
                        [TDS]
                        host = 192.168.200.24
                        port = 58964

                        php zabsql.php dummy instance_name 192.168.200.24
                        This mssql server is not defined in /etc/freetds/freetds.conf

                        what possible cause the problem?

                        thanks

                        Comment

                        • Alain Ganuchaud
                          Member
                          Zabbix Certified Trainer

                          • Mar 2009
                          • 49

                          #13
                          Please, read the doc carrefully . I assume you've got V5, below is an extract from the doc:

                          MSSQL Monitoring is based on:
                          the script zabsql.php
                          the template CT-SUPER-MSSQL for zabsql.php, for perf counters for the default instance and for perf counters for the named instances


                          Prerequisites:
                          client mssql (freetds) on the Zabbix server or proxy
                          php-cli, php-sybase or php-mssql (depending on Linux distribution)
                          TNS-NAME is the entry in the file /etc/freetds/freetds.conf readable by the user zabbix


                          /etc/freetds/freetds.conf Example

                          [global]
                          text size = 64512
                          tds version = 8.0
                          [TNS-NAME]
                          host = server_IP_or_Name
                          port = 1433

                          If i refer to your example, please replace :
                          php zabsql.php dummy instance_name 192.168.200.24
                          by
                          php zabsql.php dummy TDS 192.168.200.24 (I assume the instance TDS is running on 200.24).

                          Alain

                          Comment

                          • Alain Ganuchaud
                            Member
                            Zabbix Certified Trainer

                            • Mar 2009
                            • 49

                            #14
                            I release the Databases Monitoring Version 6.0 for ORACLE MSSQL MYSQL DB2 & POSTGRESQL. This version is synchronized with Zabbix 2.0.x. I thank you for any feedback, request or modification.

                            Please Download this version Here

                            Have Fun!
                            Alain / [email protected]

                            Comment

                            • Alain Ganuchaud
                              Member
                              Zabbix Certified Trainer

                              • Mar 2009
                              • 49

                              #15
                              Databases Monitoring Version 7.0

                              I release the Databases Monitoring Version 7.0 for ORACLE MSSQL MYSQL DB2 & POSTGRESQL. This new version 7.0 mainly brings Auto-Discovery of Databases Instances and support of Zabbix 2.2 version (2.0 is also supported but not 1.8).

                              I thank you for any feedback, request or modification. Version 8.0 will support Sybase engines.

                              Please Download this version Here or on my web site: www.coreit.fr

                              Have Fun!
                              Alain / [email protected]

                              Comment

                              Working...