Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

FAQ

Cluster and server mismatch!

When creating/updating a node, there are a couple of reasons this message can appear:

  • Server parameter is specified: The parameter is used if we want to send the node to a remote peer, and is optional. If the server does not exist (This is not the local server or this is not from any of the opHA peers), we will see this message. 
  • The json from the node includes a cluster_id which does not exist. Doesn't exist has the same meaning as above. If the cluster_id is not specified in the node data, nmis9 will import the node with the local cluster_id, which means, we can also omit that parameter.

Status
colourYellow
titleTIP
 To create a json template for a node, we can use ./node_admin.pl act=mktemplate placeholder=1

Related Topics