[ZBX-8799] Zabbix 2.2.6 installed from packages cannot monitor database through ODBC monitoring on CentOS Created: 2014 Sep 22  Updated: 2017 May 30  Resolved: 2014 Sep 22

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G), Installation (I), Server (S)
Affects Version/s: 2.2.6
Fix Version/s: None

Type: Incident report Priority: Critical
Reporter: Bean Young Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: agent, database, server
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 6.4 x86_64
MySQL 5.6.14
unixODBC 2.2.14


Attachments: HTML File Install Zabbix 2.2.6 From Package.html     Text File zabbix_agentd.log     Text File zabbix_server.log    
Issue Links:
Duplicate
duplicates ZBX-7665 Zabbix 2.2.1 ODBC monitor crash - in ... Closed

 Description   

I installed Zabbix 2.2.6 LTS and unixODBC through yum, but after I've created an ODBC monitoring item to monitor MySQL database according to this tutorial:
https://www.zabbix.com/documentation/2.2/manual/config/items/itemtypes/odbc_checks

I found that the ODBC monitoring item cannot collect any data from database, the log files of zabbix server and agent seem to be all right and no error happend. But strangely, if I installed Zabbix 2.2.6 LTS from sources instead of installing from packages, the ODBC monitoring item works fine!

I've added my install steps and log files of zabbix server/agent in attachments, as explained below:
1. Install Zabbix 2.2.6 From Package.html: my install steps (from packages)
2. zabbix_server.log: log file of zabbix server
3. zabbix_agentd.log: log file of zabbix agent



 Comments   
Comment by Aleksandrs Saveljevs [ 2014 Sep 22 ]

In the attached server log it can be seen that the poller which tried to do the ODBC check hanged in odbc_DBselect():

  ...
  4671:20140922:110650.768 In get_values()
  4671:20140922:110650.768 In DCconfig_get_poller_items() poller_type:0
  4671:20140922:110650.768 End of DCconfig_get_poller_items():1
  4671:20140922:110650.768 In substitute_key_macros() data:'db.odbc.select[mysql-simple-check,test]'
  4671:20140922:110650.768 End of substitute_key_macros():SUCCEED data:'db.odbc.select[mysql-simple-check,test]'
  4671:20140922:110650.768 In substitute_simple_macros() data:'select count(*) from hosts'
  4671:20140922:110650.768 In substitute_simple_macros() data:'zabbix'
  4671:20140922:110650.768 In substitute_simple_macros() data:'zabbix'
  4671:20140922:110650.768 In get_value() key:'db.odbc.select[mysql-simple-check,test]'
  4671:20140922:110650.768 In get_value_db() key_orig:'db.odbc.select[mysql-simple-check,test]'
  4671:20140922:110650.768 In odbc_DBconnect() db_dsn:'test' user:'zabbix'
  4671:20140922:110650.839 End of odbc_DBconnect():SUCCEED
  4671:20140922:110650.840 In odbc_DBselect() query:'select count(*) from hosts'
  4671:20140922:111107.689 Got signal [signal:15(SIGTERM),sender_pid:4876,sender_uid:0,reason:0]. Exiting ...

This is a known problem with MyODBC and libmysqlclient, and has already been reported upstream. See ZBX-7665 for more information.

Generated at Fri Apr 26 14:04:44 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.