<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[REST API: Maintenance Mode / NXSL Invocation]]></title><description><![CDATA[<p dir="auto">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.</p>
<p dir="auto">I want to incorporate NetXMS into Ansible to be able to do things like:</p>
<ol>
<li>Put nodes into maintenance mode in NetXMS</li>
<li>Patch, change, update systems</li>
<li>Remove from maintenance mode in NetXMS</li>
</ol>
]]></description><link>https://forum.netxms.org/topic/7495/rest-api-maintenance-mode-nxsl-invocation</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 08:25:06 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7495.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 22 Aug 2022 20:26:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to REST API: Maintenance Mode / NXSL Invocation on Fri, 26 Aug 2022 19:26:38 GMT]]></title><description><![CDATA[<p dir="auto">Ideally I would like to be able to do all of this via the REST API.</p>
<p dir="auto">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.</p>
]]></description><link>https://forum.netxms.org/post/31809</link><guid isPermaLink="true">https://forum.netxms.org/post/31809</guid><dc:creator><![CDATA[narellan]]></dc:creator><pubDate>Fri, 26 Aug 2022 19:26:38 GMT</pubDate></item><item><title><![CDATA[Reply to REST API: Maintenance Mode / NXSL Invocation on Thu, 25 Aug 2022 14:23:16 GMT]]></title><description><![CDATA[<p dir="auto">Some DevOp in a company i was earlier made a Groovy script for this that could be executed in Ansible.<br />
It was created for earlier version, but  do not have it aviable anymore.</p>
<p dir="auto">Script used netxms-client library and <code>session.setObjectMaintenanceMode(object.objectId, true, comment)</code> to enter maintenance.</p>
<p dir="auto">In Ansible "script" was used, something like this:</p>
<blockquote>
<ul>
<li>name: Enter NetXMS maintenance mode<br />
  become: false<br />
  script:<br />
    ./scripts/netxms-cli enter-maintenance {{ netxms_hostname | default(inventory_hostname) | quote }} --comment "Upgrading linux system"<br />
  vars:<br />
    ansible_command_timeout: 40<br />
  throttle: 5<br />
  delegate_to: localhost<br />
  ignore_errors: yes</li>
</ul>
</blockquote>
]]></description><link>https://forum.netxms.org/post/31805</link><guid isPermaLink="true">https://forum.netxms.org/post/31805</guid><dc:creator><![CDATA[Borgso]]></dc:creator><pubDate>Thu, 25 Aug 2022 14:23:16 GMT</pubDate></item><item><title><![CDATA[Reply to REST API: Maintenance Mode / NXSL Invocation on Mon, 22 Aug 2022 20:37:42 GMT]]></title><description><![CDATA[<p dir="auto">Brilliant idea, I hope the devs see this and incorporate it. I'd use the heck out of this in automation town.</p>
]]></description><link>https://forum.netxms.org/post/31779</link><guid isPermaLink="true">https://forum.netxms.org/post/31779</guid><dc:creator><![CDATA[turbomuffin]]></dc:creator><pubDate>Mon, 22 Aug 2022 20:37:42 GMT</pubDate></item></channel></rss>