Versions Compared

Key

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

Table of Contents

Table of Contents

NMIS provides a number of different methods for managing your nodes, both GUI-based and commandline-oriented. This document describes the commandline tools present in versions 8.5.4 and newer.

Related Documentation

Import nodes to NMIS9 from NMIS8

...

The creation of nodes requires you to use a template (shown below) instead of using a command line argument; this . This is because NMIS requires numerous node properties to be set up correctly making it easy to miss some when operating via command line arguments. Node creation is triggered by the argument act=create, which behaves mostly like act=update, except that it doesn't touch existing nodes. To help you with starting a node configuration document from scratch (or in a scripted fashion), there is another command, act=mktemplate, which prints a blank but documented template which you can save and fill in. If you add placeholder=1 to the command line, then node_admin fills the template with easily matchable replacement placeholders, like so:

...

To restore a node to the same poller you would not need to use the localise_ids option, if . If you wanted to copy/migrate the node to another server you would need to localise the ids so that the poller thinks it the node belongs to it. 

When the below command is executed, you will overwrite the previous cluster_id with the cluster_id of the NMIS server you are migrating/copying the node to.

Code Block
/usr/local/nmis9/admin/node_admin.pl act=restore file=NODENAME-dump.zip localise_ids=1true

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 Primary and receiving the node from a remote poller.

...

  • 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. Also, the cluster_id needs to be specified in the json node data, and match with the server_id from the poller. Please notice this action is not online, please check the opHA guide for further details
  • 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

Invalid server!

When creating/updating a node, nmis9 does not have this node registered. 

This can be fixed in opHA, editing the peer.

Related Topics