Health Dashboard - Violations - Missing Violations - Added and Removed Critical Violations are showing NA
Description
This page provides the solution for the issue of empty tiles coming on the HD for Added and Removed Critical Violations even though there are values displayed for these metrics on CED.
Please refer to the below screenshots to get a better idea about the issue:


Observed in CAST AIP
| Release | Yes/No |
|---|---|
| 8.3.x | ❌ |
| 8.2.x | ✅ |
| 8.1.x | ✅ |
| 8.0.x | ✅ |
| 7.3.x | ✅ |
Observed on RDBMS
| RDBMS | Yes/No |
|---|---|
| Oracle Server | ❌ |
| Microsoft SQL Server | ❌ |
| CSS3 | ✅ |
| CSS2 | ✅ |
Step by Step Scenario
Below is the step-by-step scenario leading to the problem:
- Take a snapshot of an application.
- Then consolidate the snapshot from central schema to measurement schema.
- Configure the custom tiles of Added and Removed Critical Violations in app.json and cmp.json file of HD.
- Open HD and see the tiles returning empty results.
Impact of the Problem
The impact of the problem on the analysis or the dashboard is: The HD User won’t be able to see Added and Removed Critical Violations on HD.
Action Plan
To fix the problem, proceed as follows:
Open the SQL Editor in pgAdmin and run the below query on measure schema.
select * from dss_objects where object_type_id = -102
The above query will return the list of the applications that are available in the measure schema. Below is an example:
**Query Result**
7;-102;"j2ee-oracle";"";"j2ee-oracle"
19;-102;"PHP";"";"TestApp"
23;-102;"LienCS\_test";"";"LienCS"
2. Copy the object\_id of the application for which the Critical Violations (Added/Removed) are to be inserted.
3. Then Run the below query :
```sql
insert into DSS_METRIC_RESULTS
select h.METRIC_ID,<object_id>,1,
(select METRIC_NUM_VALUE from DSS_METRIC_RESULTS
where METRIC_ID = h.METRIC_ID and OBJECT_ID = <object_id> and SNAPSHOT_ID = h.SNAPSHOT_ID and METRIC_VALUE_INDEX = 60017),'null',0,h.SNAPSHOT_ID,0
from DSS_METRIC_HISTO_TREE h
where h.METRIC_ID in (67901,67902)
67901 and 67902 are the Metric ID's of Added and Removed Critical Violations respectively.
Replace the <object_id> with the object_id that the 1st query returns.
For example :
insert into DSS_METRIC_RESULTS select h.METRIC_ID,7,1, (select METRIC_NUM_VALUE from DSS_METRIC_RESULTS where METRIC_ID = h.METRIC_ID and OBJECT_ID = 7 and SNAPSHOT_ID = h.SNAPSHOT_ID and METRIC_VALUE_INDEX = 60017),’null’,0,h.SNAPSHOT_ID,0 from DSS_METRIC_HISTO_TREE h where h.METRIC_ID in (67901,67902)
5. After applying the above mentioned workaround, reload the cache of browser and open HD. Below is a screenshot showing that the issue is not occurring anymore:

**Impact of the Solution**
The impact of the solution on the dashboard is: The user will be able to see the values on dashboard.
**Notes/comments**
Ticket # 6833
This is a bug which has been fixed in CAST 8.3.x and above.
**Related Pages**