Ad Widget

Collapse

MySQL Trigger does not work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fidel Valero
    Junior Member
    • Dec 2017
    • 7

    #1

    MySQL Trigger does not work

    Hello;

    I followed the step to monitor mysql instance in this url: http://yallalabs.com/linux/how-to-mo...zabbix-server/

    Everything works well, but when I stop the service the trigger does not alert me that mysql is down.

    Does somebody here have a doc or something to fix this?

    Thanks in advance
  • kaspars.mednis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2017
    • 349

    #2
    Hi,

    Have you added the MySQL Server template to the host in Zabbix ?
    If you use the built-in MySQL template, there is trigger function

    Code:
    {Template DB MySQL:mysql.ping.last(0)}=0
    Is the item MySQL status with key mysql.ping working correctly and returning data ?
    You can check the values in Monitoring -> latest data.

    Regards,
    Kaspars

    Comment

    • Fidel Valero
      Junior Member
      • Dec 2017
      • 7

      #3
      Yes, I did

      Of course I've added the template to the host, and I'm able to see all the data correctly about the mysql. But as I said, when I stop the mysql service manually in the host, in zabbix the service shows as mysql is down, but the trigger does not alert me.
      Even does not report it as a problem

      Comment

      • fulltilt
        Member
        • Nov 2006
        • 39

        #4
        Originally posted by Fidel Valero
        Of course I've added the template to the host, and I'm able to see all the data correctly about the mysql. But as I said, when I stop the mysql service manually in the host, in zabbix the service shows as mysql is down, but the trigger does not alert me.
        Even does not report it as a problem

        same here, missing alerts for zabbix panel and email when mysql are stopped
        any solution?

        Comment

        • fulltilt
          Member
          • Nov 2006
          • 39

          #5
          solved ;-)

          nano /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf
          change UserParameter=mysql.ping to:
          HTML Code:
          UserParameter=mysql.ping,HOME=/etc/zabbix mysqladmin ping 2>/dev/null | grep -c alive

          Comment

          Working...