Page tree
Skip to end of metadata
Go to start of metadata

This article's purpose of helping export/import bulk nodes and know how to show, create, delete, rename, dump, restore, make templates, and clean node events in a simple way to learn the CLI commands. 

What this command can do:

sudo /usr/local/nmis9/admin/ -h

Show all nodes name on the NMIS:

sudo /usr/local/nmis9/admin/ act=list

Show all nodes name and Id on the NMIS:

 sudo /usr/local/nmis9/admin/ act=list_uuid

Show the node headers on the NMIS: You can use this information to put on import node csv header.

  sudo /usr/local/nmis9/admin/ act=show node=Printer

Bulk Export all nodes on the NMIS to a file: add keep_ids=1 to export the uuid, cluster and poller.

  sudo /usr/local/nmis9/admin/ act=export file="/tmp/Nodes_export_keep_id.nmis" keep_ids=1

You can check cluster id, uuid, poller and node name:

 grep -E "display_name|id|poller"  Nodes_export_keep_id.nmis

You can check the only nodes name:

 grep -E "display_name"  Nodes_export_keep_id.nmis

Bulk import all nodes on the NMIS from a file: 

sudo /usr/local/nmis9/admin/ act=import_bulk nodes="/tmp/Nodes_export_keep_id.nmis"

Bulk import all nodes from the CSV file:

This way will enable activation on NMIS:

The best way to import from NMIS8 to NMIS9 is to create a CSV file and then copy it to NMIS9 Administration GUI ==> Add node

From your NMIS8


sudo  ./ nodes=/tmp/node_export_location2.csv

sudo ./ csv=/usr/local/nmis9/admin/node.csv verbose=1 simulate=f

sudo ./ csv=/usr/local/nmis9/admin/node.csv 

Copy a node info to a zip file: This only works for a single node.

 sudo /usr/local/nmis9/admin/ act=dump node="RokuStreamingStick" everything=1 file="/tmp/"

See the node info from zip file:


Delete a node: This only works for a single node.

sudo /usr/local/nmis9/admin/ act=delete  node="RokuStreamingStick" confirm=YES deletedata=1

Restore a node that was delete: This only works for a single node.

 sudo /usr/local/nmis9/admin/ act=restore localise_ids=1

This is an example of Delete a node and restore:

Rename a node: This only works for a single node.

 sudo /usr/local/nmis9/admin/ act=rename old=RokuStreamingStick new=Roku_stick

On this example you can see the new node Roku_stick: 

 sudo /usr/local/nmis9/admin/ act=list_uuid

Create a template node: This only works for a single node.

  sudo /usr/local/nmis9/admin/ act=mktemplate placeholder=1 file="/tmp/template.json"

You can see the template node:

  cat template.json

Make a copy of the template to create a new node:

 cp template.json my_new_paradise.json

Fill out the information replacing the template node (See example below): 

vim my_new_paradise.json


   "activated" :{



   "cluster_id" : "7c1084fe-5f66-4b3b-8a3b-6e58cc8aff4f",

   "configuration" : {

      "authkey" : "",

      "authpassword" : "",

      "authprotocol" : "md5",

      "collect" : 1,

      "community" : "nmisGig8",

      "group" : "NMIS9",

      "host" : "",

      "location" : "Default Location",

      "model" : "automatic",

      "netType" : "default",

      "notes" : "",

      "ping" : 1,

      "port" : 161,

      "privkey" : "",

      "privpassword" : "",

      "privprotocol" : "des",

      "roleType" : "default",

      "threshold" :1,

      "username" : "",

      "version" : "snmpv2c"


   "name" : "My_new_paradise",

   "uuid" : ""


Create a new node based on the modified template: remember that the node name is inside the file. In this example My_new_paradise

sudo /usr/local/nmis9/admin/ act=create  file="/tmp/my_new_paradise.json"

You can see the new node created:

 sudo /usr/local/nmis9/admin/ act=list_uuid

Clear the node events: This only works for a single node. You can clear by node name or by ID.

 sudo /usr/local/nmis9/admin/ act=clean-node-events node=My_new_paradise

sudo /usr/local/nmis9/admin/ act=clean-node-events uuid=95bc5b15-afbb-4ea0-a899-5e7026a56d4d

  • No labels