ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-4638

Macros doesn't work for 'Database monitor' items

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.10, 2.0.2, 2.1.0
    • Fix Version/s: 2.0.4rc1, 2.1.0
    • Component/s: Proxy (P), Server (S)
    • Environment:
      zabbix-server-1.8.10, unixODBC-2.3.1, mysql-connector-odbc-3.51.30, FreeBSD 9.0 RELEASE amd64

      Description

      Item parameters for MySQL threads:
      DSN=

      {HOSTNAME}
      user=monitoring
      password=mypasss
      sql=select count from PROCESSLIST;

      Zabbix log:
      43244:20120210:132155.197 Failed to connect to DSN '{HOSTNAME}

      ' : Error: failed connection [[unixODBC][Driver Manager]Data source name not found, and no default driver specified] (0)

      However, Zabbix documentation (http://www.zabbix.com/documentation/1.8/manual/config/macros) says about support macro for Items.
      P.S. Zabbix documentation doen't contain any info about 'database monitor' item type. So bad.

        Activity

        Hide
        Oleksiy Zagorskyi added a comment -

        About "So bad" -> see ZBXNEXT-460

        Actually a field "Additional parameters" for ODBC items it's not an item key, it's additional field. This field stored in the database "items.params".
        So, it's closer to a feature request than to the bug.

        Related item types:ssh agent, telnet agent, calculated.

        Show
        Oleksiy Zagorskyi added a comment - About "So bad" -> see ZBXNEXT-460 Actually a field "Additional parameters" for ODBC items it's not an item key, it's additional field. This field stored in the database "items.params". So, it's closer to a feature request than to the bug. Related item types:ssh agent, telnet agent, calculated.
        Hide
        Pavel Timofeev added a comment -

        It's so sad.

        When I use database monitor I see:

        1. tail /tmp/zabbix_server.log
          Error in my_thread_global_end(): 1 threads didn't exit
          Error in my_thread_global_end(): 1 threads didn't exit
          Error in my_thread_global_end(): 1 threads didn't exit
          Error in my_thread_global_end(): 1 threads didn't exit
          Don't you know is it zabbix_server problem, mysql-connector-odbc or unixODBC?
        Show
        Pavel Timofeev added a comment - It's so sad. When I use database monitor I see: tail /tmp/zabbix_server.log Error in my_thread_global_end(): 1 threads didn't exit Error in my_thread_global_end(): 1 threads didn't exit Error in my_thread_global_end(): 1 threads didn't exit Error in my_thread_global_end(): 1 threads didn't exit Don't you know is it zabbix_server problem, mysql-connector-odbc or unixODBC?
        Hide
        Pavel Timofeev added a comment -

        Sorry my_thread_global_end() error has gone after upgrading mysql-connector-odbc to 5.1.9

        Show
        Pavel Timofeev added a comment - Sorry my_thread_global_end() error has gone after upgrading mysql-connector-odbc to 5.1.9
        Hide
        Pavel Timofeev added a comment -

        > Sorry my_thread_global_end() error has gone after upgrading mysql-connector-odbc to 5.1.9
        Nope, it's still here =(

        Show
        Pavel Timofeev added a comment - > Sorry my_thread_global_end() error has gone after upgrading mysql-connector-odbc to 5.1.9 Nope, it's still here =(
        Hide
        Pavel Timofeev added a comment -

        http://lab4.org/wiki/Zabbix_Database_Monitor_English
        'Requirements for the SQL queries' was very useful

        Show
        Pavel Timofeev added a comment - http://lab4.org/wiki/Zabbix_Database_Monitor_English 'Requirements for the SQL queries' was very useful
        Hide
        Alexander Vladishev added a comment -

        Available in the development branch svn://svn.zabbix.com/branches/dev/ZBX-4638

        Updated documentation:
        http://www.zabbix.com/documentation/2.0/manual/appendix/macros/supported_by_location

        Show
        Alexander Vladishev added a comment - Available in the development branch svn://svn.zabbix.com/branches/dev/ZBX-4638 Updated documentation: http://www.zabbix.com/documentation/2.0/manual/appendix/macros/supported_by_location
        Hide
        Andris Mednis added a comment - - edited

        (1) Testing with database monitor item using DSN=

        {HOSTNAME} causes crash, while DSN=localhost does not crash:
        27145:20121002:182214.650 In substitute_simple_macros() data:'DSN={HOSTNAME}

        user=zabbix20
        password=xxxx
        sql="select current_date;"'
        27145:20121002:182214.650 Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x10]. Crashing ...
        ...
        27145:20121002:182214.651 === Backtrace: ===
        27145:20121002:182214.653 12: ./sbin/zabbix_server(print_fatal_info+0x9e) [0x44395e]
        27145:20121002:182214.653 11: ./sbin/zabbix_server() [0x442d39]
        27145:20121002:182214.653 10: /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x7f2bb0a8b4f0]
        27145:20121002:182214.653 9: /lib/x86_64-linux-gnu/libc.so.6(+0x7fc21) [0x7f2bb0ad8c21]
        27145:20121002:182214.653 8: /lib/x86_64-linux-gnu/libc.so.6(__strdup+0x16) [0x7f2bb0ad8936]
        27145:20121002:182214.653 7: ./sbin/zabbix_server(zbx_strdup2+0x3f) [0x445e9f]
        27145:20121002:182214.653 6: ./sbin/zabbix_server(substitute_simple_macros+0x20d) [0x4598fd]
        27145:20121002:182214.653 5: ./sbin/zabbix_server() [0x41818e]
        27145:20121002:182214.653 4: ./sbin/zabbix_server(main_poller_loop+0x8f) [0x4197cf]

        <Sasha> RESOLVED in r30476.

        Show
        Andris Mednis added a comment - - edited (1) Testing with database monitor item using DSN= {HOSTNAME} causes crash, while DSN=localhost does not crash: 27145:20121002:182214.650 In substitute_simple_macros() data:'DSN={HOSTNAME} user=zabbix20 password=xxxx sql="select current_date;"' 27145:20121002:182214.650 Got signal [signal:11(SIGSEGV),reason:1,refaddr:0x10] . Crashing ... ... 27145:20121002:182214.651 === Backtrace: === 27145:20121002:182214.653 12: ./sbin/zabbix_server(print_fatal_info+0x9e) [0x44395e] 27145:20121002:182214.653 11: ./sbin/zabbix_server() [0x442d39] 27145:20121002:182214.653 10: /lib/x86_64-linux-gnu/libc.so.6(+0x324f0) [0x7f2bb0a8b4f0] 27145:20121002:182214.653 9: /lib/x86_64-linux-gnu/libc.so.6(+0x7fc21) [0x7f2bb0ad8c21] 27145:20121002:182214.653 8: /lib/x86_64-linux-gnu/libc.so.6(__strdup+0x16) [0x7f2bb0ad8936] 27145:20121002:182214.653 7: ./sbin/zabbix_server(zbx_strdup2+0x3f) [0x445e9f] 27145:20121002:182214.653 6: ./sbin/zabbix_server(substitute_simple_macros+0x20d) [0x4598fd] 27145:20121002:182214.653 5: ./sbin/zabbix_server() [0x41818e] 27145:20121002:182214.653 4: ./sbin/zabbix_server(main_poller_loop+0x8f) [0x4197cf] <Sasha> RESOLVED in r30476.
        Hide
        Andris Mednis added a comment -

        Successfully tested.

        Show
        Andris Mednis added a comment - Successfully tested.
        Hide
        Alexander Vladishev added a comment -

        Available in pre-2.0.4 r30656 and pre-2.1.0 (trunk) r30657.

        Show
        Alexander Vladishev added a comment - Available in pre-2.0.4 r30656 and pre-2.1.0 (trunk) r30657.

          People

          • Assignee:
            Unassigned
            Reporter:
            Pavel Timofeev
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: