REST API: Maintenance Mode / NXSL Invocation
-
I would like to request the ability to put a node in and out of maintenance mode via the REST API. This could also be solved with something more powerful such as allowing NXSL scripts to be sent to devices via the REST API just like you are able to do with execute server script.
I want to incorporate NetXMS into Ansible to be able to do things like:
- Put nodes into maintenance mode in NetXMS
- Patch, change, update systems
- Remove from maintenance mode in NetXMS
-
Brilliant idea, I hope the devs see this and incorporate it. I'd use the heck out of this in automation town.
-
Some DevOp in a company i was earlier made a Groovy script for this that could be executed in Ansible.
It was created for earlier version, but do not have it aviable anymore.Script used netxms-client library and
session.setObjectMaintenanceMode(object.objectId, true, comment)to enter maintenance.In Ansible "script" was used, something like this:
- name: Enter NetXMS maintenance mode
become: false
script:
./scripts/netxms-cli enter-maintenance {{ netxms_hostname | default(inventory_hostname) | quote }} --comment "Upgrading linux system"
vars:
ansible_command_timeout: 40
throttle: 5
delegate_to: localhost
ignore_errors: yes
- name: Enter NetXMS maintenance mode
-
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