You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by John Wong <go...@gmail.com> on 2015/10/03 22:59:30 UTC

Manually expire OpsCenter metric data in cassandra

Hi.

I am using Cassandra 1.2.15 and OpsCenter 5.0.2 (non-enterprise). We are
planning to upgrade in the upcoming week.

I found some old opscenter tables still lurking around.

/mnt/data/OpsCenter# du -h
68K    ./events_timeline
18M    ./rollups86400
172K    ./pdps
269M    ./rollups7200
68K    ./events
4.0K    ./bestpractice_results
228K    ./settings
5.0G    ./rollups300
28G    ./rollups60
34G    .

and if we look at rollups60

/mnt/data/OpsCenter/rollups60# ll
total 29195188
drwxr-xr-x  2 cassandra cassandra      20480 Oct  3 19:59 ./
drwxr-xr-x 11 cassandra cassandra       4096 Jun 13 04:54 ../
-rw-r--r--  1 cassandra cassandra    1064886 Jul 15 01:33
OpsCenter-rollups60-ic-212-CompressionInfo.db
-rw-r--r--  1 cassandra cassandra 2980474664 Jul 15 01:33
OpsCenter-rollups60-ic-212-Data.db
-rw-r--r--  1 cassandra cassandra       1776 Jul 15 01:33
OpsCenter-rollups60-ic-212-Filter.db
-rw-r--r--  1 cassandra cassandra    2002960 Jul 15 01:33
OpsCenter-rollups60-ic-212-Index.db
....
-rw-r--r--  1 cassandra cassandra 5706306736 Oct  3 20:42
OpsCenter-rollups60-tmp-ic-672-Data.db
-rw-r--r--  1 cassandra cassandra    3670016 Oct  3 20:42
OpsCenter-rollups60-tmp-ic-672-Index.db


But we have been using the expire technique as described in
http://docs.datastax.com/en/opscenter/5.1/opsc/configure/opscChangingPerformanceDataExpiration_t.html#opsc_changing_performance_data_expiration_times_t__clusternameconf_unique_1
.

Our config is expire 2 hour after 28 days.
[cassandra_metrics]
1min_ttl = 86400
5min_ttl = 604800
2hr_ttl = 2419200

Looking at one of the rollup tables:

cqlsh:OpsCenter> select * from rollups300 limit 10;

 key                                                                |
column1   | value
--------------------------------------------------------------------+-----------+----------------------------
 10.0.1.1-SOME_CF-notifications-getRecentBloomFilterFalseRatio | 703578847
| 0x000000000000000000000000
 10.0.1.1-SOME_CF-getRecentBloomFilterFalseRatio | 703579147 |
0x000000000000000000000000
....

Here is my TTL query:
cqlsh:OpsCenter> select TTL (value) from rollups300 limit 2;

 ttl(value)
------------
     604500
     604194

I can see TTL is going down each time I query.

How do I expire these rolllup data myself? Or to be exactly, why do I still
have data from July? Also, how can I confirm the TTL is actually set and
working?
I am okay with truncating the entire keyspace once but I'd like to know if
there are more granular options in case this occurs again.

Thanks.
John