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

Records in the task table are not deleted.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • None
    • None
    • 4.0.7

      It is thought to occur by the following procedure.

      1. Massive number of problem events occur.
      2. Massive manual close.
      3. Delete the trigger of problem event that occurred.
      4. Event deleted after trigger data storage period.

      At this time, if "manual close" is not finished, the record that does not disappear remains in the task table.

       

      I reproduced it below.

      1. create problem event
      2. Stop Zabbix server
      3. manual close
        MariaDB [zabbix]> select * from task;
        +--------+------+--------+------------+-----+--------------+
        | taskid | type | status | clock      | ttl | proxy_hostid |
        +--------+------+--------+------------+-----+--------------+
        |      5 |    1 |      1 | 1615298733 |   0 |         NULL |
        |      6 |    4 |      1 | 1615298733 |   0 |         NULL |
        +--------+------+--------+------------+-----+--------------+
        2 rows in set (0.00 sec)
        
        MariaDB [zabbix]> SELECT
            ->     *
            -> FROM
            ->     task t
            -> JOIN
            ->     task_close_problem tcp
            -> ON  tcp.taskid = t.taskid
            -> WHERE
            ->     t.type = 1
            -> AND t.status = 1
            -> ;
        +--------+------+--------+------------+-----+--------------+--------+---------------+
        | taskid | type | status | clock      | ttl | proxy_hostid | taskid | acknowledgeid |
        +--------+------+--------+------------+-----+--------------+--------+---------------+
        |      5 |    1 |      1 | 1615298733 |   0 |         NULL |      5 |             3 |
        +--------+------+--------+------------+-----+--------------+--------+---------------+
        1 row in set (0.00 sec)
        
        MariaDB [zabbix]> select * from problem where eventid=20;
        +---------+--------+--------+----------+------------+-----------+-----------+---------+------+---------------+--------+------------------------------------------------------------+--------------+----------+
        | eventid | source | object | objectid | clock      | ns        | r_eventid | r_clock | r_ns | correlationid | userid | name                                                       | acknowledged | severity |
        +---------+--------+--------+----------+------------+-----------+-----------+---------+------+---------------+--------+------------------------------------------------------------+--------------+----------+
        |      20 |      0 |      0 |    13491 | 1615042800 | 640032169 |      NULL |       0 |    0 |          NULL |   NULL | Zabbix agent on Zabbix server is unreachable for 5 minutes |            0 |        3 |
        +---------+--------+--------+----------+------------+-----------+-----------+---------+------+---------------+--------+------------------------------------------------------------+--------------+----------+
        1 row in set (0.00 sec)
        
      1. Delete problem table and events table.(Delete instead of housekeeper.)
        MariaDB [zabbix]> delete from problem where eventid=20;
        Query OK, 1 row affected (0.01 sec)
        
        MariaDB [zabbix]> delete from events where eventid=20;
        Query OK, 1 row affected (0.03 sec)
        
        MariaDB [zabbix]> select * from acknowledges where acknowledgeid=3;
        Empty set (0.00 sec)
        
      1. Stafrt Zabbix server

       

      After that, the record remains in the task table.
      The records in the acknowledges table have been deleted.

      MariaDB [zabbix]> SELECT
          ->     *
          -> FROM
          ->     task t
          -> JOIN
          ->     task_close_problem tcp
          -> ON  tcp.taskid = t.taskid
          -> WHERE
          ->     t.type = 1
          -> AND t.status = 1
          -> AND NOT EXISTS (
          ->     SELECT
          ->         *
          ->     FROM
          ->         acknowledges an
          ->     WHERE
          ->         an.acknowledgeid = tcp.acknowledgeid
          ->     )
          -> ;
      +--------+------+--------+------------+-----+--------------+--------+---------------+
      | taskid | type | status | clock      | ttl | proxy_hostid | taskid | acknowledgeid |
      +--------+------+--------+------------+-----+--------------+--------+---------------+
      |      5 |    1 |      1 | 1615298733 |   0 |         NULL |      5 |             3 |
      +--------+------+--------+------------+-----+--------------+--------+---------------+
      1 row in set (0.01 sec)
      

       

            zabbix.support Zabbix Support Team
            kazuo.ito Kazuo Ito
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: