sqlserver metrics are not correlated

Document ID : KB000075138
Last Modified Date : 02/04/2018
Show Technical Document Details
Issue:
Customer found below log entries in discovery_Server.log
 
27 Mar 2018 19:45:59,177 [NisImportDispatcher-3] WARN  com.nimsoft.discovery.server.ec.importer.MetricImporter - Skipping import of metric with missing parent CI: CmMetric{ metId=M920EC45F08778B201A95A5A9D6701433 ciId=CA65B215832AEADD13CC44A5C85CDDBDE type=4.2:25 }
27 Mar 2018 19:45:59,177 [NisImportDispatcher-3] WARN  com.nimsoft.discovery.server.ec.importer.MetricImporter - Skipping import of metric with missing parent CI: CmMetric{ metId=M73BC15E0C154356CC0E7ABC1CC27FB62 ciId=CE2C7F05A8E56F961BE667AD7352D2639 type=4.2:21 }
27 Mar 2018 19:45:59,177 [NisImportDispatcher-3] WARN  com.nimsoft.discovery.server.ec.importer.MetricImporter - Skipping import of metric with missing parent CI: CmMetric{ metId=M9EDA397A1DBA67929528236C9A21FC46 ciId=C593A910526802C4D1BE7DB01E500B7D3 type=4.2:25 }

and sqlserver metrics are correlated to no device.
Environment:
sqlserver 5.10-5.30
robot 7.8
 
Cause:
Discovery_server has rediscovered SQL Server cluster instance after probe configuration changes and discovery reset.  The device to which sqlserver metrics were correlated is no longer valid and a device using the virtual server name of SQL Server cluster instance is created after reset.

 
Resolution:
1. increase discovery_server log level to 5 and find this line before reported errors 

'TRACE com.nimsoft.discovery.server.ec.importer.CtdIPDeviceImporter - Beginning import of device:'

in the following json segment, you can see the device (robot) name and cs_key for you to identify the roobt hosting the metrics.

2. on this robot server identified in last step, drop local niscache folder via callback '_nis_cache_clean' or drop it manually.

3. on this robot server, restart local nimbus watcher service.

4. set null to ci_metric_id in s_qos_data table for sqlserver records probe:

update s_qos_data set ci_metric_id=null where probe ='sqlserver' and <other filter>;

deactivate&activate data_engine

5. deactivate&activate discovery_server probe.

if you find the error persists in log, wait for some time and restart discovery_server again.

Run below query to check met type and ci type are savd in the database.

select cimd.*, cid.*, cim.ci_metric_id,s.source,s.target,s.qos 
from  CM_CONFIGURATION_ITEM_METRIC_DEFINITION cimd 
join CM_CONFIGURATION_ITEM_DEFINITION cid on cid.ci_type = cimd.ci_type
join CM_CONFIGURATION_ITEM_METRIC cim on cim.ci_metric_type=cimd.met_type
left join s_qos_data s on s.ci_metric_id =  cim.ci_metric_id
where s.probe='sqlserver' 

 
Additional Information:
don't call '_restart' callback on controller, restart nimbus watcher service instead.