Search code examples
thingsboard

How to remove old events from Thingsboard?


What should I do to properly remove 'event' entries from Thingsboard?

As far as I know, the current API does not provide a way to remove events. It seems like the only way is to directly delete the records in DB.

By the way, I'm using PostgreSQL as DB.


Solution

  • Your assumption is correct. You will need to execute a SQL script to cleanup the "events" table. I must note that for Cassandra DB we already have "cassandra.query. ts_key_value_ttl" and "cassandra.query.events_ttl" configuration parameter to automate this process.