Command-Line Tools
NetXMS includes several command-line tools for server administration, agent management, SNMP operations, and data integration.
Most agent-related tools share a common set of connection options:
| Option | Description |
|---|---|
|
Connect to the agent over a TLS tunnel |
|
Set debug level (0..9 or |
|
Set encryption policy: 0=disabled, 1=encrypt if required, 2=encrypt if supported, 3=force encrypted |
|
Expected SHA-256 fingerprint of the agent certificate (implies |
|
Display help and exit |
|
Specify server’s key file (default: |
|
Proxy agent’s port number (default: 4700) |
|
Agent’s port number (default: 4700) |
|
Shared secret for agent authentication |
|
Shared secret for proxy agent authentication |
|
Display version and exit |
|
Set command timeout (default: 5 seconds) |
|
Set connection timeout (default: 30 seconds) |
|
Use proxy agent at given address |
The -A (tunnel connection) and -X (proxy agent) options are mutually exclusive.
Server Tools
nxdbmgr
The primary database management tool for NetXMS server.
It reads database connection parameters from the server configuration file (/etc/netxmsd.conf on Linux).
Usage:
nxdbmgr [options] <command> [arguments]
Commands
| Command | Description |
|---|---|
|
Convert collected data to TimescaleDB format in background |
|
Run pending background upgrade procedures |
|
Execute SQL batch file |
|
Check database consistency |
|
Check database for missing data tables |
|
Convert standard PostgreSQL schema to TimescaleDB schema |
|
Export entire database to a portable file (.nxd format) |
|
Get value of server configuration variable(s) matching given pattern |
|
Import database from a previously exported file |
|
Initialize a new database. With no argument, the database type is auto-detected from the configured DB driver. Optionally accepts a short DB type name ( |
|
Migrate data from a source database (defined by the given config file) into the destination database (defined by the main server config) |
|
Synonym for |
|
Reset all monitoring state (alarms, thresholds, object status, DCI states) |
|
Reset the built-in |
|
Set a server configuration variable |
|
Set password for the given user |
|
Unlock database instance after server crash or unclean shutdown |
|
Unlock the given user account |
|
Upgrade database schema to match the current server version |
Options
| Option | Description |
|---|---|
|
Use alternate server configuration file |
|
Create database and database user before initialization, using the given DBA credentials |
|
Check collected data (may take a very long time) |
|
Migrate only collected data |
|
Exclude given table from export, import, or migration |
|
Fail consistency check if a fix is required |
|
Force repair — do not ask for confirmation |
|
Fallback database syntax to use if it cannot be determined |
|
GUI mode (Windows only) |
|
Display help and exit |
|
Create new tables with TYPE=InnoDB (MySQL only) |
|
Number of parallel workers for data migration (1..64, default: 4) |
|
Migrate only given log |
|
Improved machine readability of output |
|
Create new tables with TYPE=MyISAM (MySQL only) |
|
Do not replace existing configuration value ( |
|
Show output from SELECT statements in a batch |
|
Set password for the admin user during database initialization |
|
Pause after error |
|
Quiet mode (suppress startup banner) |
|
Skip collected data during export, import, conversion, or migration |
|
Skip collected data and do not clear or create data tables during export, import, or migration |
|
Enable trace mode (show executed SQL queries) |
|
Transaction size for data migration |
|
Display version and exit |
|
Ignore errors when importing or migrating collected data |
|
Ignore SQL errors when upgrading (use with extreme caution) |
|
Migrate only given table |
|
Exclude given log from export, import, or migration |
Exit Status
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Invalid command line arguments |
2 |
Configuration file malformed or cannot be loaded |
3 |
Unable to load database driver, initialize the database library, or read the database password |
4 |
Unable to connect to database |
5 |
Unable to determine database syntax |
6 |
Unable to load server modules |
7 |
Unable to determine database type from the configured driver |
8 |
Database initialization aborted |
9 |
Unable to create database or database user |
Displaying help (-h) or version (-v) also exits with code 1.
Always back up the database before running nxdbmgr check.
|
# Initialize a new PostgreSQL database
nxdbmgr init pgsql
# Upgrade database schema after server update
nxdbmgr upgrade
# Check database consistency (interactive, guides through repairs)
nxdbmgr check
# Export database
nxdbmgr export /backup/netxms-backup.nxd
# Import database from backup
nxdbmgr import /backup/netxms-backup.nxd
# Get/set server configuration variables
nxdbmgr get EnableZoning
nxdbmgr set EnableZoning 1
# Migrate from one database engine to another
nxdbmgr migrate /etc/netxmsd-source.conf
For more details see:
-
Backup and Recovery — database export/import procedures
-
Upgrading — database schema upgrades
-
Database Migration — migrating between database engines
-
Server Migration — moving NetXMS to a new server
-
Common Issues — password recovery with
reset-system-account
nxadm
Server administration and debug console tool. Connects to a locally running server process for interactive management, single command execution, or NXSL script execution.
Usage:
nxadm [-u <login>] [-P|-p <password>] -i
nxadm [-u <login>] [-P|-p <password>] -c <command>
nxadm [-u <login>] [-P|-p <password>] [-r] -s <script>
nxadm -P
nxadm -p <db_password>
nxadm -R
Options
| Option | Description |
|---|---|
|
Execute a single command at the server debug console and disconnect |
|
Display help and exit |
|
Connect to the server debug console in interactive mode |
|
Provide database password for server startup, or user password for console access |
|
Prompt for password (read from terminal): the database password for server startup, or the console user’s password when used with |
|
Use the NXSL script’s return value as the |
|
Check if the server is currently running |
|
Execute given NXSL script on the server and disconnect |
|
User name for authentication |
|
Display version and exit |
Interactive Console Commands
When connected in interactive mode (-i), the following commands are available:
| Command | Description |
|---|---|
|
Schedule one-time NXSL script execution after given delay |
|
Schedule repeated NXSL script execution using cron format |
|
Show latest device configuration backup, start a new backup, or show backup status for a node |
|
Show list of valid component names that can be cleared |
|
Clear internal data or queue for the specified component |
|
Reset database connection pool |
|
Show or set global debug level (0..9) |
|
Set debug level for a specific debug tag, or reset to default |
|
Turn SQL query trace on or off |
|
Shut down NetXMS server |
|
Write diagnostic dump of the server process |
|
Execute an NXSL script from the server script library |
|
Exit from the console session |
|
Get value of a server configuration variable |
|
Show HA cluster status or perform graceful switchover |
|
Display available commands |
|
Run housekeeper immediately |
|
Kill a client session by session ID |
|
Synchronize LDAP users with local user database |
|
Write custom text to the server log |
|
Write a marker line to the server log |
|
Force server log file rotation |
|
Send notification message to a client session |
|
Send ICMP echo request to an address |
|
Initiate a node poll ( |
|
Raise an exception (for crash dump generation during debugging) |
|
Reload MIB tree from compiled file |
|
Manual active discovery scan of an IP address range; without the |
|
Set a server configuration variable |
|
Show AI operator instances, configured AI providers, or AI provider slots |
|
Show ARP cache for a node |
|
Show active authentication tokens |
|
Show physical components of a node |
|
Show active sessions in the database connection pool |
|
Show database statistics |
|
Show state of active network discovery by address range |
|
Show event processing threads statistics |
|
Show event processing policy rules |
|
Show forwarding database (FDB) for a node |
|
Show internal server flags |
|
Show detailed heap information or heap usage summary |
|
Show contents of an internal index |
|
Show LLDP information for a node |
|
Show server memory usage |
|
Show ID and name of the management server node |
|
Show loaded server modules |
|
Show registered network device drivers |
|
Dump network objects, optionally filtered by name |
|
Show OSPF data for a node |
|
Show poller thread state information, or a summary only |
|
Show internal queue statistics |
|
Show cached routing table for a node |
|
Show active client sessions |
|
Show sizes of internal data structures |
|
Show server statistics |
|
Show data syncer status |
|
Show background tasks |
|
Show active thread information, optionally for a specific thread pool |
|
Collect and show link layer topology for a node |
|
Show active agent tunnels |
|
Show registered users and groups |
|
Show server version information |
|
Show cached VLAN information for a node |
|
Display watchdog information |
|
Create object snapshot for the given user (diagnostic) |
|
Wake up database syncer thread immediately |
|
TCP ping to a specific address and port |
|
Load test a thread pool |
|
Show network path trace between two nodes |
|
Bind an agent tunnel to a node |
|
Unbind an agent tunnel from a node |
# Interactive console session
nxadm -i
# Execute a single command
nxadm -c "show stats"
# Execute with authentication (prompts for password)
nxadm -u admin -P -i
# Run an NXSL script
nxadm -s MyMaintenanceScript
# Run NXSL script and use return value as exit code
nxadm -r -s CheckHealth
# Check if server is running
nxadm -R
For the full debug console command reference, see Debug Console.
nxevent
Send events to NetXMS server using the client protocol. Installed with the NetXMS client distribution.
Usage:
nxevent [<options>] <server> <event> [<param_1> [... <param_N>]]
nxevent [<options>] -n <server> <event> [name=parameter ...]
Options
| Option | Description |
|---|---|
|
Character codepage (default: ISO8859-1; non-Windows builds only) |
|
Repeat event sending the given number of times |
|
Turn on debug mode |
|
Encrypt session (always encrypted, kept for compatibility) |
|
Display help and exit |
|
Repeat event with given interval in milliseconds |
|
Parameters in named format ( |
|
Specify source object ID |
|
User password (default: empty) |
|
Skip protocol version check (use with care) |
|
User tag to associate with event |
|
Login user name (default: "guest") |
|
Display version and exit |
|
Command timeout (default: 3 seconds) |
# Send a simple event
nxevent -u admin -P adminpassword 127.0.0.1 MY_APP_EVENT
# Send event with positional parameters
nxevent -u admin -P adminpassword 127.0.0.1 MY_APP_EVENT param1 param2
# Send event with named parameters
nxevent -n -u admin -P adminpassword 127.0.0.1 MY_APP_EVENT state=UP desc="Application started"
# Stress test: send event 1000 times with 100ms interval
nxevent -C 1000 -i 100 -u admin -P adminpassword 127.0.0.1 TEST_EVENT
nxalarm
Command-line alarm management utility. Connects to NetXMS server to list, acknowledge, resolve, or terminate alarms.
Usage:
nxalarm [<options>] <server> <command> [<alarm_id>]
Commands
| Command | Description |
|---|---|
|
Acknowledge alarm |
|
Add comment to alarm |
|
Get comments for alarm |
|
List active alarms |
|
Open helpdesk issue from alarm |
|
Resolve alarm |
|
Terminate alarm |
Options
| Option | Description |
|---|---|
|
Character codepage (default: ISO8859-1; non-Windows builds only) |
|
Turn on debug mode |
|
Encrypt session (always encrypted, kept for compatibility) |
|
Display help and exit |
|
Output format for |
|
User password (default: empty) |
|
Sticky acknowledge (valid only with the |
|
Sticky acknowledge with timeout in minutes (valid only with the |
|
Login user name (default: "guest") |
|
Display version and exit |
|
Command timeout (default: 3 seconds) |
Output Format Codes
Used with -o option for the list command. Default format: %I %S %H %m
| Code | Description |
|---|---|
|
Primary IP address of source object |
|
Primary hostname of source object |
|
Repeat count |
|
Related DCI ID |
|
Event code |
|
Event name |
|
Helpdesk state as number |
|
Helpdesk state as text |
|
Source object identifier |
|
Alarm identifier |
|
Message text |
|
Source object name |
|
Severity as number |
|
Severity as text |
|
Alarm state as number |
|
Alarm state as text |
|
Literal percent sign |
# List all active alarms
nxalarm -u admin -P adminpasswd 127.0.0.1 list
# List alarms with custom format
nxalarm -u admin -P adminpasswd -o "%I %S %n: %m" 127.0.0.1 list
# Acknowledge alarm
nxalarm -u admin -P adminpasswd 127.0.0.1 ack 226875
# Sticky acknowledge with 60-minute timeout
nxalarm -u admin -P adminpasswd -S 60 127.0.0.1 ack 226875
# Resolve alarm
nxalarm -u admin -P adminpasswd 127.0.0.1 resolve 226875
# Terminate alarm
nxalarm -u admin -P adminpasswd 127.0.0.1 terminate 226875
Agent Tools
nxaction
Remotely execute a preconfigured action on a NetXMS agent.
Usage:
nxaction [<options>] <host> <action> [<action_args>]
In addition to the common agent options, nxaction supports:
| Option | Description |
|---|---|
|
Show action’s output |
# Execute agent restart action
nxaction 127.0.0.1 Agent.Restart
# Execute action with output
nxaction -o 10.0.0.50 RestartService httpd
# Execute via proxy agent
nxaction -X 172.16.1.1 10.0.0.50 Agent.Restart
See Agent Configuration for details on defining agent actions.
nxget
Query agent metrics, lists, tables, configuration, and perform network service checks from the command line.
Usage:
nxget [<options>] <host> [<metric> [<metric> ...]]
Options
In addition to the common agent options:
| Option | Description |
|---|---|
|
Batch mode — get all parameters specified on command line |
|
Get agent’s configuration file |
|
Print table content as delimited text |
|
Take screenshot — the first positional argument is the output file name, the optional second one is the session name (default: "Console") |
|
Do not try lists/tables if metric does not exist |
|
Get information about given file set |
|
Get parameter(s) continuously with given interval |
|
Get list of supported single-value metrics (lists and tables are not printed) |
|
Requested parameter is a list |
|
Show parameter name in result |
|
Check state of network service at address |
|
Protocol number for service check |
|
Network service port (used with |
|
Service check request string |
|
Service check expected response string |
|
Type of service to check: |
|
Requested parameter is a table |
|
Get list of active user sessions |
|
Read remote system time |
# Get a single metric
nxget 10.0.0.2 Agent.Version
# Get metric with authentication
nxget -s mySecret 10.0.0.50 System.CPU.Usage
# List all supported single-value metrics
nxget 10.0.0.2 -I
# Get a list metric
nxget -l 10.0.0.2 Agent.SubAgentList
# Get a table metric
nxget -T 10.0.0.2 System.Processes
# Batch mode - get multiple metrics at once
nxget -bn 10.0.0.2 Agent.Uptime System.Uptime System.CPU.Usage
# Get agent configuration
nxget -C 10.0.0.2
# Get metric via proxy agent
nxget -X 172.16.1.1 10.0.0.2 System.PlatformName
# Get list metric with forced encryption
nxget -e 3 -l 10.0.0.10 Agent.SubAgentList
# Monitor metric continuously every 5 seconds
nxget -i 5 10.0.0.2 System.CPU.Usage
# Check POP3 service
nxget -N 10.0.0.5 -t pop3 -P 110 10.0.0.2
# Print table as CSV
nxget -T -d "," 10.0.0.2 System.Processes
Useful Lists
|
List of defined actions |
|
List of loaded subagents |
|
List of supported list metrics |
|
List of supported single-value metrics |
|
List of supported push metrics |
|
List of supported table metrics |
|
List of agent thread pools |
nxap
Manage agent policies on a remote NetXMS agent.
Usage:
nxap [<options>] -l <host>
nxap [<options>] -u <guid> <host>
Options
In addition to the common agent options:
| Option | Description |
|---|---|
|
List installed policies on the agent |
|
Uninstall policy with given GUID |
# List all installed policies
nxap -l 127.0.0.1
# Uninstall a specific policy
nxap -u 550e8400-e29b-41d4-a716-446655440000 127.0.0.1
nxupload
Upload files to a NetXMS agent. Can also trigger agent upgrade or package installation.
Usage:
nxupload [<options>] <host> <file>
Options
In addition to the common agent options:
| Option | Description |
|---|---|
|
Set package deployment options or command line |
|
Fully qualified destination file name on agent |
|
Start installation of uploaded package |
|
Quiet mode |
|
Set package type (default: "executable") |
|
Start agent upgrade from uploaded package |
|
Compress data stream with LZ4 |
|
Compress data stream with DEFLATE |
# Upload a file
nxupload 10.0.0.5 test_script.sh
# Upload to specific destination path
nxupload -d /opt/netxms/scripts/myscript.sh 10.0.0.5 myscript.sh
# Upload and install package
nxupload -i 10.0.0.5 nxagentd-5.0.0.deb
# Upload with compression
nxupload -z 10.0.0.5 large_file.tar.gz
# Upload agent upgrade package
nxupload -u 10.0.0.5 nxagentd-5.0.0-linux-amd64.tar.gz
nxdownload
Download files from a NetXMS agent.
Accepts the common agent options, including -A for connecting over a TLS tunnel.
nxaevent
Send events to NetXMS server via the local agent. Unlike nxevent, this tool communicates through the locally running agent rather than directly to the server.
Usage:
nxaevent [OPTIONS] event_code [parameters]
nxaevent [OPTIONS] -n event_code [name=parameter ...]
Options
| Option | Description |
|---|---|
|
Display help message |
|
Parameters in named format ( |
|
Send event on behalf of object with given ID |
|
Suppress all messages |
|
Specify timestamp as UNIX timestamp |
|
Specify timestamp as |
|
Enable verbose messages (add twice for debug) |
|
Display version information |
# Send simple event
nxaevent MY_APP_EVENT
# Send event with named parameters
nxaevent -n MY_APP_EVENT state=UP desc="Application started"
# Send event on behalf of specific object
nxaevent -o 150 MY_APP_EVENT
# Send event with custom timestamp
nxaevent -t 1672531200 MY_APP_EVENT
nxapush
Push data values to NetXMS DCIs through the local agent. The tool sends data to the locally running agent, which forwards it to the server. Requires DCIs configured with Push origin type on the target node.
Usage:
nxapush [OPTIONS] [@batch_file] [values]
nxapush [OPTIONS] -
Options
| Option | Description |
|---|---|
|
Display help message |
|
Push to agent’s local cache |
|
Push data on behalf of object with given ID |
|
Suppress all messages |
|
Use statsite sink format ( |
|
Specify timestamp as UNIX timestamp |
|
Specify timestamp as |
|
Enable verbose messages (add twice for debug) |
|
Display version information |
Values are specified as dci=value. Use @batch_file to read values from a file, or - to read from standard input.
The batch file name cannot contain the = character.
|
# Push single value
nxapush PushParam1=42
# Push multiple values
nxapush PushParam1=1 PushParam2=4
# Push from batch file
nxapush @/tmp/metrics.txt
# Push from stdin
echo "PushParam1=42" | nxapush -
# Push to local cache
nxapush -l PushParam1=42
See External Tools Integration for usage details.
nxpush
Push data values to NetXMS DCIs from the server side using the client protocol.
Unlike nxapush (which runs on the agent side), nxpush sends data directly to the server from any host with network access.
Usage:
nxpush [OPTIONS] [server] [@batch_file] [values]
Options
| Option | Description |
|---|---|
|
Batch size (default: send all in one batch) |
|
Character codepage (default: ISO8859-1) |
|
Encrypt session (always encrypted, kept for compatibility) |
|
Display help message |
|
Server address |
|
User password (default: empty) |
|
Suppress all messages |
|
Skip protocol version check (use with care) |
|
Specify timestamp as UNIX timestamp |
|
Specify timestamp as |
|
Login user name (default: "guest") |
|
Enable verbose messages (add twice for debug) |
|
Display version information |
Values are specified as node:dci=value. Node and DCI can be referenced by ID, object name, DNS name, or IP address. Prefix DNS names and IP addresses with @.
# Push by node ID and DCI ID
nxpush -H 10.0.0.1 -u sender -P passwd 104:4567=1
# Push by node ID and DCI name
nxpush -H 10.0.0.1 -u sender -P passwd 104:PushParam=4
# Push using node IP
nxpush -H 10.0.0.1 -u sender -P passwd @10.0.0.50:PushParam=42
# Push from batch file
nxpush -H 10.0.0.1 -u sender -P passwd @metrics.txt
See Data Collection Concepts for push DCI configuration.
nxagentd
The NetXMS agent daemon. Normally started as a system service, but supports various command-line options for configuration, diagnostics, and service management.
Usage:
nxagentd [options]
Options
| Option | Description |
|---|---|
|
Set zone UIN for this agent |
|
Use specified configuration file |
|
Load configuration, dump parsed values, and exit |
|
Run as daemon (service) |
|
Set debug level (0..9) |
|
Windows event source name (Windows only) |
|
Install Windows event source (Windows only) |
|
Run in foreground (do not daemonize) |
|
Force creation of the configuration file |
|
Change group ID after start (UNIX only) |
|
Use alternate global section name in configuration file |
|
Display help and exit |
|
Hide window (Windows standalone mode) |
|
Windows service must be interactive |
|
Install as Windows service |
|
Delayed restart of external subagents and session agents |
|
Shut down all connected external sub-agents |
|
Show log file location |
|
Download configuration from management server at given address |
|
Windows service name |
|
Windows service display name |
|
Set configuration option (format: |
|
PID file path (UNIX, default: |
|
Platform suffix for version reporting |
|
Query configuration values and exit |
|
Register agent on management server |
|
Remove Windows service |
|
Start Windows service |
|
Stop Windows service, or run as systemd daemon (Linux) |
|
Set debug level for a specific debug tag |
|
Reset agent identity |
|
Change user ID after start (UNIX only) |
|
Remove Windows event source (Windows only) |
|
Display version and exit |
|
Run as watchdog process for agent with given PID |
|
PID of the agent being restarted (used internally during restart) |
|
Extra configuration parameters |
|
Create configuration file |
# Run in daemon mode
nxagentd -d
# Run in foreground with debug level 5
nxagentd -f -D 5
# Use alternate configuration file
nxagentd -c /opt/netxms/etc/nxagentd.conf
# Show log file location
nxagentd -l
# Dump parsed configuration and exit
nxagentd -C
# Download configuration from server
nxagentd -M 10.0.0.1
# Register agent on server
nxagentd -r 10.0.0.1
# Install as Windows service
nxagentd -I
# Install as Windows service with custom name
nxagentd -I -n NetXMSAgent -N "NetXMS Monitoring Agent"
# Set zone UIN
nxagentd -B 5
See Agent Configuration for full agent configuration documentation.
SNMP Tools
nxsnmpget
Query SNMP metrics from network devices.
Usage:
nxsnmpget [<options>] <host> <variables>
Options
| Option | Description |
|---|---|
|
Authentication method for SNMPv3 USM: |
|
Authentication password for SNMPv3 USM |
|
Community string (default: "public") |
|
Codepage for remote system |
|
Encryption method for SNMPv3 USM: |
|
Encryption password for SNMPv3 USM |
|
Display help and exit |
|
Repeat request with given interval |
|
Path to compiled MIB file |
|
Do not load MIB tree |
|
Show numeric OIDs only |
|
SNMP agent port (default: 161) |
|
Raw output (disable display hints) |
|
User name for SNMPv3 USM |
|
SNMP version: |
|
Request timeout (default: 3 seconds) |
|
Show raw value in hex |
# Get sysDescr using SNMPv2c
nxsnmpget -c public -v 2c 127.0.0.1 .1.3.6.1.2.1.1.1.0
# Get multiple OIDs
nxsnmpget -c public -v 2c 10.0.0.1 sysDescr.0 sysUpTime.0
# SNMPv3 with authentication and encryption
nxsnmpget -v 3 -u snmpuser -a SHA256 -A authpass -e AES -E privpass 10.0.0.1 sysDescr.0
# Monitor value every 10 seconds
nxsnmpget -i 10 -c public -v 2c 10.0.0.1 ifInOctets.1
# Show raw hex value
nxsnmpget -x -c public -v 2c 10.0.0.1 .1.3.6.1.2.1.1.1.0
nxsnmpset
Set SNMP variables on network devices.
Usage:
nxsnmpset [<options>] <host> <variable>[@<type>] <value>
Options
| Option | Description |
|---|---|
|
Authentication method for SNMPv3 USM: |
|
Authentication password for SNMPv3 USM |
|
Provided value is Base64-encoded raw value |
|
Community string (default: "public") |
|
Encryption method for SNMPv3 USM: |
|
Encryption password for SNMPv3 USM |
|
Display help and exit |
|
Provided value is raw value encoded as hexadecimal string |
|
SNMP agent port (default: 161) |
|
Variable data type (default: |
|
User name for SNMPv3 USM |
|
SNMP version: |
|
Request timeout (default: 3 seconds) |
Data Types
The data type can be specified with the -t option or appended to the OID with @type:
|
32-bit signed integer |
|
Octet string (default) |
|
Object identifier |
|
IP address |
|
32-bit counter |
|
32-bit gauge |
|
Time ticks (hundredths of a second) |
|
64-bit counter |
|
32-bit unsigned integer |
# Set a string value
nxsnmpset -c private -v 2c 10.0.0.1 sysContact.0 "[email protected]"
# Set an integer value
nxsnmpset -c private -v 2c 10.0.0.1 .1.3.6.1.2.1.2.2.1.7.1@INTEGER 2
# Set using explicit type
nxsnmpset -t INTEGER -c private -v 2c 10.0.0.1 ifAdminStatus.1 2
nxsnmpwalk
Walk an SNMP MIB subtree on a network device.
Usage:
nxsnmpwalk [<options>] <host> <start_oid>
Options
| Option | Description |
|---|---|
|
Authentication method for SNMPv3 USM: |
|
Authentication password for SNMPv3 USM |
|
Community string (default: "public") |
|
Codepage for remote system |
|
Encryption method for SNMPv3 USM: |
|
Encryption password for SNMPv3 USM |
|
Display help and exit |
|
Path to compiled MIB file |
|
Do not load MIB tree |
|
SNMPv3 context name |
|
Show numeric OIDs only |
|
SNMP agent port (default: 161) |
|
Raw output (disable display hints) |
|
User name for SNMPv3 USM |
|
SNMP version: |
|
Request timeout (default: 3 seconds) |
# Walk the system subtree
nxsnmpwalk -c public -v 2c 127.0.0.1 .1.3.6.1.2.1.1
# Walk interface table
nxsnmpwalk -c public -v 2c 10.0.0.1 ifTable
# Walk with SNMPv3
nxsnmpwalk -v 3 -u snmpuser -a SHA256 -A authpass -e AES -E privpass 10.0.0.1 .1.3.6.1.2.1.1
# Walk with numeric OIDs only
nxsnmpwalk -N -c public -v 2c 10.0.0.1 .1.3.6.1.2.1.2.2
Utility Tools
nxencpasswd
Obfuscate passwords for use in NetXMS server and agent configuration files. The obfuscated password can be placed in configuration files instead of plaintext passwords.
Usage:
nxencpasswd [<options>] <login> [<password>]
nxencpasswd [<options>] -a [<password>]
Options
| Option | Description |
|---|---|
|
Obfuscate agent’s shared secret (no login required) |
|
Display help and exit |
|
Display version and exit |
| If the password is not provided on the command line, it will be prompted from the terminal (more secure, avoids shell history). |
# Obfuscate database password
nxencpasswd netxms mydbpassword
# Obfuscate agent secret (prompted)
nxencpasswd -a
nxmibc
MIB file compiler. Compiles MIB source files into the binary format used by NetXMS server. Normally MIBs are managed via the management client, but nxmibc can be used for batch operations.
Usage:
nxmibc [options] source1 ... sourceN
Options
| Option | Description |
|---|---|
|
Compile all input files (continue processing after errors) |
|
Include all MIB files from directory |
|
Specify file extensions to process (default: "mib") |
|
Display help and exit |
|
Produce machine-readable output |
|
Set output file name (default: |
|
Pause before exit |
|
Recursively scan subdirectories |
|
Strip descriptions from MIB objects (smaller output) |
|
Do not compress output file |
|
Compress output file (default behavior) |
# Compile all MIBs in a directory
nxmibc -d /usr/share/netxms/mibs -o /var/lib/netxms/netxms.cmib
# Compile specific MIB files
nxmibc -o custom.cmib MY-MIB.mib MY-OTHER-MIB.mib
# Compile with subdirectory scanning
nxmibc -r -d /usr/share/snmp/mibs -o netxms.cmib
# Compile all files, ignoring errors
nxmibc -a -d /usr/share/snmp/mibs -o netxms.cmib
nxscript
Standalone NXSL script interpreter. Executes NXSL scripts outside of the NetXMS server context. Useful for testing and developing NXSL scripts, and for converting scripts to the NXSL version 5 syntax.
Usage:
nxscript [options] script [arg1 [... argN]]
Options
| Option | Description |
|---|---|
|
Convert script to NXSL version 5 syntax |
|
Input is a binary (compiled) file |
|
Compile only (do not execute) |
|
Run script multiple times |
|
Dump compiled script code |
|
Entry point function name |
|
Show expression variables on exit |
|
Show memory usage information |
|
Show program metadata |
|
Write compiled script to file |
|
Print script return value |
|
Show list of required modules |
|
Enable instruction trace |
# Run a script
nxscript myscript.nxsl
# Convert script to NXSL v5 syntax
nxscript -5 old_script.nxsl
# Compile and dump bytecode
nxscript -c -d myscript.nxsl
# Run with arguments and print return value
nxscript -r myscript.nxsl arg1 arg2
# Compile to binary
nxscript -c -o myscript.nxslc myscript.nxsl
nxwsget
Query web services via a NetXMS agent. The agent must have EnableWebServiceProxy=yes configured. Supports JSON (jq), XML (XPath), and text (regex) extraction from HTTP responses.
Usage:
nxwsget [<options>] <host> <URL> <path> [<path> ...]
Options
In addition to the common agent options:
| Option | Description |
|---|---|
|
HTTP authentication type: |
|
Do not verify service certificate |
|
Do not verify certificate’s name against host |
|
Request body data |
|
Follow location header in 3xx redirect responses |
|
HTTP header (can be used multiple times) |
|
Query service continuously with given interval |
|
Requested parameter is a list |
|
Web service login name |
|
HTTP request method: |
|
Web service password |
|
Cache retention time |
|
Use text parsing (regex) instead of JSON/XML |
# Query JSON API and extract a field
nxwsget 127.0.0.1 "http://api.open-notify.org/astros.json" .number
# Query with authentication
nxwsget -a basic -L user -P pass 127.0.0.1 "https://api.example.com/status" .status
# Query with custom headers
nxwsget -H "Authorization: Bearer token123" 127.0.0.1 "https://api.example.com/data" .result
# POST request with data
nxwsget -m POST -d '{"key":"value"}' -H "Content-Type: application/json" 127.0.0.1 "https://api.example.com/submit" .id
# Monitor continuously every 30 seconds
nxwsget -i 30 127.0.0.1 "https://api.example.com/status" .health
# Skip certificate verification
nxwsget -c 127.0.0.1 "https://self-signed.example.com/api" .data
Other Tools
nxai
Command-line client for the NetXMS AI assistant. See AI Assistant Reference.
nxshell
Command-line tool for scripting NetXMS server operations using Python (Jython). See NXShell.