Last DCI value in event mesagge

Started by testos, October 17, 2011, 03:23:11 PM

Previous topic - Next topic

testos

Hi!

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

Best regards.

Victor Kirhenshtein

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

testos


testos


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.

Victor Kirhenshtein

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

testos