Class DataCollectionObject

java.lang.Object
org.netxms.client.datacollection.DataCollectionObject
Direct Known Subclasses:
DataCollectionItem, DataCollectionTable

public abstract class DataCollectionObject extends Object
Abstract data collection object
  • Field Details

    • DCO_TYPE_GENERIC

      public static final int DCO_TYPE_GENERIC
      See Also:
    • DCO_TYPE_ITEM

      public static final int DCO_TYPE_ITEM
      See Also:
    • DCO_TYPE_TABLE

      public static final int DCO_TYPE_TABLE
      See Also:
    • DCF_AGGREGATE_ON_CLUSTER

      public static final int DCF_AGGREGATE_ON_CLUSTER
      See Also:
    • DCF_TRANSFORM_AGGREGATED

      public static final int DCF_TRANSFORM_AGGREGATED
      See Also:
    • DCF_CACHE_MODE_MASK

      public static final int DCF_CACHE_MODE_MASK
      See Also:
    • DCF_AGGREGATE_WITH_ERRORS

      public static final int DCF_AGGREGATE_WITH_ERRORS
      See Also:
    • DCF_HIDE_ON_LAST_VALUES_PAGE

      public static final int DCF_HIDE_ON_LAST_VALUES_PAGE
      See Also:
    • IDM_NONE

      public static final int IDM_NONE
      See Also:
    • IDM_AGENT_LIST

      public static final int IDM_AGENT_LIST
      See Also:
    • IDM_AGENT_TABLE

      public static final int IDM_AGENT_TABLE
      See Also:
    • IDM_SNMP_WALK_VALUES

      public static final int IDM_SNMP_WALK_VALUES
      See Also:
    • IDM_SNMP_WALK_OIDS

      public static final int IDM_SNMP_WALK_OIDS
      See Also:
    • IDM_SCRIPT

      public static final int IDM_SCRIPT
      See Also:
    • IDM_WINPERF

      public static final int IDM_WINPERF
      See Also:
    • IDM_WEB_SERVICE

      public static final int IDM_WEB_SERVICE
      See Also:
    • IDM_INTERNAL_TABLE

      public static final int IDM_INTERNAL_TABLE
      See Also:
    • IDM_SMCLP_TARGETS

      public static final int IDM_SMCLP_TARGETS
      See Also:
    • IDM_SMCLP_PROPERTIES

      public static final int IDM_SMCLP_PROPERTIES
      See Also:
    • IDM_PUSH

      public static final int IDM_PUSH
      See Also:
    • POLLING_SCHEDULE_DEFAULT

      public static final int POLLING_SCHEDULE_DEFAULT
      See Also:
    • POLLING_SCHEDULE_CUSTOM

      public static final int POLLING_SCHEDULE_CUSTOM
      See Also:
    • POLLING_SCHEDULE_ADVANCED

      public static final int POLLING_SCHEDULE_ADVANCED
      See Also:
    • RETENTION_DEFAULT

      public static final int RETENTION_DEFAULT
      See Also:
    • RETENTION_CUSTOM

      public static final int RETENTION_CUSTOM
      See Also:
    • RETENTION_NONE

      public static final int RETENTION_NONE
      See Also:
    • owner

      protected DataCollectionConfiguration owner
    • id

      protected long id
    • nodeId

      protected long nodeId
    • templateId

      protected long templateId
    • templateItemId

      protected long templateItemId
    • resourceId

      protected long resourceId
    • sourceNode

      protected long sourceNode
    • pollingScheduleType

      protected int pollingScheduleType
    • pollingInterval

      protected String pollingInterval
    • retentionType

      protected int retentionType
    • retentionTime

      protected String retentionTime
    • origin

      protected DataOrigin origin
    • status

      protected DataCollectionObjectStatus status
    • flags

      protected int flags
    • stateFlags

      protected int stateFlags
    • transformationScript

      protected String transformationScript
    • name

      protected String name
    • description

      protected String description
    • systemTag

      protected String systemTag
    • userTag

      protected String userTag
    • perfTabSettings

      protected String perfTabSettings
    • snmpPort

      protected int snmpPort
    • snmpVersion

      protected SnmpVersion snmpVersion
    • schedules

      protected ArrayList<String> schedules
    • userData

      protected Object userData
    • comments

      protected String comments
    • instanceName

      protected String instanceName
    • instanceDiscoveryMethod

      protected int instanceDiscoveryMethod
    • instanceDiscoveryData

      protected String instanceDiscoveryData
    • instanceDiscoveryFilter

      protected String instanceDiscoveryFilter
    • accessList

      protected List<Integer> accessList
    • instanceRetentionTime

      protected int instanceRetentionTime
    • thresholdDisableEndTime

      protected long thresholdDisableEndTime
    • relatedObject

      protected long relatedObject
  • Constructor Details

    • DataCollectionObject

      protected DataCollectionObject(DataCollectionConfiguration owner, NXCPMessage msg)
      Create data collection object from NXCP message
      Parameters:
      owner - Owning configuration object
      msg - NXCP message
    • DataCollectionObject

      protected DataCollectionObject(DataCollectionConfiguration owner, long nodeId, long id)
      Constructor for new data collection objects.
      Parameters:
      owner - Owning configuration object
      nodeId - Owning node ID
      id - Identifier assigned to new item
    • DataCollectionObject

      protected DataCollectionObject(DataCollectionConfiguration owner, long id)
      Constructor for new data collection objects.
      Parameters:
      owner - Owning configuration object
      id - Identifier assigned to new item
    • DataCollectionObject

      protected DataCollectionObject(long nodeId, long id)
      Constructor for new data collection objects.
      Parameters:
      nodeId - Owning node ID
      id - Identifier assigned to new item
    • DataCollectionObject

      protected DataCollectionObject()
      Default constructor (intended for deserialization)
    • DataCollectionObject

      public DataCollectionObject(DataCollectionConfiguration owner, DataCollectionObject src)
      Object copy constructor
      Parameters:
      owner - object owner
      src - object to copy
  • Method Details

    • fillMessage

      public void fillMessage(NXCPMessage msg)
      Fill NXCP message with item's data.
      Parameters:
      msg - NXCP message
    • getTemplateId

      public long getTemplateId()
      Returns:
      the templateId
    • setTemplateId

      public void setTemplateId(long templateId)
      Parameters:
      templateId - the templateId to set
    • getResourceId

      public long getResourceId()
      Returns:
      the resourceId
    • setResourceId

      public void setResourceId(long resourceId)
      Parameters:
      resourceId - the resourceId to set
    • getSourceNode

      public long getSourceNode()
      Get source node (node where actual data collection took place) ID
      Returns:
      source node ID (0 if not set)
    • setSourceNode

      public void setSourceNode(long sourceNode)
      Set source node (node where actual data collection took place) ID. Set to 0 to use DCI's owning node.
      Parameters:
      sourceNode - source node ID
    • getPollingInterval

      public String getPollingInterval()
      Returns:
      the pollingInterval
    • getComparablePollingInterval

      public int getComparablePollingInterval()
      Returns:
      polling interval suitable for sorting
    • setPollingInterval

      public void setPollingInterval(String pollingInterval)
      Parameters:
      pollingInterval - the pollingInterval to set
    • getPollingScheduleType

      public int getPollingScheduleType()
      Returns:
      the pollingScheduleType
    • setPollingScheduleType

      public void setPollingScheduleType(int pollingScheduleType)
      Parameters:
      pollingScheduleType - the pollingScheduleType to set
    • getRetentionTime

      public String getRetentionTime()
      Returns:
      the retentionTime
    • getComparableRetentionTime

      public int getComparableRetentionTime()
      Returns:
      The retention time
    • setRetentionTime

      public void setRetentionTime(String retentionTime)
      Parameters:
      retentionTime - the retentionTime to set
    • getRetentionType

      public int getRetentionType()
      Returns:
      the retentionType
    • setRetentionType

      public void setRetentionType(int retentionType)
      Parameters:
      retentionType - the retentionType to set
    • getOrigin

      public DataOrigin getOrigin()
      Returns:
      the origin
    • setOrigin

      public void setOrigin(DataOrigin origin)
      Parameters:
      origin - the origin to set
    • getStatus

      public DataCollectionObjectStatus getStatus()
      Returns:
      the status
    • setStatus

      public void setStatus(DataCollectionObjectStatus status)
      Parameters:
      status - the status to set
    • isUseAdvancedSchedule

      public boolean isUseAdvancedSchedule()
      Returns:
      the useAdvancedSchedule
    • getName

      public String getName()
      Returns:
      the name
    • setName

      public void setName(String name)
      Parameters:
      name - the name to set
    • getDescription

      public String getDescription()
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Parameters:
      description - the description to set
    • getId

      public long getId()
      Returns:
      the id
    • getSchedules

      public ArrayList<String> getSchedules()
      Returns:
      the schedules
    • setSchedules

      public void setSchedules(Collection<String> newSchedules)
      Set schedules
      Parameters:
      newSchedules - Collection containing new schedules
    • getOwner

      public DataCollectionConfiguration getOwner()
      Get owning data collection configuration.
      Returns:
      the owner
    • getNodeId

      public long getNodeId()
      Get ID of owning node.
      Returns:
      id of owning node
    • getSystemTag

      public String getSystemTag()
      Get system tag. In most situations, system tag should not be shown to user.
      Returns:
      System tag associated with this DCI
    • setSystemTag

      public void setSystemTag(String systemTag)
      Set system tag. In most situations, user should not have possibility to set system tag manually.
      Parameters:
      systemTag - New system tag for DCI
    • getUserTag

      public String getUserTag()
      Get user-assigned tag.
      Returns:
      User-assigned tag of this DCI
    • setUserTag

      public void setUserTag(String userTag)
      Set user-assigned tag.
      Parameters:
      userTag - New user-assigned tag for DCI
    • getPerfTabSettings

      public String getPerfTabSettings()
      Returns:
      the perfTabSettings
    • setPerfTabSettings

      public void setPerfTabSettings(String perfTabSettings)
      Parameters:
      perfTabSettings - the perfTabSettings to set
    • getSnmpPort

      public int getSnmpPort()
      Returns:
      the snmpPort
    • setSnmpPort

      public void setSnmpPort(int snmpPort)
      Parameters:
      snmpPort - the snmpPort to set
    • getSnmpVersion

      public SnmpVersion getSnmpVersion()
      Returns:
      the snmpVersion
    • setSnmpVersion

      public void setSnmpVersion(SnmpVersion snmpVersion)
      Parameters:
      snmpVersion - the snmpVersion to set
    • getFlags

      public int getFlags()
      Returns:
      the flags
    • setFlags

      public void setFlags(int flags)
      Parameters:
      flags - the flags to set
    • getStateFlags

      public int getStateFlags()
      Returns:
      the stateFlags
    • getTransformationScript

      public String getTransformationScript()
      Returns:
      the transformationScript
    • setTransformationScript

      public void setTransformationScript(String transformationScript)
      Parameters:
      transformationScript - the transformationScript to set
    • getUserData

      public Object getUserData()
      Returns:
      the userData
    • setUserData

      public void setUserData(Object userData)
      Parameters:
      userData - the userData to set
    • isAggregateOnCluster

      public boolean isAggregateOnCluster()
      Returns:
      the processAllThresholds
    • setAggregateOnCluster

      public void setAggregateOnCluster(boolean enable)
    • isAggregateWithErrors

      public boolean isAggregateWithErrors()
      Include node DCI value into aggregated value even in case of data collection error (system will use last known value in that case)
      Returns:
      true if enabled
    • setAggregateWithErrors

      public void setAggregateWithErrors(boolean enable)
      Enable or disable inclusion of node DCI value into aggregated value even in case of data collection error (system will use last known value in that case)
      Parameters:
      enable - true to enable
    • isTransformAggregated

      public boolean isTransformAggregated()
    • setTransformAggregated

      public void setTransformAggregated(boolean enable)
    • getComments

      public String getComments()
      Returns:
      the comments
    • setComments

      public void setComments(String comments)
      Parameters:
      comments - the comments to set
    • getCacheMode

      public AgentCacheMode getCacheMode()
      Returns:
      aggregation function
    • setCacheMode

      public void setCacheMode(AgentCacheMode mode)
    • isNewItem

      public boolean isNewItem()
    • setId

      public void setId(long id)
    • setNodeId

      public void setNodeId(long nodeId)
    • getInstanceName

      public String getInstanceName()
      Returns:
      instance name
    • setInstanceName

      public void setInstanceName(String instanceName)
      Parameters:
      instanceName - the instance to set
    • getInstanceDiscoveryMethod

      public final int getInstanceDiscoveryMethod()
      Returns:
      the instanceDiscoveryMethod
    • setInstanceDiscoveryMethod

      public final void setInstanceDiscoveryMethod(int instanceDiscoveryMethod)
      Parameters:
      instanceDiscoveryMethod - the instanceDiscoveryMethod to set
    • getInstanceDiscoveryData

      public final String getInstanceDiscoveryData()
      Returns:
      the instanceDiscoveryData
    • setInstanceDiscoveryData

      public final void setInstanceDiscoveryData(String instanceDiscoveryData)
      Parameters:
      instanceDiscoveryData - the instanceDiscoveryData to set
    • getInstanceDiscoveryFilter

      public final String getInstanceDiscoveryFilter()
      Returns:
      the instanceDiscoveryFilter
    • setInstanceDiscoveryFilter

      public final void setInstanceDiscoveryFilter(String instanceDiscoveryFilter)
      Parameters:
      instanceDiscoveryFilter - the instanceDiscoveryFilter to set
    • getAccessList

      public List<Integer> getAccessList()
      Get data collection object access list
      Returns:
      access list
    • setAccessList

      public void setAccessList(List<Integer> list)
      Set data collection object access list
      Parameters:
      list - new access list
    • getInstanceRetentionTime

      public int getInstanceRetentionTime()
      Get instance retention time
      Returns:
      instance retention time
    • setInstanceRetentionTime

      public void setInstanceRetentionTime(int instanceRetentionTime)
      Set instance retention time
      Parameters:
      instanceRetentionTime - the retention time to set
    • isHideOnLastValuesView

      public boolean isHideOnLastValuesView()
      Returns if dco is hidden on Last Values view
      Returns:
      if dco should be hidden on Last Values view
    • setHideOnLastValuesView

      public void setHideOnLastValuesView(boolean enable)
      Enable or disable usage of this DCI for node status calculation
      Parameters:
      enable - true to enable
    • getRelatedObject

      public long getRelatedObject()
      Returns:
      the relatedObject
    • setRelatedObject

      public void setRelatedObject(long relatedObject)
      Parameters:
      relatedObject - the relatedObject to set
    • getTemplateItemId

      public long getTemplateItemId()
      Returns:
      the templateItemId
    • getThresholdDisableEndTime

      public long getThresholdDisableEndTime()
      Get time until which threshold processing is disabled for this DCI. Value of 0 means that threshold processing is enabled. Value of -1 means that threshold processing is disabled permanently.
      Returns:
      the thresholdDisableEndTime time in seconds since epoch until which threshold processing is disabled
    • setThresholdDisableEndTime

      public void setThresholdDisableEndTime(long thresholdDisableEndTime)
      Set time until which threshold processing is disabled for this DCI. Value of 0 means that threshold processing is enabled. Value of -1 means that threshold processing is disabled permanently.
      Parameters:
      thresholdDisableEndTime - time in seconds since epoch until which threshold processing is disabled