Ad Widget

Collapse

Zabbix "Database monitor" item returning empty result, query not being run

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MRo
    Junior Member
    • Dec 2021
    • 12

    #1

    Zabbix "Database monitor" item returning empty result, query not being run

    After a few struggles I got odbc running with MySQL on the Zabbix server (Zabbix 5.0.23).
    isql connects fine & I can run a query from the command line, so I believe the configuration is all OK on that level:

    # isql -v ZTMySQL
    +---------------------------------------+
    | Connected! |
    | |
    | sql-statement |
    | help [tablename] |
    | quit |
    | |
    +---------------------------------------+
    SQL> select count(1) from thresholds;
    +---------------------+
    | count(1) |
    +---------------------+
    | 1 |
    +---------------------+
    SQLRowCount returns 1
    1 rows fetched
    SQL>​



    On Zabbix, I've set up an item of type "Database monitor" using the odbc connection as above, but it doesn't give any error in the GUI or in the zabbix server log file, and just returns an empty value. I don't think it even runs a query as when I deliberately put errors in the sql it doesn't give an error either.

    Zabbix-side config:
    Click image for larger version

Name:	image.png
Views:	721
Size:	12.5 KB
ID:	454462

    Result when I test it:
    Click image for larger version

Name:	image.png
Views:	673
Size:	13.3 KB
ID:	454463


    ​Would appreciate any recommendations, any other ways of testing the Zabbix access (for example I searched for some command-line equivalent of the test but haven't been able to find it).

    Thanks!
Working...