Overview
node_admin.pl is the command-line tool for managing NMIS nodes - creating, updating, deleting, importing, and exporting node configurations.
Location: ~/admin/node_admin.pl
Version: 9.5.1
Command-Line Options
Set debugging level (0-9).
Display help information and exit.
Suppress non-essential output.
Suppress warnings when server role is not Standalone.
Display usage information and exit.
Display version information and exit.
Server Role Restrictions
The tool displays a warning when run on non-Standalone servers (PRIMARY/POLLER). Useskip_ha_warnings=1 to suppress.
Node Management Operations
create
Create a new node from a JSON definition file.Path to JSON file containing node definition.
Target server name or cluster_id for remote poller.
Schedule the operation instead of executing immediately.
Job priority (0-1) when scheduled.
Logging level:
debug, info, warn, error, or fatal.update
Update an existing node from a JSON file. If no UUID is present, creates a new node.Path to JSON file containing node configuration.
If a property is not set in the file, it will be removed from the node. Use
act=set to update only specific properties.delete
Delete one or more nodes.Node name(s) - comma-separated for multiple.
Node UUID(s) - comma-separated for multiple.
Node group(s) - comma-separated for multiple.
Must be
YES (uppercase) to confirm deletion.Also delete RRD files for the node.
set
Update specific properties for one or more nodes.Properties to set. Format:
entry.<section>.<property>=<value>Common sections:entry.configuration.*- Node configurationentry.overrides.*- Node overridesentry.activated.*- Activation statusentry.addresses.*- IP addresses (array)entry.aliases.*- Node aliases (array)entry.comments.*- Comments (array)entry.unknown.*- Custom properties
Use
entry.configuration.active=<true|false> which is translated to entry.activated.NMIS for backwards compatibility.unset
Remove specific properties from one or more nodes.rename
Rename a node.Current node name (use
old or uuid).Node UUID (use
old or uuid).New node name.
Data Import/Export
export
Export node configurations to a file.Node name to export.
Node UUID to export.
Export all nodes in group.
Output file path. Use
- for STDOUT. If omitted, outputs to STDOUT.Export format:
nodes for NMIS8 legacy format (default is NMIS9 JSON).Include
uuid and cluster_id in export (normally removed).Overwrite existing file.
import
Import node configurations from a JSON file.Path to JSON file (single node object or array of nodes).
Import will create new nodes or update existing ones based on UUID. If a node with the same name exists but no UUID is provided, import will fail.
import_bulk
Bulk import from NMIS8 format files.Path to nodes file (NMIS8 format or JSON array).
Path to directory containing node override JSON files.
Nodes file is in NMIS9 JSON format.
Number of nodes to process before pausing.
Seconds to pause after processing
bulk_number nodes.dump
Create a complete backup dump of a node (config + data).Node name (use
node or uuid).Node UUID (use
node or uuid).Path to dump file.
Include all historic events, unlimited opstatus data, and RRD files.Default limits:
- Historic events: excluded
- Opstatus records: 1000 most recent
- RRD data: excluded
restore
Restore a node from a dump file.Path to dump file created by
act=dump.Rewrite
cluster_id to match local NMIS installation.Query Operations
show
Display node properties.Node name (use
node or uuid).Node UUID (use
node or uuid).Add double-quotes around values with special characters.
Display interface information.
Display all inventory data.
Display only catchall inventory data.
list (or list_uuid)
List nodes in the system.Filter by node name(s) - comma-separated.
Filter by UUID(s) - comma-separated.
Filter by group(s) - comma-separated.
Include UUID in output.
Include group in output.
Include poller/cluster_id in output.
Include active/collect status.
Output format:
json (default is text table).Write output to file (use
- for STDOUT).Overwrite existing file.
Template Operations
mktemplate
Generate a blank node template.Use
__REPLACE_XX__ placeholders instead of empty values.Maintenance Operations
clean-node-events
Clean up events for a specific node.move-nmis8-rrd-files
Migrate RRD files from NMIS8 structure to NMIS9.Node name or
ALL for all nodes.Delete old RRD files after successful move.
Force move even if files exist at destination.
validate-node-inventory
Validate and optionally fix node inventory data.Validate specific inventory concept (e.g.,
interface, device).Show what would be changed without making changes.
Mark invalid inventory as historic.
JSON Output Format
Node Export Structure (NMIS9)
List Output (JSON)
Exit Codes
- 0: Success
- 1: Error or no matching nodes found
- 2: Help displayed
Examples
Complete Node Lifecycle
Bulk Operations
Migration Scenario
See Also
- nmis-cli - System-level operations
- model_tool.pl - Model development
- NMIS Node Configuration Guide
- NMIS Data Model Documentation