News:

We really need your input in this questionnaire

Main Menu

Manage/Unmanage Node via nxshell

Started by charly, March 12, 2021, 04:12:27 PM

Previous topic - Next topic

charly

I am using nxalarm to terminate alarms and it works perfect.

Now I would also like to manage/unmanage a node via nxshell.
Is there already an option to do that?

Thanks
charly

johnnyva

Hey charly,

You can use setObjectManaged which is a method on the session object https://www.netxms.org/documentation/javadoc/latest/org/netxms/client/NXCSession.html#setObjectManaged-long-boolean-

You can do the following:

Manage a node

node = s.findObjectByName('testnode')
s.setObjectManaged(node.getObjectId(), True)


Unmanage a node

node = s.findObjectByName('testnode')
s.setObjectManaged(node.getObjectId(), False)

charly

That works!
Thank you very much!

charly