Metrics are not getting truncated as per the configuration

Metrics are not getting truncated as per the configuration

book

Article ID: KB0082317

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 7.0.6

Description

Configuration:
How long do you want to keep metrics data? 30 Days 
How often do you want to run the truncate process on expired date? 1 Hour 

HOWEVER, upon doing a max and min on starttime and logintime on the metrics tables, the stanrttime seem to extend beyond 30 days.


Analysis:
Reviewed the Delete statement issue by the application. 

DELETE FROM   "VDL_METRICS"."metrics_resources_usage"
      WHERE       "nodehost" = 'stludvpcprd02.monsanto.com'
              AND "nodeport" = 9400
              AND "cluster" = 'PRD_Cluster'
              AND "starttime" <
                    TO_TIMESTAMP ('2018-02-13 19:10:15.904',
                                  'YYYY-MM-DD HH24:MI:SS.FF')

Some entries for Cluster was set to ‘NULL’ in customer environment. All those entries were ignored because of the above DELETE statement. Hence the Min(Starttime) extended beyond the 30 day mark.

Issue/Introduction

Metrics-are-not-getting-truncated-as-per-the-configuration

Resolution

Running the below command resolved the issue as the Metrics data was showing correctly thereafter. 

DELETE FROM /shared/ICC/KPI/RequestMonitor/Sources/KPI/VDL_METRICS/metrics_xxxxx WHERE
cluster is null;