Discovery Mechanism

The adapters in this package connect to the Sybase databases used by CiscoWorks LMS using JDBC, and run SQL queries to retrieve information. The Sybase database instances are used as part of the trigger for jobs in this package. This allows the jobs to be included in UCMDB's spiral discovery schedule.

The package includes the following two adapters:

  • CiscoWorks NetDevices
  • CiscoWorks Layer 2

CiscoWorks NetDevices triggers off the CiscoWorks Resource Manager Essentials database, and retrieves network devices, VLAN and layer two infrastructure from it.

CiscoWorks Layer 2 triggers off the CiscoWorks Campus Manager database, and retrieves nodes (servers). It associates them with VLANs and layer two infrastructure retrieved by CiscoWorks NetDevices.

Database queries executed by this package on the CiscoWorks databases are as follows:

Note The following query is used by the CiscoWorks NetDevices and CiscoWorks Layer 2 adapters on the RMENGDB and ANIDB database instances

Get the database name to verify that queries are run on the correct database:

SELECT db_name()

Note The following queries are used by the CiscoWorks NetDevices adapter on the RMENGDB database instance

Get a count of the number of network devices in the database (This is required to determine the number of chunks to query. For details on chunking, see Parameters.)

SELECT COUNT(1) FROM lmsdatagrp.NETWORK_DEVICES

Get information on network devices managed by CiscoWorks LMS

SELECT netdevices.Device_Id,
deviceState.NetworkElementID, netdevices.Device_Display_Name,
netdevices.Host_Name, netdevices.Device_Category,
netdevices.Device_Model, netdevices.Management_IPAddress,
deviceState.Global_State
FROM lmsdatagrp.NETWORK_DEVICES netdevices JOIN dba.DM_Dev_State
deviceState ON netdevices.Device_Id=deviceState.DCR_ID

Get additional details on each network device.

SELECT * FROM dba.PhysicalTypeEnum

SELECT ne.ElementName, ne.ReportedHostName, ne.DNSDomainName, ne.Description, ne.PrimaryOwnerContact, ne.ElementLocation, os.OSName, os.Version, os.ROMVersion, pe.Manufacturer, pe.SerialNumber
FROM dba.OperatingSystem os, dba.PhysicalElement pe, dba.networkelement ne
WHERE os.NetworkElementID=<networkDeviceID> AND ne.NetworkElementID=<networkDeviceID> AND pe.NetworkElementID=<networkDeviceID> AND LOWER(pe.PhysicalType)=<physicalType> AND pe.PhysicalElementId IN (1, 2)

Get port and VLAN information for each network device.

SELECT phyPort.PhysicalPortID, phyPort.SNMPPhysicalIndex, phyPort.ParentRelPos, port.PORT_NAME, port.PORT_DESC, port.PORT_DUPLEX_MODE, port.PORT_TYPE, port.PORT_SPEED, port.VLAN_NAME, port.VLANID, interface.EndpointID, interface.Description, interface.Alias, interface.MediaAccessAddress 
FROM lmsdatagrp.PORT_INVENTORY port JOIN dba.PhysicalPort phyPort ON port.PORT_NAME=phyPort.PortName JOIN dba.IFEntryEndpoint interface ON port.PORT_NAME=interface.EndpointName
WHERE phyPort.NetworkElementID=<networkDeviceID> AND interface.NetworkElementID=<networkDeviceID> AND port.DEVICE_ID=<networkDeviceID> AND phyPort.PortName=port.PORT_NAME

Get IP Address details for each network device.

SELECT IPAddress, SubnetMask FROM dba.IPProtocolEndPoint WHERE NetworkElementId=<networkDeviceID>

Get information on modules in each network device.

SELECT MODULE_NAME, SW_VERSION, FW_VERSION, SLOT_NUMBER FROM lmsdatagrp.MODULE_INVENTORY WHERE DEVICE_ID=<networkDeviceID>

Note The following queries are used by the CiscoWorks Layer 2 adapter on the ANIDB database instance.

Get a count of the number of nodes (servers) in the database (This is required to determine if chunking is required. See Parameters.)

SELECT COUNT(1) FROM lmsdatagrp.End_Hosts

Get information on nodes managed by or known to CiscoWorks LMS.

SELECT HostName, DeviceName, Device, MACAddress, IPAddress, 
SubnetMask, Port, PortName, VLAN, VlanId, associatedRouters
FROM lmsdatagrp.End_Hosts
WHERE HostName IS NOT NULL AND NOT HostName='' AND IPAddress IS NOT 
NULL AND NOT IPAddress=''