Ejemplo n.º 1
0
function addEvent($triggerids, $value)
{
    zbx_value2array($triggerids);
    $events = array();
    foreach ($triggerids as $tnum => $triggerid) {
        $events[] = array('source' => EVENT_SOURCE_TRIGGERS, 'object' => EVENT_OBJECT_TRIGGER, 'objectid' => $triggerid, 'clock' => time(), 'value' => $value, 'acknowledged' => 0);
    }
    $eventids = CEvent::create($events);
    return $eventids;
}