How to automatically fix missing metrics in USM
search cancel

How to automatically fix missing metrics in USM


Article ID: 33676


Updated On:


DX Unified Infrastructure Management (Nimsoft / UIM) Unified Infrastructure Management for Mainframe


How to automatically fix missing metrics in USM



Applicable to all versions of CA UIM as of the date when this Article was created.



*** This is provided for customer information only.  This script is written for Microsoft SQL Server.  Similar functionality may exist in Oracle or MySQL  Writing or adapting scripts is beyond the boundaries of Support.  It is possible this document can be used as a template to write a script for those databases. ***

This should cause USM metrics to be reattached to their parent devices every 24 hours.

Setting up the SQL server job
1)  Log into your SQL server and launch Microsoft Server SQL Management Studio
2)  In the tree on the left, locate the SQL Server Agent node under Integration Services
3)  If your SQL Server Agent node has a green "play" button next to it, continue to step 6
4)  Right click on the SQL Server Agent node and click start
5)  The server will ask if you are sure that you want to start the SQL Server Agent.  Click Yes.


6)  Expand the SQL Server Agent node if it is not already
7)  Right click on the Jobs node
8)  Click New Job

9)  Give the job a name such as "Metric Fixup"


10)  Click the "Steps" page
11)  Click the New button
12)  Enter "Run SQL" in the Step name
13)  Choose your UIM database from the database drop down list
14)  Past the following SQL statement into the command window

UPDATE S_QOS_DATA SET S_QOS_DATA.ci_metric_id = NULL FROM S_QOS_DATA AS sqd LEFT JOIN CM_CONFIGURATION_ITEM_METRIC ccim ON  sqd.ci_metric_id = ccim.ci_metric_id WHERE ccim.ci_metric_id IS NULL AND sqd.ci_metric_id IS NOT NULL;

15)  Click OK
16)  Click the Schedules page
17)  Click the New button
18)  Enter "Daily Job" for the Name
19)  Choose Daily from the Occurs drop down list
20)  Enter a time that will not interfere with your daily data_engine maintenance window.  The default data_engine maintenance window is at 12:40 AM.  A good suggestion would be 12:00 AM.

21)  Click OK
22)  Click OK to save the job

Setting up data_engine
1)  RDP into your primary hub and launch Infrastructure Manager
2)  Locate the data_engine probe
3)  Right click and choose Edit
4)  In the Range section, you'll want to specify two time periods and you'll want this window to occur shortly after the SQL job runs.  A good suggestion would be the following values:

From: 00:05
To: 00:04

At first glance this seems backwards, but if the numbers were reversed, data_engine would only run for 1 minute daily.  The specified order means that data_engine will NOT run for 1 minute daily.

Once this routine is in place, missing metrics in UMP should resolve themselves every 24 hours.  If they do not, however, there may be other issues at play and these will need to be dealt with on a case by case basis with Support.


Additional Information

One of the main causes seen for metric mismatches, "missing metrics" and such, is with regard to cloning machines which already have a robot installed.

Despite this being fairly well documented and several KB's existing about it, users continue to create a "master image" with a UIM Robot already installed, and then clone this image to several machines.  This results in several robots having the same robot_device_id recorded in niscache/.robot_device_id file and this in turn causes the metric_id and dev_id for QoS/devices to be calculated the same across several robots.

The following provides an automatic solution to watch for and automatically correct robots that are duplicated due to cloning:

KB56948 : How to automatically fix missing USM robots due to cloning