NetXMS Support Forum

English Support => General Support => Topic started by: Marcin on May 21, 2015, 02:17:51 PM

Title: Change of default event attributes
Post by: Marcin on May 21, 2015, 02:17:51 PM
Hello,

Is it possible to change default event attributes in the filtering script?
Based on the SNMP varbind I would like to modify severity of the event and then create correct alarm.

I tried:
$event->severity = 1;
but I get an error while compiling processing policy rule: "Unknown object's attribute"

I tried also: SetEventParameter($event, severity, 1);
but without success.

Best regards,
Marcin

Title: Re: Change of default event attributes
Post by: Victor Kirhenshtein on May 21, 2015, 10:37:53 PM
Hi,

currently it is not possible. I've just added new methods to NXSL class "Event": setMessage, setSeverity, setUserTag. They will be included in release 2.0-M5. Then you'll be able to use script like this:


$event->setSeverity(2);  // change severity to minor


Best regards,
Victor