251 $notification =
new static($id);
252 $notification->fill();
254 if($notification->getAuditTypeId() ==
'')
260 $interval = intval($notification->getCheckInterval());
262 $dateInterval->add(
"-T{$interval}M");
265 $result = $notification->data->save();
271 $filter = Query\Query::filter()
272 ->where(
"AUDIT_TYPE_ID", $notification->getAuditTypeId())
273 ->where(
"TIMESTAMP_X",
">", $dateInterval);
275 if($notification->getItemId() <>
'')
277 $filter->whereLike(
"ITEM_ID",
'%'.$notification->getItemId().
'%');
279 if($notification->getUserId() > 0)
281 $filter->where(
"USER_ID", $notification->getUserId());
283 if($notification->getRemoteAddr() <>
'')
285 $filter->whereLike(
"REMOTE_ADDR",
'%'.$notification->getRemoteAddr().
'%');
287 if($notification->getUserAgent() <>
'')
289 $filter->whereLike(
"USER_AGENT",
'%'.$notification->getUserAgent().
'%');
291 if($notification->getRequestUri() <>
'')
293 $filter->whereLike(
"REQUEST_URI",
'%'.$notification->getRequestUri().
'%');
301 if(
$eventCount[
"CNT"] >= $notification->getAlertCount())
305 $notification->send();
308 return static::getAgentName($id);