Package org.netxms.client.datacollection
Class DataCollectionObject
java.lang.Object
org.netxms.client.datacollection.DataCollectionObject
- Direct Known Subclasses:
DataCollectionItem,DataCollectionTable
Abstract data collection object
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected Stringstatic final intprotected intprotected longstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected Stringprotected Stringprotected intprotected Stringprotected intprotected Stringprotected longstatic final intprotected DataOriginprotected DataCollectionConfigurationprotected Stringstatic final intstatic final intstatic final intprotected Stringprotected intprotected longprotected longstatic final intstatic final intstatic final intprotected Stringprotected intprotected intprotected SnmpVersionprotected longprotected intprotected intprotected Stringprotected longprotected longprotected Stringprotected Objectprotected String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor (intended for deserialization)protectedDataCollectionObject(long nodeId, long id) Constructor for new data collection objects.protectedDataCollectionObject(DataCollectionConfiguration owner, long id) Constructor for new data collection objects.protectedDataCollectionObject(DataCollectionConfiguration owner, long nodeId, long id) Constructor for new data collection objects.protectedCreate data collection object from NXCP messageObject copy constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidfillMessage(NXCPMessage msg) Fill NXCP message with item's data.Get data collection object access listintintintgetFlags()longgetId()final Stringfinal Stringfinal intintGet instance retention timegetName()longGet ID of owning node.getOwner()Get owning data collection configuration.intlonglongintintlongGet source node (node where actual data collection took place) IDintintGet system tag.longlongGet user-assigned tag.booleanbooleanInclude node DCI value into aggregated value even in case of data collection error (system will use last known value in that case)booleanReturns if dco is hidden on Last Values viewbooleanbooleanbooleanvoidsetAccessList(List<Integer> 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) final voidsetInstanceDiscoveryData(String instanceDiscoveryData) final voidsetInstanceDiscoveryFilter(String instanceDiscoveryFilter) final voidsetInstanceDiscoveryMethod(int instanceDiscoveryMethod) voidsetInstanceName(String instanceName) voidsetInstanceRetentionTime(int instanceRetentionTime) Set instance retention timevoidvoidsetNodeId(long nodeId) voidsetOrigin(DataOrigin 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) voidsetUserTag(String userTag) Set user-assigned tag.
-
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:
-
ACTIVE
public static final int ACTIVE- See Also:
-
DISABLED
public static final int DISABLED- See Also:
-
NOT_SUPPORTED
public static final int NOT_SUPPORTED- 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:
-
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
-
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
-
retentionType
protected int retentionType -
retentionTime
-
origin
-
status
protected int status -
flags
protected int flags -
stateFlags
protected int stateFlags -
transformationScript
-
name
-
description
-
systemTag
-
userTag
-
perfTabSettings
-
snmpPort
protected int snmpPort -
snmpVersion
-
schedules
-
userData
-
comments
-
instanceName
-
instanceDiscoveryMethod
protected int instanceDiscoveryMethod -
instanceDiscoveryData
-
instanceDiscoveryFilter
-
accessList
-
instanceRetentionTime
protected int instanceRetentionTime
-
-
Constructor Details
-
DataCollectionObject
Create data collection object from NXCP message- Parameters:
owner- Owning configuration objectmsg- NXCP message
-
DataCollectionObject
Constructor for new data collection objects.- Parameters:
owner- Owning configuration objectnodeId- Owning node IDid- Identifier assigned to new item
-
DataCollectionObject
Constructor for new data collection objects.- Parameters:
owner- Owning configuration objectid- Identifier assigned to new item
-
DataCollectionObject
protected DataCollectionObject(long nodeId, long id) Constructor for new data collection objects.- Parameters:
nodeId- Owning node IDid- Identifier assigned to new item
-
DataCollectionObject
protected DataCollectionObject()Default constructor (intended for deserialization) -
DataCollectionObject
Object copy constructor- Parameters:
owner- object ownersrc- object to copy
-
-
Method Details
-
fillMessage
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
- Returns:
- the pollingInterval
-
getComparablePollingInterval
public int getComparablePollingInterval()- Returns:
- polling interval suitable for sorting
-
setPollingInterval
- 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
- Returns:
- the retentionTime
-
getComparableRetentionTime
public int getComparableRetentionTime()- Returns:
- The retention time
-
setRetentionTime
- 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
- Returns:
- the origin
-
setOrigin
- 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
- Returns:
- the name
-
setName
- Parameters:
name- the name to set
-
getDescription
- Returns:
- the description
-
setDescription
- Parameters:
description- the description to set
-
getId
public long getId()- Returns:
- the id
-
getSchedules
- Returns:
- the schedules
-
setSchedules
Set schedules- Parameters:
newSchedules- Collection containing new schedules
-
getOwner
Get owning data collection configuration.- Returns:
- the owner
-
getNodeId
public long getNodeId()Get ID of owning node.- Returns:
- id of owning node
-
getSystemTag
Get system tag. In most situations, system tag should not be shown to user.- Returns:
- System tag associated with this DCI
-
setSystemTag
Set system tag. In most situations, user should not have possibility to set system tag manually.- Parameters:
systemTag- New system tag for DCI
-
getUserTag
Get user-assigned tag.- Returns:
- User-assigned tag of this DCI
-
setUserTag
Set user-assigned tag.- Parameters:
userTag- New user-assigned tag for DCI
-
getPerfTabSettings
- Returns:
- the perfTabSettings
-
setPerfTabSettings
- 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
- Returns:
- the snmpVersion
-
setSnmpVersion
- 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
- Returns:
- the transformationScript
-
setTransformationScript
- Parameters:
transformationScript- the transformationScript to set
-
getUserData
- Returns:
- the userData
-
setUserData
- 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
- Returns:
- the comments
-
setComments
- Parameters:
comments- the comments to set
-
getCacheMode
- Returns:
- aggregation function
-
setCacheMode
-
isNewItem
public boolean isNewItem() -
setId
public void setId(long id) -
setNodeId
public void setNodeId(long nodeId) -
getInstanceName
- Returns:
- instance name
-
setInstanceName
- 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
- Returns:
- the instanceDiscoveryData
-
setInstanceDiscoveryData
- Parameters:
instanceDiscoveryData- the instanceDiscoveryData to set
-
getInstanceDiscoveryFilter
- Returns:
- the instanceDiscoveryFilter
-
setInstanceDiscoveryFilter
- Parameters:
instanceDiscoveryFilter- the instanceDiscoveryFilter to set
-
getAccessList
Get data collection object access list- Returns:
- access list
-
setAccessList
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
-