DCIs Description changing

Started by atena, July 29, 2020, 06:46:34 AM

Previous topic - Next topic

atena

Hello
I add 200 DCIs in a node and now I want to change something in their Descriptions, is there any way to change them by script or something else instead of changing them manually and one by one??
thanks

Alex Kirhenshtein

You can use nxshell for that:

from org.netxms.client.datacollection import DataCollectionConfiguration, DataCollectionObject
from org.netxms.client.objects import Node, Template

o = s.findObjectByName("Alexs-MBP")
config = session.openDataCollectionConfiguration(o.objectId)
for dc in config.items:
    dc.description = dc.description + " - TEST"
    config.modifyObject(dc)
config.close()

atena

Thanks a lot for your response but I got an error after line config.modifyobject(dc) which said org.netxms.client.datacollectioncon object has no attribute 'modifyobject'
can you please help me to solve this?
thanks again for you reply and help

best regard
Atena

Victor Kirhenshtein

Hi,

pay attention to case - it is modifyObject, not modifyobject.

Best regards,
Victor