Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12248

mysql.ping does not detect when mysql is down

    XMLWordPrintable

    Details

    • Type: Problem report
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 3.2.6
    • Fix Version/s: None
    • Component/s: Agent (G)
    • Labels:
      None
    • Environment:
      CentOS 7.3

      Description

      the mysql.ping item from the template MySQL App does not do the job when MySQL is down.

      The reason invoked is: Can't connect to MySQL server on '127.0.0.1' (111)'Check that mysqld is running on 127.0.0.1 and that the port is 3306.You can check this by doing 'telnet 127.0.0.1 3306

      I try to monitor my MySQL instance through a TCP connection, not by socket, because it's running in a docker container.

      How to solve this :
      In the /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf, provided by the RPM package, the check command should the "-s" argument.

      Original input:
      UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping | grep -c alive
      Fixed input
      UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin -s ping | grep -c alive

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              notuscloud@gmail.com Thomas MICHEL
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: