Ad Widget

Collapse

Monitoring MySQL Replication

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #16
    In attachment you can find my two templates which I'm using on monitoring mysql. First one "Service MySQL" is generally for monitoring mysql and second one "Service MySQL slave" which is dedicated to monitor slave.

    Both templates uses only active items and does not need any UserParameter definitions.
    Attached Files
    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

    • Dedamraz
      Junior Member
      • Jun 2016
      • 1

      #17
      Hm...

      I've read all this and I still have issues with monitoring MySQL replication and master-slave lag.
      I'm using Percona TokuDB as a storage engine, Debian8, and Zabbix 3.0. Zabbix, Zabbix DB and Storages are all on different virtual hosts. We have tried to monitor via FromDual, but we can't get fpmmm running.
      What would you recommend to use in order to get MySQL replication and master-slave lag monitoring on Zabbix?
      Kindly bear in mind that I'm a bit new to all this, so I would really appreciate sort of a "simpleton" written explanation.

      Thank you in advance for your time!

      Comment

      • mimugmail
        Junior Member
        • Nov 2016
        • 1

        #18
        Originally posted by kloczek
        In attachment you can find my two templates which I'm using on monitoring mysql. First one "Service MySQL" is generally for monitoring mysql and second one "Service MySQL slave" which is dedicated to monitor slave.

        Both templates uses only active items and does not need any UserParameter definitions.
        I've searched and tested many solutions for Replication monitoring but this one is the most pragmatically.

        Is it ok for you if I upload it as a Template since it's not easy to find

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #19
          Originally posted by mimugmail
          I've searched and tested many solutions for Replication monitoring but this one is the most pragmatically.

          Is it ok for you if I upload it as a Template since it's not easy to find
          This template still is in kind WIP state
          I have no time nw back to improve to MySQL monitoring but I have very long list thing which I want to implement.
          One example of possible improvement: instead two separated with common part of MySQL monitoring and second one for save implement slave monitoring as LLD to make this template universal.

          I'm planning to back to this template when MySQL 8.0.1 will be released.
          I'm waiting on this release as I'm not able to compile MySQL 5.7 and 8.0.x on Fedora rawhide
          https://bugs.mysql.com/bug.php?id=82515
          8.0.1 in VCS has been fixed readdir() issue but still is not officially released https://dev.mysql.com/doc/relnotes/m...ews-8-0-1.html
          Last edited by kloczek; 28-11-2016, 19:19.
          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

          • troffasky
            Senior Member
            • Jul 2008
            • 567

            #20
            Just in case anybody wanted one more way of monitoring MySQL slave status...

            $ cat /etc/zabbix/zabbix_agentd.d/userparameter_mysql_slave.conf
            # For all the following commands HOME should be set to the directory that has .my.cnf file with password information.
            # Flexible parameter to grab slave status. On the frontend side, use keys like mysql.slavestatus[Slave_IO_Running].
            # Key syntax is mysql.slavestatus[variable].
            UserParameter=mysql.slavestatus[*],echo "show slave status \G;" | HOME=/etc/zabbix mysql | grep '$1' | awk '{print $$2}' | sed -e 's/^NULL$/-1/'

            This is created in the same style as the stock MySQL monitoring but tweaked for the 'show slave status' command.

            Comment

            • sgaurav
              Junior Member
              • Feb 2022
              • 1

              #21
              Hello Everyone,

              Does someone create template for mysql slave monitoring. I followed the older ones but that is not working. Can someone please help?

              Comment

              Working...