Ad Widget

Collapse

Monitoring MariaDB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • djh82uk
    Junior Member
    • Feb 2015
    • 1

    #1

    Monitoring MariaDB

    Hi All,

    I really hope someone can help. I spent ages trying to get the Mysql template to work to monitor the Mysql database on the zabbix server. Eventually got that sorted by adding the userparameters into the agent config and editing the template (e.g. Mysql[ping] to Mysql.ping).

    Now I have another server that runs MariaDB, and I just cannot get the monitoring to work. If I copy the userparameters from the Zabbix Server to the DB server agent config and create the same DB user. I get the following in the web frontend

    Not Supported

    received value [] is not suitable for value type [Numeric (float)]

    On some of the entries float is changed to decimal but otherwise the message is the same. Only the Mysql.version works.

    I don't why it works for one server but not the other?

    Hope someone can help as im struggling to find much help from google. Either different userparameters or to use a different template. I tried the ZTC mysql template but gives the same error.

    Thanks
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome to Zabbix forums!

    It can be hard to troubleshoot if you have modified the template and defaults bu I'll give this a try.

    Make sure you have your MySQL template in place and your items have keys like in default template (mysql.status[Slow_queries], mysql.status[Uptime], mysql.ping etc.)

    Check zabbix_agentd.conf file on the machine with MariaDB you want to monitor. By default agent has a line like this:
    Code:
    Include=/etc/zabbix/zabbix_agentd.d/
    With this line it includes files from the given directory.

    In this directory by default you should have file /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf

    In this file you have line
    HOME=/etc/zabbix
    which should be set to the directory that has .my.cnf file with password information.

    Then in /etc/zabbix you create a file with name ".my.cnf" and with contents:
    Code:
    [mysql]
    user=zabbix
    password=zabbix
    [mysqladmin]
    user=zabbix
    password=zabbix
    Don't forget to replace username and password to the ones you actually have.

    And that should basically be it.

    Of course, it is possible that the problem is elsewhere but I'd say that you have some problems with connecting to the DB.

    Hope this helps!

    Best Regards,
    Ingus

    Comment

    • Sergey V
      Junior Member
      • Jul 2015
      • 10

      #3
      Include /etc/zabbix/zabbix_agent.d

      After including /etc/zabbix/zabbix_agent.d in the zabbix_agentd.conf zabbix agent doesn't start. Can anyone help?

      Comment

      • Colttt
        Senior Member
        Zabbix Certified Specialist
        • Mar 2009
        • 878

        #4
        can you please the output of the logfile?
        Debian-User

        Sorry for my bad english

        Comment

        • Sergey V
          Junior Member
          • Jul 2015
          • 10

          #5
          .my.cnf location

          There is no useful information in the agent log...
          I've noticed, this problem appears when i'm setting up "HOME" to /etc/zabbix and create .my.cnf in the /etc/zabbix directory...very strange...
          If HOME=/var/lib/zabbix and .my.cnf in the /var/lib/zabbix directory , then agent starts well... But mysql items still are "unsupported" and there is no information about mysql in zabbix system....

          Comment

          • huangyingja
            Junior Member
            • Apr 2015
            • 27

            #6
            Hi sir
            as per my experience, I check the userparameter_mysql.conf
            and my zabbix configuration is at /etc/zabbix
            after I change all from /var/lib/zabbix to /etc/zabbix
            everything ok !
            FYI ~

            Comment

            Working...