NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: nxshell - create new data collector items  (Read 448 times)

suphu

  • Newbie
  • *
  • Posts: 24
    • View Profile
nxshell - create new data collector items
« on: September 24, 2018, 05:10:32 pm »

Hi, I am coding in python using nxshell version 2.2.8

Looking at some post about how to create new data collector items - this works!
https://www.netxms.org/forum/general-support/how-to-create-dci-using-netxms-java-api-version-2-1-m3/msg22320/#msg22320

However, the API Reference marks this method as Deprecated.  Going forward, what is/will be the proper API call(s) to create DCI's?
https://www.netxms.org/documentation/javadoc/latest
createItem(DataCollectionObject object)
Deprecated.

Thanks.
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6619
    • View Profile
Re: nxshell - create new data collector items
« Reply #1 on: September 24, 2018, 09:00:09 pm »

Hi,

it is deprecated in 3.0 branch (latest javadoc generated from 3.0), you can safely use it in 2.2 branch. In 3.0 you should call DataCollectionConfiguration.modifyObject with data collection object ID set to 0 (but this will not work in 2.2).

Best regards,
Victor
Logged