Smarts NCM: How to perform autodiscovery in NCM using Command Line?
search cancel

Smarts NCM: How to perform autodiscovery in NCM using Command Line?

book

Article ID: 331164

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - NCM

Resolution

How to do auto discovery of Devices in NCM via command line?



Navigate to $VOYENCE_HOME/tools/bulk-import, and press Enter.

1. At the command prompt, enter runCmd.sh, then press Enter.
 For Windows, enter runCmd.pl, then press Enter. 

 
 At the next command prompt, enter your User Name and Password.  See the following prompts:  
 Enter User Name: where you then enter the user name 
 Enter Password: where you enter the password
 
 
This is the same User Name and Password you use to access the NCM application. The Command Line Interface feature is now started by displaying a command prompt.
cmd>. 

2. Here is the auto discovery Command you need to enter:
seedAD <network name> <device server name> <Discovery type> hostfile <credentials>
 
3. Make sure the format and syntax is exactly as shown in the following example. 
cmd > seedAD Cust-1 devserver1 ping-sweep hosts "global:Acct-1,ppwd"

NOTES:
Discovery type can be one of the following:
- ping-sweep
- snmp-sweep
Hostfile is a tab separated format, similar to /etc/hosts. See examples.tar in the $VOYENCE_HOME/tools/bulk-import directory to see examples.   
Credentials can be either global/network credentials.  
- global - global credentials have a global: prefix.
- Network - network credentials are those that belong to the network provided in the command
If the credential names (in either global or network) contains any spaces or other special characters, you must enclose the name using double quotes ("). For example, if the global name is global: cred name, cred name2, then the name would be entered as: "global:cred name,cred name2".

- If you have multiple credentials to be entered, you will need to add the credentials using below command and attached file  
cmd> importCredentials global input-file.csv false
 
Fill all credentials in attached .csv file and place the file in <Basedir>/smarts-ncm/tools/bulk-import.



Ex: 
cmd > importCredentials global input-file.csv false
Creating Account:Account2
Creating Privilege Password:Privilege2
Creating Community String:SNMP5
Creating Community String:SNMP6

Creating Community String:SNMP7

 4. Press Enter.
Here is the output you will see on executing this command:

             Added the CS:MSP-CSto AD
             Added the Account:Account 1to AD

**************AD Entry Details************

NameAUTODISC-CMDLINE-Tue Sep 28 11:32:20 CDT 2004

Account Identities[Account 1]

CS Identities[MSP-CS]

**************AD Entry Details************ 



Ex:
cmd > seedAD Test bngsmartsncm1.lss.emc.com snmp-sweep hosts "global:Account2,global:Privilege2,global:SNMP5,global:SNMP6,global:SNMP7"
Added the Account:Account2 to AD
Added the PrivPass:Privilege2 to AD
Added the CS:SNMP5 to AD
Added the CS:SNMP6 to AD
Added the CS:SNMP7 to AD
**************AD Entry Details************
NameAUTODISC-CMDLINE-Tue Sep 16 22:44:03 IST 2014
Account Identities: Account2
PrivPass Identities: Privilege2
CS Identities: SNMP5,SNMP6,SNMP7
SnmpV3 Identities:
 
**************AD Entry Details************
cmd >

5. In a separate telnet window, verify your command results by entering change directory (cd) to $VOYENCE_HOME/logs, then pressing Enter. The log file review is commandLineUtil.log. You can also go to the System Administrator screens (in Network Configuration Manager) to verify Auto Discovery.

Ex:

 

6. If you have completed command line auto discovery and no further actions are needed, enter quit at the command line, then press Enter. You are now logged off of Network Configuration Manager.



Attachments

input-file.csv get_app