NetXMS Support Forum

English Support => General Support => Topic started by: reez_q11 on May 11, 2016, 11:11:11 AM

Title: Container event processing
Post by: reez_q11 on May 11, 2016, 11:11:11 AM
hi,

i want to process an event whenever the container's status is changed, but don't to how to feed that status to an event.
how do i make it possible?

thx.
Title: Re: Container event processing
Post by: Victor Kirhenshtein on May 14, 2016, 12:34:43 PM
Hi,

currently no event is generated when container status changes. Feel free to fill feature request for that. As a workaround you can use script DCI on any node that will provide container status - then you can set thresholds to generate status change events for that container.

Best regards,
Victor
Title: Re: Container event processing
Post by: reez_q11 on August 10, 2016, 12:36:24 PM
hi Victor,

can u show example dci script the read the status of a container?

thx.
Title: Re: Container event processing
Post by: tomaskir on August 10, 2016, 01:10:32 PM

object = FindObject("Container name");

if (object == null || object->type != 5) {
  // object not found, or its not a container
  return null;
}

return object->status;


References:
https://wiki.netxms.org/wiki/NXSL_Function_Reference
https://wiki.netxms.org/wiki/NXSL:NetObj