book
Article ID: 345350
calendar_today
Updated On:
Issue/Introduction
Symptoms:
How to use dmctl command for SNMPv3 device discovery in Smarts IP?
How do I add a device that supports SNMPv3 using Command line?
What is the Smarts IP dmctl command to add, delete and view a device on the pending list?
What is the Smarts IP dmctl addPending() call and how is it used?
Which parameters should I use for the dmctl addPending call?
Environment
VMware Smart Assurance - SMARTS
Resolution
The following section explains how to use dmctl to add, delete, and view a device that is accessible only through SNNPv3.
Adding a SNMPv3 device to the Pending list:
1. With EngineID, auth protocol, priv protocol, auth pass and priv pass
dmctl -s <IP Domain name> invoke ICF_TopologyManager::ICF-TopologyManager addPending "<DeviceIP>" " " "Add" "TM_USERADDED" "TM_SNMP" 161 "ICMPSNMP" "UNKNOWNADDRESSFORMAT" "SEED" "TM_USESEEDNAME" "V3" "<Username>" "<EngineID>" "<AuthProtocol>" "<PrivProtocol>" "<AuthPass>" "<PrivPass>" " " FALSE " " " " " " "0.0.0.0" "REFRESH_UNKNOWN"
Example:
dmctl -s AM-PM invoke ICF_TopologyManager::ICF-TopologyManager addPending "10.x.x.x" " " "Add" "TM_USERADDED" "TM_SNMP" 161 "ICMPSNMP" "UNKNOWNADDRESSFORMAT" "SEED" "TM_USESEEDNAME" "V3" "User1" "800000090300001DA189C3C0" "MD5" "DES" "changeme" "changeme" " " FALSE " " " " " " "0.0.0.0" "REFRESH_UNKNOWN"
2. Without EngineID & with auth protocol, priv protocol, auth pass, priv pass
dmctl -s <IP Domain name> invoke ICF_TopologyManager::ICF-TopologyManager addPending "<DeviceIP>" " " "Add" "TM_USERADDED" "TM_SNMP" 161 "ICMPSNMP" "UNKNOWNADDRESSFORMAT" "SEED" "TM_USESEEDNAME" "V3" "<Username>" " " "<AuthProtocol>" "<PrivProtocol>" "<AuthPass>" "<PrivPass>" " " FALSE " " " " " " "0.0.0.0" "REFRESH_UNKNOWN"
Example:
dmctl -s AM-PM invoke ICF_TopologyManager::ICF-TopologyManager addPending "10.x.x.x" " " "Add" "TM_USERADDED" "TM_SNMP" 161 "ICMPSNMP" "UNKNOWNADDRESSFORMAT" "SEED" "TM_USESEEDNAME" "V3" "User1" " " "MD5" "DES" "changeme" "changeme" " " FALSE " " " " " " "0.0.0.0" "REFRESH_UNKNOWN"
Note: The blank values (" ") given in above example must be entered as it is, as the addPending() is a function call in the dmctl and the blank values are part of the required syntax.
Deleting a SNMPv3 device from Pending list:
dmctl -s <IP Domain name> invoke AD_Pending::AD-Pending removePending <name or IP Address of the device>
Example: dmctl -s AM-PM invoke AD_Pending::AD-Pending removePending 10.x.x.x
Viewing a SNMPv3 device in Pending list:
dmctl -s <IP Domain name> invoke AD_Pending::AD-Pending getPendingUndiscovered
Once device is added to the pending list, to initiate Pending discovery operation via Command Line, execute below command:
sm_tpmgr -s <IP domain name> --discover-pending
Additional Information
Detailed information of the addPending() function parameters as follows:
AD_TopologyManager::addPending(const mr_string_t & nameOrAddr,
const mr_string_t & community,
const mr_string_t & description,
tm_source_e snmpSource,
tm_snmp_e snmpState,
mr_unsignedshort_t snmpPort,
tm_access_mode_e accessMode,
access_addr_format_e accessAddressFormat,
const mr_string_t & seedName,
const mr_string_t & nameFormat,
const mr_string_t & snmpVersionStr,
const mr_string_t & user,
const mr_string_t & engineID,
const mr_string_t & authProtocol,
const mr_string_t & privProtocol,
const mr_string_t & authPass,
const mr_string_t & privPass,
const mr_string_t & context,
sm_bool_t encryptedPassword,
const mr_string_t & displayName,
const mr_string_t & systemType,
const mr_string_t & domainName,
const mr_string_t & sourceAddress,
refresh_type_e refreshType)
Following are the accepted values for certain fields
tm_source_e snmpSource
/// The source of hostname or IP address
enum tm_source_e {
/// User added through import from file or add agent dialog.
TM_USERADDED,
/// IP addresses that are auto-discovered from ARP cache, CDP, etc.
TM_DISCOVERED,
/// IP addresses derived from IP address and netmask.
TM_DERIVED,
/// Hostname or IP address obtained from external sources, such HPOV.
TM_EXTERNAL,
/// Hostname or IP address obtained from external sources, such as KAFKA.
TM_STREAM_PROCESSOR
};
tm_snmp_e snmpState
enum tm_snmp_e {
/// The device is supposed to support SNMP.
TM_SNMP,
/// The device is not supposed to support SNMP.
TM_NONSNMP
};
tm_access_mode_e accessMode
enum tm_access_mode_e {
ICMPONLY,
SNMPONLY,
ICMPSNMP
};
ICMPONLY - If the device has to be discovered only through ICMP only.
SNMPONLY - If the device has to be discovered only through SNMP only.
ICMPSNMP - If the device has to be discovered by means of ICMP as well as SNMP.
access_addr_format_e accessAddressFormat
/// System access address format
enum access_addr_format_e {
UNKNOWNADDRESSFORMAT,
AUTOADDRESS,
LOOPBACKADDRESS
};
UNKNOWNADDRESSFORMAT - Specified if the user is not sure about the accessAddressFormat. Smarts will take the default values appropriately.
AUTOADDRESS - AUTOADDRESS means that all the IP addresses of a device are polled using ICMP.
LOOPBACKADDRESS - LOOPBACKADDRESS means that the discovery process uses the loopback address for both ICMP and SNMP for monitoring and discovery.
const mr_string_t & nameFormat
TM_USESEEDNAME
TM_USEDNSNAME
TM_USESYSNAME
TM_USEAUTONAME
TM_USELOOPBACK
TM_USENONPRIVATEIP
TM_USEPRIVATEIP
TM_USEAGENTADDRESS
To know more about the usage of the nameFormat parameters, refer the Smarts IP Concepts Guide.
The following set of parameters are specific for the SNMP v3:
const mr_string_t & user,
const mr_string_t & engineID,
const mr_string_t & authProtocol,
const mr_string_t & privProtocol,
const mr_string_t & authPass,
const mr_string_t & privPass
refresh_type_e refreshType
/// The enum for reprobe.
enum refresh_type_e {
REFRESH_UNKNOWN,
REFRESH_ALL,
REFRESH_PENDING,
REFRESH_SHORT
};