Smarts NCM: How to identify unclassified devices from an NCM Database? How can I get a count of unclassified devices?
search cancel

Smarts NCM: How to identify unclassified devices from an NCM Database? How can I get a count of unclassified devices?

book

Article ID: 331039

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - NCM

Resolution

How to find the unclassified device count and the devices which are unclassified from the Database



To login to DB:

In Linux: See Screen Shot below
Log into the database server as a user with root privileges.
a. Navigate to the PostgreSQL directory using the following command.

[Product home]\db\controldb\
b. Shift to pgdba user by typing "su - pgdba"
c. Type "psql voyencedb voyence", and press Enter.
d. NCM 9.x or later will require you to enter your database password. (this password was setup when you configured NCM)



In Windows:
Log into the database server as a user with administrator privileges.
a. Open a command prompt (run as administrator)
b. Navigate to the PostgreSQL directory using the following command.
[Product home]\db\controldb\bin
c. Type psql -p 5435 voyencedb voyence, and press Enter.
d. NCM 9.x or later will require you to enter your database password. (this password was setup when you configured NCM)

Below are the two DB queries for getting the unclassfied device count and names.
1) select count(*),device_status from cm_device group by device_status;
2) select device_name,device_idx,management_ip_address,fully_qualified_name from cm_device where device_status like 'enum.deviceStatus.unclassified';

Example:
voyencedb=# select count(*),device_status from cm_device group by device_status;
count |         device_status
-------+--------------------------------
     1 | enum.deviceStatus.unclassified
     1 | enum.deviceStatus.unconfigured
     2 | enum.deviceStatus.operational
(3 rows)

voyencedb=# select device_name,device_idx,management_ip_address,fully_qualified_name from cm_device where device_status like 'enum.deviceStatus.unclassified';
device_name | device_idx | management_ip_address | fully_qualified_name
-------------+------------+-----------------------+----------------------
device1    |       1001 | x.x.x.x          | device1.lss.emc.com
(1 row)