create DCI with Java API

Started by moseszero, February 06, 2012, 10:46:51 AM

Previous topic - Next topic

moseszero

HI,
I'm trying to create a DCI for a Node with Java API(version 1.1.6),and noticed that when create a DCI in Java console,after some DCI's parameter selected, its default information like data type,origin are also specialized dynamically,
how to get these default setting information with Java API or any other advice for creating DCI?

Best regards

moseszero

 Is the list of all supported DCI to some Node  available using Java API?

Victor Kirhenshtein

Hi!

Quote from: moseszero on February 07, 2012, 04:31:14 AM
Is the list of all supported DCI to some Node  available using Java API?

Yes, you can use Session.getSupportedParameters call. It accepts node object ID and returns list of parameters supported by that node.

Best regards,
Victor

Victor Kirhenshtein

Quote from: moseszero on February 06, 2012, 10:46:51 AM
HI,
I'm trying to create a DCI for a Node with Java API(version 1.1.6),and noticed that when create a DCI in Java console,after some DCI's parameter selected, its default information like data type,origin are also specialized dynamically,
how to get these default setting information with Java API or any other advice for creating DCI?

When you use DataCollectionConfiguration.createItem call, new DCI is created with the following default parameters:

origin - agent
data type - integer
polling interval - 60 seconds
retention time - 30 days
status - ACTIVE
delta calculation - none

all other attributes are set to 0, null, or empty string, depending on attribute's type.

You should set all required attributes and call DataCollectionConfiguration.modifyItem.

Best regards,
Victor

moseszero