java API: create threshold for DCI
-
-
Brief update: Looking at the netxms-client sources it seems that there is no setThreshods() method for DataCollectionItem. I think something like this needs to be added to org/netxms/client/datacollection/DataCollectionItem.java:
/** * @param thresholds the thresholds to set */ public void setThresholds(ArrayList<Threshold> thresholds) { this.thresholds = thresholds; }Is that correct?
-
Was stuck on this as well. The use of '.getThresholds().add()' solved it for me:
DataCollectionConfiguration objDcc = objNxcSession.openDataCollectionConfiguration(intTemplateId); DataCollectionItem objDci = new DataCollectionItem(objDcc, 0); Threshold objThreshold = new Threshold(); objThreshold.setFunction(Threshold.F_DIFF); // "Diff with previous value", for example // define additional threshold parameters... objDci.getThresholds().add(objThreshold); objDcc.modifyObject(objDci); -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login