Using nxshell to automate bulk operations

From NetXMS Wiki
Revision as of 12:57, 25 January 2013 by AlexKirhenshtein (talk | contribs) (Created page with "= Introduction = NxShell is based on Jython and provide access to NetXMS Java API using interactive shell. NxShell is build as single jar file, which includes all required lib...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

NxShell is based on Jython and provide access to NetXMS Java API using interactive shell. NxShell is build as single jar file, which includes all required libraries.

Download: http://www.netxms.org/download/nxshell-1.2.5.jar (change 1.2.5 to required version)

Usage

Start as interactive shell:

java -jar nxshell-1.2.5.jar

Execute script "test.py":

java -jar nxshell-1.2.5.jar test.py

When NxShell is started, it tries to get server IP, login and password from command line parameters. In interactive mode, user will be asked for details, otherwise default values will be used.

Start as interactive shell, with IP and Login provided (password will be asked):

java -Dnetxms.server=127.0.0.1 -Dnetxms.login=admin -jar nxshell-1.2.5.jar

Properties

These properties should be set with JVM's "-D" option. Please make sure that all "-D" options are before "-jar".

Parameter Default Value
netxms.server 127.0.0.1
netxms.login admin
netxms.password netxms