Ad Widget

Collapse

monitoring mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spice
    Junior Member
    • Feb 2018
    • 4

    #1

    monitoring mysql

    Hello

    We're running zabbix 4.0.0alpha2 and have problem with mysql monitoring.

    I've set the appropriate HOME configuration in /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf and enable the DB MySQL template for the host.

    When I go to latest data and check the mysql application it's all greyed out and has no data accept the mysql version which is in regular black and have the appropriate info.

    Any ideas?
  • spice
    Junior Member
    • Feb 2018
    • 4

    #2
    some more info. Going to host -> Items search for mysql under application I see the errors on all the different items. To make a long story short, they sum up to this type of errors:
    "1" of type "string" is not suitable for value type "Numeric (unsigned)"
    or
    cannot convert value to numeric type

    Comment

    • spice
      Junior Member
      • Feb 2018
      • 4

      #3
      all well that ends well. The string issue was caused because of that we put the password in the command line, because it gave us error on the HOME/.my.cnf file that was 600 but owned by root and not zabbix. All is well now.

      Comment

      • spice
        Junior Member
        • Feb 2018
        • 4

        #4
        Solved

        ok, sorry, there's still an issue, but I think I solved it, if anyone interested...

        We stopped mysql to check if we get a notice and we dont. In the host -> items we see the following string error as before: "Value "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)" of type "string" is not suitable for value type "Numeric (unsigned)""

        Seems there's a problem reading the string and not the numeric output.

        So you need to change the line in /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf from:
        UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping | grep -c alive
        to
        UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin -s ping | grep -c alive

        This will silent the string output and will only give out exit code.

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          If you are looking for working mysql monitoring you can use my template.
          Zabbix templates. Contribute to kloczek/zabbix-templates development by creating an account on GitHub.

          In template, description is documentation about what needs to b done to start to use this template.
          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
          https://kloczek.wordpress.com/
          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
          My zabbix templates https://github.com/kloczek/zabbix-templates

          Comment

          Working...