How do we determine which devices are or aren't synchronized to the DX NetOps Portal server from the Data Sources?
Environment
All supported DX NetOps Performance Management releases
Cause
There is no way in the Portal web UI to determine which Data Sources have contributed a device to the inventory.
Resolution
There are a number of ways to approach this. One or more methods may be needed for your given situation. They are listed in no particular order.
NOTES:
When IPs are different between device items, unless both the DA and Spectrum have named the device the same, we won't be able to find duplicates across IP Domains or inside an IP Domain. Hopefully the instances of those items is rare.
Not all items/models end up synced between systems. Best to focus on the device level as a starting point.
The below MySql select statements are to be on the Portal CLI.
Run this as the Portal install owner to start a MySql CLI connection.
Default path shown, edit as needed.
Enter password when prompted.
/opt/CA/MySql/bin/msyql -uroot -p
Once connected run this to set the netqosportal DB as the one the queries run in.
use netqosportal
After that run the queries below.
Devices with same IP but different name.
Sorts results by IP address.
First pass from t_device table.
Shows devices but not data sources that contributed them.
select ItemID,SourceID,ItemSubType,DomainID,ItemName,ItemDesc,inet6_ntoa(Address),DisplayName,AlternateName,GatewayUUID,SdnID from t_device where address in (select address from t_device group by address having count(*) > 1) order by Address\G
Alternative for the dst_device table. This shows the entries per Data Source sourceid.
select ItemID,SourceID,ItemSubType,DomainID,ItemName,ItemDesc,inet6_ntoa(Address),DisplayName,AlternateName,GatewayUUID,SdnID from dst_device where address in (select address from t_device group by address having count(*) > 1) order by Address\G
Devices with same name but different IP.
Will show items with same name/same IP and same name/diff IP.
From dst_device table to show different sourceid values.
select ItemID,SourceID,ItemSubType,DomainID,ItemName,ItemDesc,inet6_ntoa(Address),DisplayName,AlternateName,GatewayUUID,SdnID from dst_device where ItemName in (select ItemName from dst_device group by ItemName having count(*) > 1) order by ItemName\G
How to review the sourceid to Data Source mapping:
select SourceID,ConsoleName from data_sources2;
How do I know if a Spectrum model is properly synchronized from the OneClick UI?
Models synced from Spectrum to Portal receive the Portal Item_ID.
It's set against the CAPCItemID Attribute on properly synced models.
Use a Locater search to find models without that attribute set.
If not set for a given device it's either not synced with Portal, or synced incorrectly in some way.
General reviews of which devices are coming in from the various Data Sources
When a single DS contributes a device to Portal it's added to the netqosportal.t_device table and the DS SourceID is set with the DS that sent it.
When a second DS contributes the same device, maybe Spectrum sends it first then the DA second, the SourceID for the t_device entry is set to NULL. Then both items with the specific SourceID are added to the netqosportal.dst_device table.
They're reconciled with a Portal ItemID value they share, while each retains its local Item_ID (DA) and model_handle (Spec) in the dst_device tables LocalID column.
Any t_device entry with SourceID NULL says it's contributed by 2 or more DS's.
Any t_device entry with a specific SourceID value has been contributed to Portal Inventory from only that DS.Rules for this effort:
MySql queries to use:
Devices with NULL SourceID in t_device indicating 2 or more DS's provided an instance of the device.
select ItemID,SourceID,DomainID,ItemName,ItemDesc,inet6_ntoa(Address),DisplayName,AlternateName,GatewayUUID,SdnID from t_device where SourceID is NULL\G
Determine the DS SourceIDs:
select SourceID,ConsoleName from data_sources2;
Then use the IDs to list devices per SourceID.
select ItemID,SourceID,DomainID,ItemName,ItemDesc,inet6_ntoa(Address),DisplayName,AlternateName,GatewayUUID,SdnID from t_device where SourceID=<ID>\G