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

Escalations for autoregistration and discovery are not immediately deleted

    Details

    • Team:
      Team A
    • Sprint:
      Sprint 43, Sprint 44, Sprint 46, Nov 2018
    • Story Points:
      2

      Description

      On clean database perform auto registration and then do:
      select * from escalations;

      Examine nextcheck and see that escalation will be kept for one hour and that it's status is active.

      +--------------+----------+-----------+---------+-----------+------------+----------+--------+--------+---------------+
      | escalationid | actionid | triggerid | eventid | r_eventid | nextcheck  | esc_step | status | itemid | acknowledgeid |
      +--------------+----------+-----------+---------+-----------+------------+----------+--------+--------+---------------+
      |            6 |        8 |      NULL |      11 |      NULL | 1537346473 |        1 |      0 |   NULL |          NULL |
      +--------------+----------+-----------+---------+-----------+------------+----------+--------+--------+---------------+
      

      Following parts of code will never be executed on Zabbix server

      	if (0 == action->esc_period)
      	{
      		result = DBselect(
      				"select o.operationid,o.operationtype,o.esc_period,o.evaltype,"
      					"m.operationid,m.default_msg,m.subject,m.message,m.mediatypeid"
      				" from operations o"
      					" left join opmessage m"
      						" on m.operationid=o.operationid"
      				" where o.actionid=" ZBX_FS_UI64
      					" and o.operationtype in (%d,%d)"
      					" and o.recovery=%d",
      				action->actionid,
      				OPERATION_TYPE_MESSAGE, OPERATION_TYPE_COMMAND, ZBX_OPERATION_MODE_NORMAL);
      	}
              ...
      	if (0 == action->esc_period)
      	{
      		escalation->status = (ZBX_ACTION_RECOVERY_OPERATIONS == action->recovery ? ESCALATION_STATUS_SLEEP :
      				ESCALATION_STATUS_COMPLETED);
      	}
              ....
      

      Expected:
      It is immediately marked as completed and deleted because it has no recovery operations an no steps

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vso Vladislavs Sokurenko
                Reporter:
                vso Vladislavs Sokurenko
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: