Determining if a device is present in both the Infrastructure and Control databases (postgres).
search cancel

Determining if a device is present in both the Infrastructure and Control databases (postgres).

book

Article ID: 331001

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

  • When device is partially removed, it will be available in controlDB and not in infraDB or vice versa.
  • When device is onboarded, overwriting of Device_IDX in infraDB howevre controlDB has different IDX.

Environment

NCM - 10.1.x

Resolution

To confirm that a device is present in the infradb:

  • Log into a Linux shell on the AS host as 'root'.
  • Set NCM related shell session variables by running the command:

              source /etc/voyence.conf 

  • 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@<HOSTNAME> ~]# source /etc/voyence.conf
[root@<HOSTNAME> ~]# $VOYENCE_HOME/cgi-bin/cflist.cgi |grep 'DEV <Device_IDX>'
DEV <Device_IDX> "<Device_Name>" ElemList= PopParent=1000 EmsParent= : UID="<Serial>" HOSTNAME="<Hostname>" DOMAINNAME="<Domain_Name>" SYSOBJECTID="<SysOID>" ADDR="<Device_IP>" PACKAGE=1460 PACKAGE_IS_SET=0 CM_MANAGED=1 CREATE_DATE=1433361854 AUTO_DISCOVERED=1 


To confirm that a device is present in the controldb

  • Log into a controldb shell on the NCM host where the controldb is installed. This can be accomplished as per instructions contained in Logging into postgresDB
  • 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 = <Device_IDX>;
 device_idx | device_name | management_ip_address | vendor_model
------------+-------------+-----------------------+--------------
 <Device_IDX>| <Device_Name> | <Device_IP       | MDS 9148
(1 row)