Trigger Remote Command on multiple Agents via API
-
Hi,
I am new to NetXMS. So far I'm very pleased with it. Among many other things we have the nodes that we monitor grouped in clusters in the Admin Interface. We have some ObjectTools defined and are able to manually trigger remote commands on all the servers in the cluster. But we've reached to a point were we would like to remotely tell Netxms server to trigger that command on all nodes of a cluster (I imagine that the interface sends a command ot the Netxms server - I want to do the same but from my own external script/application). I imagine this is something we could do with the API. Could you please explain how I could do that or maybe point me to some documentation on how to do it ?
I really appreciate your help,
Best regards,
Alex -
Hi!
You can execute object tool via Java API or using nxshell (which is a Python wrapper around Java API). Approximate sequence will be following:
- find cluster object (by name or ID)
- for each child node object call NXCSession.executeAction
Here you can find more information about API:
http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations
https://www.netxms.org/documentation/javadoc/latest/Best regards,
Victor
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