NetXMS Support Forum

English Support => General Support => Topic started by: testos on October 17, 2011, 03:23:11 PM

Title: Last DCI value in event mesagge
Post by: testos on October 17, 2011, 03:23:11 PM
Hi!

I need to put the last DCI value in event message. How can I do it?

Best regards.
Title: Re: Last DCI value in event mesagge
Post by: Victor Kirhenshtein on October 17, 2011, 05:10:21 PM
You can write a simple NXSL script which will return DCI value and use it in message template via %[] macro. For example, you can create script called "LastValue" with the following code:


return GetDCIValue($node, $event->parameters[5]);


and then use macro %[LastValue] in message template to insert last value of associated DCI in threshold violation events.

Best regards,
Victor
Title: Re: Last DCI value in event mesagge
Post by: testos on October 17, 2011, 05:35:48 PM
Thank you!
Great support!  :o

Regards,
Title: Re: Last DCI value in event mesagge
Post by: testos on October 18, 2011, 03:18:59 PM

Hi Victor, could you complete this event-specific parameters table?

Quote$event->parameters[1] -> DCI Data parameter
$event->parameters[2] -> DCI description
$event->parameters[3] -> ??
$event->parameters[4] -> ??
$event->parameters[5] -> DCI ID
$event->parameters[6] -> ??
$event->parameters[7] -> ??

Thanks in advance.
Title: Re: Last DCI value in event mesagge
Post by: Victor Kirhenshtein on October 18, 2011, 03:58:40 PM
Hi!

For threshold violation events, it is:

   1) Parameter name
   2) Item description
   3) Threshold value
   4) Actual value
   5) Data collection item ID
   6) Instance

For threshold rearm event:

   1) Parameter name
   2) Item description
   3) Data collection item ID
   4) Instance
   5) Threshold value
   6) Actual value

For standard events, you can find list of event-specific parameters in event description (accessible via event configuration view).

Best regards,
Victor
Title: Re: Last DCI value in event mesagge
Post by: testos on October 19, 2011, 09:42:50 AM
Thank you, Victor!