Child pages
  • How to import NMIS Nodes and run discovery upon them
Skip to end of metadata
Go to start of metadata

We will shortly be shipping a perl script you can run to manually import Nodes from NMIS, along with their individual credentials and then run discovery upon each imported Node.

This script will set the configuration item "match_ip" to true. If this is not suitable for your environment, please contact Opmantek. This caveat will be removed going forward.

The script must be run on a server that contains NMIS and Open-AudIT. As such, this is a Linux only script.

The options are detailed in the script. You should not need to set any options and it should work out of the box.

The script will be located at /usr/local/omk/bin/import_into_open-audit.pl

When the script runs, if a given Node has no IP (or resolvable name) or no credentials, it will be imported however no discovery will be run upon it. You will see warnings for this in the command output.

When the script completes it will show some statistics as the example below shows.

mark@desktop:/usr/local/opmojo/bin$ ./import_into_open-audit.pl 
WARNING - No credentials generated for sun-burn, discovery will not run
WARNING - No credentials generated for eir, discovery will not run
WARNING - No IP for A_test_2, discovery will not run.
WARNING - No credentials generated for A_test_2, discovery will not run
WARNING - No credentials generated for Angmar, discovery will not run
WARNING - No IP for baldr, discovery will not run.
WARNING - No credentials generated for ping_james_router, discovery will not run
WARNING - No credentials generated for odem, discovery will not run
WARNING - No credentials generated for snotra, discovery will not run
WARNING - No credentials generated for test-ping, discovery will not run
WARNING - No credentials generated for virtual_elf, discovery will not run
WARNING - No credentials generated for very_long_host_names_which_do_not_wrap_and_make_things_difficult, discovery will not run
WARNING - No credentials generated for snorri, discovery will not run
WARNING - No credentials generated for se7en, discovery will not run
WARNING - No IP for A_test_1, discovery will not run.
WARNING - No credentials generated for A_test_1, discovery will not run
WARNING - No credentials generated for onlypigngablenocollect, discovery will not run
WARNING - No credentials generated for uburnto, discovery will not run
WARNING - No credentials generated for red-burn, discovery will not run
WARNING - No credentials generated for AroValley, discovery will not run
WARNING - No credentials generated for opmantek, discovery will not run
WARNING - No credentials generated for u18_poller, discovery will not run
WARNING - No credentials generated for debian, discovery will not run

NodeCount: 81
CredentialCount: 63
DiscoveryCount: 60
Complete


Below are the options settable by editing the script. You should not need to change these, however if you are not getting the expected output, increasing $debug to 1 or 2 may provide more detailed information.

my $conf_file = '/usr/local/omk/conf/opCommon.nmis';
my $debug = 0;
my $nodes_file = '/usr/local/nmis8/conf/Nodes.nmis';
my $url = "http://127.0.0.1/open-audit/index.php";
my $user = 'admin';

The script is attached to this wiki page.

import_into_open-audit.pl