TIBCO ActiveSpaces Grafana Dashboad - How to delete old metrics stored by InfluxDB regulary

TIBCO ActiveSpaces Grafana Dashboad - How to delete old metrics stored by InfluxDB regulary

book

Article ID: KB0071520

calendar_today

Updated On:

Products Versions
TIBCO ActiveSpaces 4.x

Description

By default ActiveSpaces metrics are not deleted from InfluxDB.

The data storage behaviour depends on the configured retention policy of the InfluxDB.
The retention behavior depends on the configured retention policy of InfluxDB.
To prevent the metrics from being stored forever, change the default retention policy of the TIBCO database.

Issue/Introduction

How to modify retention policy of InfluxDB for metrics database

Environment

All Operating Systems

Resolution

To change the retention policy, connect to the database using the influxDB utility located in the FTL server directory "$FTL_HOME/monitoring"

e.g., Store metrics for last week (1w):

export FTL_HOME=/opt/tibco/ftl/6.8
cd $FTL_HOME/monitoring
./influx
use tibco
Alter RETENTION POLICY autogen ON tibco DURATION 1w SHARD DURATION 1w REPLICATION 1;

See: https://docs.influxdata.com/influxdb/v1.8/query_language/manage-database/#modify-retention-policies-with-alter-retention-policy

Note:
The command "show shards" returns all shards and the expiration time.
e.g.,
show shards
name: tibco
id database retention_policy shard_group start_time           end_time             expiry_time          owners
-- -------- ---------------- ----------- ----------           --------             -----------          ------
6  tibco    autogen          6           2023-04-06T17:00:00Z 2023-04-06T18:00:00Z 2023-04-06T19:00:00Z
7  tibco    autogen          7           2023-04-06T18:00:00Z 2023-04-06T19:00:00Z 2023-04-06T20:00:00Z
8  tibco    autogen          8           2023-04-14T08:00:00Z 2023-04-14T09:00:00Z 2023-04-14T10:00:00Z