<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[java API: create threshold for DCI]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I'm using the java API to create DCIs. This works fine for the basic stuff like name, description, polling interval, etc. But how can I attach a Threshold object to the DataCollectionItem?</p>
<p dir="auto">Thanks a lot,</p>
<p dir="auto">Hendrik</p>
]]></description><link>https://forum.netxms.org/topic/6884/java-api-create-threshold-for-dci</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:19:19 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6884.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 28 Jan 2021 19:59:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to java API: create threshold for DCI on Sat, 30 Jan 2021 10:00:56 GMT]]></title><description><![CDATA[<p dir="auto">Great, that works! Thanks!</p>
<p dir="auto">I still think a "setThresholds()" method would be nice, but I'm glad I can go on now.    <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.netxms.org/post/29379</link><guid isPermaLink="true">https://forum.netxms.org/post/29379</guid><dc:creator><![CDATA[hoeth]]></dc:creator><pubDate>Sat, 30 Jan 2021 10:00:56 GMT</pubDate></item><item><title><![CDATA[Reply to java API: create threshold for DCI on Sat, 30 Jan 2021 02:04:10 GMT]]></title><description><![CDATA[<p dir="auto">Was stuck on this as well. The use of '.getThresholds().add()' solved it for me:</p>
<pre><code>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);
</code></pre>
]]></description><link>https://forum.netxms.org/post/29378</link><guid isPermaLink="true">https://forum.netxms.org/post/29378</guid><dc:creator><![CDATA[tolimanjo]]></dc:creator><pubDate>Sat, 30 Jan 2021 02:04:10 GMT</pubDate></item><item><title><![CDATA[Reply to java API: create threshold for DCI on Fri, 29 Jan 2021 11:42:31 GMT]]></title><description><![CDATA[<p dir="auto">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:</p>
<pre><code>	/**
	 * @param thresholds the thresholds to set
	 */
	public void setThresholds(ArrayList&lt;Threshold&gt; thresholds)
	{
		this.thresholds = thresholds;
	}
</code></pre>
<p dir="auto">Is that correct?</p>
]]></description><link>https://forum.netxms.org/post/29374</link><guid isPermaLink="true">https://forum.netxms.org/post/29374</guid><dc:creator><![CDATA[hoeth]]></dc:creator><pubDate>Fri, 29 Jan 2021 11:42:31 GMT</pubDate></item></channel></rss>