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

Timer doesn't recalculate triggers with time functions only in recovery expression

    XMLWordPrintable

Details

    • Team A
    • Sprint 1, Sprint 2
    • 2

    Description

      The DCconfig_get_time_based_triggers() function, which is used by timer to get triggers to process, ignores trigger recovery expressions. This means that trigger with time based functions only in recovery expression will not be periodically recalculated by timer:

      int	DCconfig_get_time_based_triggers(DC_TRIGGER *trigger_info, zbx_vector_ptr_t *trigger_order, int max_triggers,
      		zbx_uint64_t start_triggerid, int process_num)
      {
      	int			i, start;
      	ZBX_DC_TRIGGER		*dc_trigger;
      	DC_TRIGGER		*trigger;
      
      	LOCK_CACHE;
      
      	start = zbx_vector_ptr_nearestindex(&config->time_triggers[process_num - 1], &start_triggerid,
      			ZBX_DEFAULT_UINT64_PTR_COMPARE_FUNC);
      
      	for (i = start; i < config->time_triggers[process_num - 1].values_num; i++)
      	{
      		dc_trigger = (ZBX_DC_TRIGGER *)config->time_triggers[process_num - 1].values[i];
      
      		if (TRIGGER_STATUS_ENABLED == dc_trigger->status && 0 == dc_trigger->locked &&
      				SUCCEED == DCconfig_find_active_time_function(dc_trigger->expression))
      		{
      			dc_trigger->locked = 1;
      
      			trigger = &trigger_info[trigger_order->values_num];
      
      			DCget_trigger(trigger, dc_trigger, ZBX_EXPAND_MACROS);
      			zbx_timespec(&trigger->timespec);
      
      			zbx_vector_ptr_append(trigger_order, trigger);
      
      			if (trigger_order->values_num == max_triggers)
      				break;
      		}
      	}
      
      	UNLOCK_CACHE;
      
      	return trigger_order->values_num;
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              wiper Andris Zeila
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: