Is there a way to reconcile the groups names between PC and DA/DR? 

book

Article ID: 197990

calendar_today

Updated On:

Products

CA Infrastructure Management CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

When listing the groups in CAPM, there is a difference in the output between these two methods:

a) In PC, Administration --> Group Settings --> Groups

b) QueryBuilder
http://<DA_host>:8581/odata/api/groups?$format=text/csv&$top=20000&$skip=0&top=1000&$select=ID,Name

The information displayed in item a) is up-to-date and fine.
But the information displayed in item b) is outdated. The deleted group remains in this list and a new groups created are not visible in this list. 

Groups were added and removed in April.
On May, DR (Data Repository) Vertica DB was restored due to DR host failure. The restored data was taken at the end of March.

The QueryBuilder still shows the items that were deleted between the time the DR database was backed up and the end of March and the time when it was restored in May.

Groups created between the time the DR database was backed up at the end for March and the time it was restored in May are not displayed in QueryBuilder. 

Is there a way to reconcile the groups names between PC and DA/DR? 

Environment

Release : 3.7

Component : CA Performance Center

Resolution

Because an old backup of DR (Vertica db) was restored, there is a mismatch of Groups between the PC and DA (QueryBuilder).

Here are the steps to resolve this issue:

a) Performa a Full Resynchronization on Data Aggregator to create the missing Groups in DA.

Administration --> Data Sources --> Data Sources



Select the Data Aggregator, click on Resync button, select the "Perform a Full Resynchronization" checkbox and click on Resync button.



 

If PC groups are still not seen in DA, then the problem is there is an entry in netqosportal.item_identifiers for the groups previously pushed to DA, it will not re-create the group in the DA. DA will only create the group if the LocalID (DA side ItemID) sent in the group push response is NULL. So you may need to remove entries in item_identifiers from PC group ItemID, DA sourceID. Then update items table for the group ItemID and set UpdateOn=UNIX_TIMESTAMP() to cause it to push to DA.

Here are the steps:

1) As an example, theses two groups (Group1 and Group2) are missing in DA.

2) On the PC machine, connect to the MySQL command prompt.

mysql -uroot -p

use netqosportal

OR

mysql -uroot -p netqosportal

3) Run the following MySQL query to locate the missing group names in DA and take note of the ItemID values.

mysql> select ItemID,ItemName,ItemDesc from t_group;

NOTE: ItemID 6860 and 6861 are just an example from my test environment, you have to replace those values from your environment.

4) Run the following MySQL query to list the LocalID of the missing groups in DA of the item_identifiers table:

mysql> select ItemID,SourceID,ItemFlags,ItemTypeName,LocalID,FROM_UNIXTIME(UpdatedOn) from item_identifiers where ItemID in (6860,6861);

5) Run the following MySQL command to list the UpdateOn value of the missing groups in DA of the items table :

mysql> select ItemID,ItemFlags,ItemType,ItemSubType,FROM_UNIXTIME(UpdatedOn) from items where ItemID in (6860,6861);

6) Run the following MySQL command to remove the LocalID value of the missing groups in DA from the netqosportal.item_identifiers table:

mysql> update item_identifiers SET LocalID=NULL where itemID in (6860,6861);

7) Run the following MySQL query to confirm the LocalID values were removed from the netqosportal.item_identifiers table:

mysql> select ItemID,SourceID,ItemFlags,ItemTypeName,LocalID,FROM_UNIXTIME(UpdatedOn) from item_identifiers where ItemID in (6860,6861);

8) Run the following MySQL command to update the UpdatedOn value of the missing groups in DA to cause them to push to DA:

mysql> update items SET UpdatedOn=UNIX_TIMESTAMP() where itemID in (6860,6861); 

9) Run the following MySQL query to confirm the UpdatedOn entries were updated:

mysql> select ItemID,ItemFlags,ItemType,ItemSubType,FROM_UNIXTIME(UpdatedOn) from items where ItemID in (6860,6861);

10) Wait until the groups are re-created in DA, it would take a couple of minutes.

Run the following RESTful query on the DA to locate the re-created groups:

http://DA:8581/rest/groups

11) Once the groups were re-created in DA, run the following MySQL query to see the new LocalID values in the netqosportal.item_identifiers table:

mysql> select ItemID,SourceID,ItemFlags,ItemTypeName,LocalID,FROM_UNIXTIME(UpdatedOn) from item_identifiers where ItemID in (6860,6861);

 

b) Manually delete the group in DA (QueryBuilder output) via REStful.


1) Run this QueryBuilder:

http://<DA_host>:8581/odata/api/groups?$format=text/csv&$top=20000&$skip=0&top=1000&$select=ID,Name


Or use this RESTful query:

http://<DA_host>:8581/rest/groups

Here an example:


2) Take note of the ID value (first column of the output) - In my example is 19537.

3) Use a RESTful client to delete group ID (you can use any RESTful client, in my example, I am using the Advanced REST Client)

Download the Advanced REST Client
https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?utm_source=chrome-app-launcher-info-dialog

Launch the RESTful client

In the Request URL field, type: http://<DA_host>:8581/rest/groups/19537
In the Method field, select DELETE

Click on SEND button

You should get the200 OK result.



4) Run this QueryBuilder to confirm the Group ID in question was removed/deleted:

http://<DA_host>:8581/odata/api/groups?$format=text/csv&$top=20000&$skip=0&top=1000&$select=ID,Name

Attachments