Smarts NCM: How to get the list of devices under each device server from the database
search cancel

Smarts NCM: How to get the list of devices under each device server from the database

book

Article ID: 331085

calendar_today

Updated On:

Products

VMware Smart Assurance

Environment

VMware Smart Assurance - NCM

Resolution

There is no relationship created in the controlDB for a device server and its associated devices.

You can however, get this information from the cflist (infraDB) as follows:

1. To extract the idx for the device server and associated devices

a) source /etc/voyence.conf
b) run the cflist command from opt/voyence/cgi-bin/ to make a copy of the cflist as follows:

./cflist.cgi > cflist.out

c) you can view the cflist.out file what you should see is similar to as follows:

HEAD RTypeList= PollTypeList= UserList= DispositionList= DeliveryList= UrlList= PopList=1000 NetList=999 :
POP 1000 "vm-smts-28-197" NetList= RsrcList= DevList=1001,1002,1003,1004,1005 EmsList= : ADDR="127.0.0.1" AGE_DAYS=730 CLEANUP_DAYS=90 AD_ENABLE=0 AD_ARPCACHE=0 AD_DFLTROUTE=0 AD_AUTO_RESOURCE=0 AD_DEFAULT_POLL=0 SNMP_TIMEOUT=500 SNMP_RETRY=3 CM_DEBUGSESSION=0 SORTCONFIG=1 CM_MAXMAINTASKS=20 CM_PULLTIMER=1200 CUTTHRU_PULLTIMER=10 MAX_COMM_ATTEMPTS="5" CM_SMGR_CACHING_ENABLED=1 CM_SMGR_SESSION_TIMEOUT=60 CM_SMGR_SESSIONS_PER_DEVICE=4 AD_BATCHSIZE=1000 AD_NUMHOP=10 AD_TIMEOUT=10 AD_LOOPCNT=2 CM_NATTEDIP_LOOKUP=1 RECORDVER="1.0"
DEV 1001 "Cisco261111111111" ElemList= PopParent=1000 EmsParent= : UID="1234" SYSOBJECTID="1.3.6.1.4.1.9.1.186" ADDR="10.64.22.39" PACKAGE=1 PACKAGE_IS_SET=0 CM_MANAGED=1 CREATE_DATE=1435042487 AUTO_DISCOVERED=1
DEV 1002 "Switch2969-163" ElemList= PopParent=1000 EmsParent= : UID="FOC1136W0VM" SYSOBJECTID="1.3.6.1.4.1.9.1.694" ADDR="10.64.22.163" PACKAGE=2 PACKAGE_IS_SET=0 CM_MANAGED=1 CREATE_DATE=1435042487 AUTO_DISCOVERED=1
DEV 1003 "dave16555" ElemList= PopParent=1000 EmsParent= : UID="FOC1138Z2UH" SYSOBJECTID="1.3.6.1.4.1.9.1.695" ADDR="10.64.22.165" PACKAGE=2 PACKAGE_IS_SET=0 CM_MANAGED=1 CREATE_DATE=1435042487 AUTO_DISCOVERED=1
DEV 1004 "conor" ElemList= PopParent=1000 EmsParent= : UID="FOC1136W13T" SYSOBJECTID="1.3.6.1.4.1.9.1.694" ADDR="10.64.22.164" PACKAGE=2 PACKAGE_IS_SET=0 CM_MANAGED=1 CREATE_DATE=1435042492 AUTO_DISCOVERED=1
DEV 1005 "Switch167" ElemList= PopParent=1000 EmsParent= : UID="FDO1139Y32M" SYSOBJECTID="1.3.6.1.4.1.9.1.516" ADDR="10.64.22.167" PACKAGE=2 PACKAGE_IS_SET=0 CM_MANAGED=1 CREATE_DATE=1435042492 AUTO_DISCOVERED=1
NET 999 "Default Network" RsrcList= PopList= :


The POP 1000 this is the idx of the device server itself

The DEV 1001 1005 are idx 1001 to 1005 these are the devices under the device server idx 1000. You can extract that info form the PopParent attribute in the device detail e.g:
DEV 1005 "Switch167" ElemList= PopParent=1000

You can also see the Device name here as well


2. You can then access the controlDB to view the details such as IP address etc:
To login into the db, as root on your db server type:

su - pgdba -c 'psql voyencedb voyence'

Then you can run commands such as :

To get data on the devices:

voyencedb=# select device_idx AS "Device ID",
voyencedb-# management_ip_address AS "IP Address"
voyencedb-# from voyence.cm_device;


Device ID | IP Address
-----------+--------------
-1 |
1002 | 10.64.22.163
1004 | 10.64.22.164
1001 | 10.64.22.39
1003 | 10.64.22.165
1005 | 10.64.22.167

To get the info on the device server:

voyencedb=# select * from cm_device_server;
device_server_id | device_server_name | device_server_idx | version

---------------------------------------------------+--------------------+-------------------+---------
\012@\034\305\2257\357?\352\370/\037N\001\000\000 | vm-smts-28-197 | 1000 | 0
(1 row)