...
Caveats: you can not restore a node to a server if there is already a node existing with that name, you should rename the node before dumping. This would include if the server was acting as a master and receiving the node from a remote poller.
NMIS9 Basic Operation
Run the tool with no options or -? or -h and it'll display a simple help page:
Code Block |
---|
Usage: node_admin.pl act=[action to take] [extras...]
node_admin.pl act={list|list_uuid} [node=X] [group=Y]
node_admin.pl act=show node=nodeX
node_admin.pl act={create|update} file=someFile.json
node_admin.pl act=export [format=nodes] [file=path] {node=nodeX|group=groupY} [keep_ids=0/1]
node_admin.pl act=import file=somefile.json
node_admin.pl act=import_bulk {nodes=filepath|nodeconf=dirpath}
node_admin.pl act=delete {node=nodeX|group=groupY}
node_admin.pl act=dump {node=nodeX|uuid=uuidY} file=path [everything=0/1]
node_admin.pl act=restore file=path [localise_ids=0/1]
node_admin.pl act=set node=nodeX entry.X=Y...
node_admin.pl act=mktemplate [placeholder=1/0]
node_admin.pl act=rename old=nodeX new=nodeY [entry.A=B...]
mktemplate: prints blank template for node creation,
optionally with __REPLACE_XX__ placeholder
create: requires file=NewNodeDef.json
update: updates existing node from file=someFile.json
export: exports to file=someFile (or STDOUT if no file given),
either json or as Nodes.nmis if format=nodes is given
uuid and cluster_id are NOT exported unless keep_ids is 1.
delete: only deletes if confirm=yes (in uppercase) is given,
if deletedata=true (default) then RRD files for a node are
also deleted.
show: prints a node's properties in the same format as set
with option quoted=true, show adds double-quotes where needed
set: adjust one or more node properties
restore: restores a previously dumped node's data. if
localise_ids=true (default: false), then the cluster id is rewritten
to match the local nmis installation.
extras: debug={1..9,verbose} sets debugging verbosity
extras: info=1 sets general verbosity |