Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Feature Requests
  3. REST API: Maintenance Mode / NXSL Invocation

REST API: Maintenance Mode / NXSL Invocation

Scheduled Pinned Locked Moved Feature Requests
4 Posts 3 Posters 10.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N
    N
    narellan
    wrote on last edited by
    #1

    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:

    1. Put nodes into maintenance mode in NetXMS
    2. Patch, change, update systems
    3. Remove from maintenance mode in NetXMS
    1 Reply Last reply
    0
    • T
      T
      turbomuffin
      wrote on last edited by
      #2

      Brilliant idea, I hope the devs see this and incorporate it. I'd use the heck out of this in automation town.

      1 Reply Last reply
      0
      • B
        B
        Borgso
        wrote on last edited by
        #3

        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
        1 Reply Last reply
        0
        • N
          N
          narellan
          wrote on last edited by
          #4

          Ideally I would like to be able to do all of this via the REST API.

          Sure, I could use even nxshell and jython to do some stuff as well, but I would like to not have to have the Java dependencies just to do some automation actions with NetXMS and Ansible.

          1 Reply Last reply
          0

          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
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups