Smarts NCM: How to determine if a device is present in both the Infrastructure and Control databases
search cancel

Smarts NCM: How to determine if a device is present in both the Infrastructure and Control databases

book

Article ID: 331001

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - NCM

Resolution

At times there may be some question as to whether or not a device is present in both the NCM PostgreSQL Control Database (controldb) as well as in the NCM Infrastructure Database (infradb - sometimes referred to as the cflist in reference to the tool used to extract a human readable dump of the infradb content). To confirm that a device is present in both databases, the NCM Client User Interface (NCM Client) can provide verification. If a device is visible in the NCM Client, and current configuration files can be pulled and viewed in the NCM Client, then the device is definitely present in both the infradb and the controldb. However, if the device is not visible in the NCM Client, but is known to have been discovered successfully, it may be present in only one of the two database. This is also possible if the device is visible in the NCM Client, but attempts to assign the device to a network or to view device configuration records following a successful pull fail. In this event, it may be necessary to verify that base records for the device are present in the infradb and the controldb manually from the Application Server (AS) and Database (DS) host Command Line Interface (CLI).

To confirm that a device is present in the infradb:

On Linux:
 

  1. Log into a Linux shell on the AS host as 'root'.
  2. Set NCM related shell session variables by running the command: source /etc/voyence.conf 
  3. Run the following command to output any record contained in the infradb the target device (where {Device IDX} is the numeric value shown in the Device ID column displayed in the NCM Client for the device, which can be made visible by right-clicking the column headers in any device list in the NCM Client, then using menus supplied to add the column to the list of columns displayed):

$VOYENCE_HOME/cgi-bin/cflist.cgi |grep 'DEV {Device IDX}'

 

For Example:
 

[root@labxxx ~]# source /etc/voyence.conf
[root@labxxx ~]# $VOYENCE_HOME/cgi-bin/cflist.cgi |grep 'DEV 1003'
DEV 1003 "vbl-mds-a" ElemList= PopParent=1000 EmsParent= : UID="AMSxxxxxx-10.x.xxx.xxx" HOSTNAME="abcxxxx.lss.emc.com" DOMAINNAME="xxx.emc.com" SYSOBJECTID="1.3.6.1.4.1.9.xx.3.1.3.xxx" ADDR="10.6.xxx.xxx" PACKAGE=1460 PACKAGE_IS_SET=0 CM_MANAGED=1 CREATE_DATE=1433361854 AUTO_DISCOVERED=1
 

On Windows:

 

  1. Log into the AS host under an account with full local administrator privileges.
  2. Open an elevated command prompt ( [Start] >> [All Programs] >> [Accessories] >> right-click [Command Prompt] >> [Run as Administrator] ).
  3. Navigate to the path of the cflist.cgi utility that distributes with NCM (where %VOYENCE_HOME% is the path where NCM is installed): cd %VOYENCE_HOME%\cgi-bin\
  4. Run the following command to create a text dump the infradb contents to file: cflist.cgi > _temp_infradb.txt
  5. Open the resulting _temp_infradb.txt output file in a text editor with appropriate search capabilities (ex.: Windows Notepad).
  6. Perform a text search to locate any infradb record for the target device using the following search string (where {Device IDX} is the numeric value shown in the Device ID column displayed in the NCM Client for the device, which can be made visible by right-clicking the column headers in any device list in the NCM Client, then using menus supplied to add the column to the list of columns displayed): 

 

DEV {Device IDX}


To confirm that a device is present in the controldb:
 

  1. Log into a controldb shell on the NCM host where the controldb is installed. This can be accomplished as per instructions contained in Dell EMC Knowledgebase Article: 323566 : Smarts NCM: How do I log into Postgres DB? (https://support.emc.com/kb/323566).
  2. Run the following Query (where {Device IDX} is the numeric value shown in the Device ID column displayed in the NCM Client, which can be made visible by right-clicking the column headers in any device list in the NCM Client, then using menus supplied to add the column to the list of columns displayed):
 
SELECT
  /* encode(device_id, 'hex') AS device_id, */
  device_idx,
  device_name,
  management_ip_address,
  vendor_model
FROM cm_device
WHERE device_idx = 
{Device IDX};


For example:

voyencedb=# SELECT
voyencedb-#   /* encode(device_id, 'hex') AS device_id, */
voyencedb-#   device_idx,
voyencedb-#   device_name,
voyencedb-#   management_ip_address,
voyencedb-#   vendor_model
voyencedb-# FROM cm_device
voyencedb-# WHERE device_idx = 1003;
 device_idx | device_name | management_ip_address | vendor_model
------------+-------------+-----------------------+--------------
       1003 | vbl-mds-a   | 10.6.xxx.xxx          | MDS 9148
(1 row)