<?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[Netxms rancid export script]]></title><description><![CDATA[<p dir="auto">Hello, everyone.</p>
<p dir="auto">I want to make a script that should dump all nodes within container with name {Customer-name} that have custom attribute RANCID_ENABLED=1 set in the following format:<br />
&lt;Node-Name&gt;, &lt;node-IP&gt;, &lt;node-type from node custom attribute RANCID_TYPE  &gt;</p>
<p dir="auto">But i don't know where to start with it. Can someone give me advice?</p>
]]></description><link>https://forum.netxms.org/topic/5660/netxms-rancid-export-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:58:58 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5660.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Aug 2018 11:05:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Netxms rancid export script on Wed, 15 Aug 2018 14:01:40 GMT]]></title><description><![CDATA[<p dir="auto">Thanks i will try. Have a nice day  <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.netxms.org/post/24686</link><guid isPermaLink="true">https://forum.netxms.org/post/24686</guid><dc:creator><![CDATA[innerfire]]></dc:creator><pubDate>Wed, 15 Aug 2018 14:01:40 GMT</pubDate></item><item><title><![CDATA[Reply to Netxms rancid export script on Thu, 09 Aug 2018 11:34:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">this is simple nxshell script that do what you need:</p>
<pre><code>import csv, sys

w = csv.writer(sys.stdout, dialect='excel')
w.writerow(['name', 'ip', 'type']) # Header

for node in [o for o in s.getAllObjects() if isinstance(o, objects.Node)]:
    enabled = node.getCustomAttributes().get("RANCID_ENABLED")
    if enabled != None and int(enabled) == 1:
        w.writerow([
            node.getObjectName(),
            node.getPrimaryIP().getHostAddress(),
            node.getCustomAttributes().get("RANCID_TYPE")
        ])
</code></pre>
<p dir="auto">You can find more information about nxshell here: <a href="https://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations" rel="nofollow ugc">https://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations</a></p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/24662</link><guid isPermaLink="true">https://forum.netxms.org/post/24662</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 09 Aug 2018 11:34:52 GMT</pubDate></item></channel></rss>