Package org.netxms.client.datacollection
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 Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedDataCollectionObject(DataCollectionConfiguration owner, long id)Constructor for new data collection objects.protectedDataCollectionObject(DataCollectionConfiguration owner, org.netxms.base.NXCPMessage msg)Create data collection object from NXCP messageDataCollectionObject(DataCollectionConfiguration owner, DataCollectionObject dco)Object copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfillMessage(org.netxms.base.NXCPMessage msg)Fill NXCP message with item's data.List<Long>getAccessList()Get data collection object access listAgentCacheModegetCacheMode()StringgetComments()intgetComparablePollingInterval()intgetComparableRetentionTime()StringgetDescription()intgetFlags()longgetId()StringgetInstance()StringgetInstanceDiscoveryData()StringgetInstanceDiscoveryFilter()intgetInstanceDiscoveryMethod()intgetInstanceRetentionTime()Get instance retention timeStringgetName()longgetNodeId()Get ID of owning node.intgetOrigin()DataCollectionConfigurationgetOwner()Get owning data collection configuration.StringgetPerfTabSettings()StringgetPollingInterval()intgetPollingScheduleType()longgetRelatedObject()longgetResourceId()StringgetRetentionTime()intgetRetentionType()ArrayList<String>getSchedules()intgetSnmpPort()SnmpVersiongetSnmpVersion()longgetSourceNode()Get source node (node where actual data collection took place) IDintgetStatus()StringgetSystemTag()Get system tag.longgetTemplateId()StringgetTransformationScript()ObjectgetUserData()booleanisAggregateOnCluster()booleanisAggregateWithErrors()Include node DCI value into aggregated value even in case of data collection error (system will use last known value in that case)booleanisHideOnLastValuesView()Returns if dco is hidden on Last Values viewbooleanisNewItem()booleanisTransformAggregated()booleanisUseAdvancedSchedule()voidsetAccessList(List<Long> list)Set data collection object access listvoidsetAggregateOnCluster(boolean enable)voidsetAggregateWithErrors(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)voidsetCacheMode(AgentCacheMode mode)voidsetComments(String comments)voidsetDescription(String description)voidsetFlags(int flags)voidsetHideOnLastValuesView(boolean enable)Enable or disable usage of this DCI for node status calculationvoidsetId(long id)voidsetInstance(String instance)voidsetInstanceDiscoveryData(String instanceDiscoveryData)voidsetInstanceDiscoveryFilter(String instanceDiscoveryFilter)voidsetInstanceDiscoveryMethod(int instanceDiscoveryMethod)voidsetInstanceRetentionTime(int instanceRetentionTime)Set instance retention timevoidsetName(String name)voidsetOrigin(int origin)voidsetPerfTabSettings(String perfTabSettings)voidsetPollingInterval(String pollingInterval)voidsetPollingScheduleType(int pollingScheduleType)voidsetRelatedObject(long relatedObject)voidsetResourceId(long resourceId)voidsetRetentionTime(String retentionTime)voidsetRetentionType(int retentionType)voidsetSchedules(Collection<String> newSchedules)Set schedulesvoidsetSnmpPort(int snmpPort)voidsetSnmpVersion(SnmpVersion snmpVersion)voidsetSourceNode(long sourceNode)Set source node (node where actual data collection took place) ID.voidsetStatus(int status)voidsetSystemTag(String systemTag)Set system tag.voidsetTemplateId(long templateId)voidsetTransformAggregated(boolean enable)voidsetTransformationScript(String transformationScript)voidsetUserData(Object userData)
-
-
-
Field Detail
-
DCO_TYPE_GENERIC
public static final int DCO_TYPE_GENERIC
- See Also:
- Constant Field Values
-
DCO_TYPE_ITEM
public static final int DCO_TYPE_ITEM
- See Also:
- Constant Field Values
-
DCO_TYPE_TABLE
public static final int DCO_TYPE_TABLE
- See Also:
- Constant Field Values
-
INTERNAL
public static final int INTERNAL
- See Also:
- Constant Field Values
-
AGENT
public static final int AGENT
- See Also:
- Constant Field Values
-
SNMP
public static final int SNMP
- See Also:
- Constant Field Values
-
WEB_SERVICE
public static final int WEB_SERVICE
- See Also:
- Constant Field Values
-
PUSH
public static final int PUSH
- See Also:
- Constant Field Values
-
WINPERF
public static final int WINPERF
- See Also:
- Constant Field Values
-
SMCLP
public static final int SMCLP
- See Also:
- Constant Field Values
-
SCRIPT
public static final int SCRIPT
- See Also:
- Constant Field Values
-
SSH
public static final int SSH
- See Also:
- Constant Field Values
-
MQTT
public static final int MQTT
- See Also:
- Constant Field Values
-
DEVICE_DRIVER
public static final int DEVICE_DRIVER
- See Also:
- Constant Field Values
-
ACTIVE
public static final int ACTIVE
- See Also:
- Constant Field Values
-
DISABLED
public static final int DISABLED
- See Also:
- Constant Field Values
-
NOT_SUPPORTED
public static final int NOT_SUPPORTED
- See Also:
- Constant Field Values
-
DCF_AGGREGATE_ON_CLUSTER
public static final int DCF_AGGREGATE_ON_CLUSTER
- See Also:
- Constant Field Values
-
DCF_TRANSFORM_AGGREGATED
public static final int DCF_TRANSFORM_AGGREGATED
- See Also:
- Constant Field Values
-
DCF_CACHE_MODE_MASK
public static final int DCF_CACHE_MODE_MASK
- See Also:
- Constant Field Values
-
DCF_AGGREGATE_WITH_ERRORS
public static final int DCF_AGGREGATE_WITH_ERRORS
- See Also:
- Constant Field Values
-
DCF_HIDE_ON_LAST_VALUES_PAGE
public static final int DCF_HIDE_ON_LAST_VALUES_PAGE
- See Also:
- Constant Field Values
-
IDM_NONE
public static final int IDM_NONE
- See Also:
- Constant Field Values
-
IDM_AGENT_LIST
public static final int IDM_AGENT_LIST
- See Also:
- Constant Field Values
-
IDM_AGENT_TABLE
public static final int IDM_AGENT_TABLE
- See Also:
- Constant Field Values
-
IDM_SNMP_WALK_VALUES
public static final int IDM_SNMP_WALK_VALUES
- See Also:
- Constant Field Values
-
IDM_SNMP_WALK_OIDS
public static final int IDM_SNMP_WALK_OIDS
- See Also:
- Constant Field Values
-
IDM_SCRIPT
public static final int IDM_SCRIPT
- See Also:
- Constant Field Values
-
POLLING_SCHEDULE_DEFAULT
public static final int POLLING_SCHEDULE_DEFAULT
- See Also:
- Constant Field Values
-
POLLING_SCHEDULE_CUSTOM
public static final int POLLING_SCHEDULE_CUSTOM
- See Also:
- Constant Field Values
-
POLLING_SCHEDULE_ADVANCED
public static final int POLLING_SCHEDULE_ADVANCED
- See Also:
- Constant Field Values
-
RETENTION_DEFAULT
public static final int RETENTION_DEFAULT
- See Also:
- Constant Field Values
-
RETENTION_CUSTOM
public static final int RETENTION_CUSTOM
- See Also:
- Constant Field Values
-
RETENTION_NONE
public static final int RETENTION_NONE
- See Also:
- Constant Field Values
-
owner
protected DataCollectionConfiguration owner
-
id
protected long id
-
templateId
protected long templateId
-
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 int origin
-
status
protected int status
-
flags
protected int flags
-
transformationScript
protected String transformationScript
-
name
protected String name
-
description
protected String description
-
systemTag
protected String systemTag
-
perfTabSettings
protected String perfTabSettings
-
snmpPort
protected int snmpPort
-
snmpVersion
protected SnmpVersion snmpVersion
-
userData
protected Object userData
-
comments
protected String comments
-
instance
protected String instance
-
instanceDiscoveryMethod
protected int instanceDiscoveryMethod
-
instanceDiscoveryData
protected String instanceDiscoveryData
-
instanceDiscoveryFilter
protected String instanceDiscoveryFilter
-
instanceRetentionTime
protected int instanceRetentionTime
-
relatedObject
protected long relatedObject
-
-
Constructor Detail
-
DataCollectionObject
protected DataCollectionObject(DataCollectionConfiguration owner, org.netxms.base.NXCPMessage msg)
Create data collection object from NXCP message- Parameters:
owner- Owning configuration objectmsg- NXCP message
-
DataCollectionObject
protected DataCollectionObject(DataCollectionConfiguration owner, long id)
Constructor for new data collection objects.- Parameters:
owner- Owning configuration objectid- Identifier assigned to new item
-
DataCollectionObject
public DataCollectionObject(DataCollectionConfiguration owner, DataCollectionObject dco)
Object copy constructor- Parameters:
owner- object ownerdco- object to copy
-
-
Method Detail
-
fillMessage
public void fillMessage(org.netxms.base.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 int getOrigin()
- Returns:
- the origin
-
setOrigin
public void setOrigin(int origin)
- Parameters:
origin- the origin to set
-
getStatus
public int getStatus()
- Returns:
- the status
-
setStatus
public void setStatus(int 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
-
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
-
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
-
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)
-
getInstance
public String getInstance()
- Returns:
- the instance
-
setInstance
public void setInstance(String instance)
- Parameters:
instance- 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<Long> getAccessList()
Get data collection object access list- Returns:
- access list
-
setAccessList
public void setAccessList(List<Long> 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
-
-