How to automatically fix missing metrics in USM

Document ID : KB000033676
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

How to automatically fix missing metrics in USM

 

Answer:

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.

User-added image


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

User-added image


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

User-added image


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;
User-added image
 

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 dropdown 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.

User-added image


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.

User-added image


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.

keywords:
How to automatically fix missing metrics in USM UMP no none metric