What's TS3:
TigerGraph System Service State (TS3) is a TigerGraph sub-system which helps monitor the TigerGraph system. It serves as backend of TigerGraph Admin Portal.
Minimum space required for auto cleanup:
Usually ts3's db file requires twice the space to get cleanup, and if for some reason if the db file is not cleaned up automatically, follow below steps to clean up old metrics.
Default clean up schedule:
By default clean up is done 0:0:0 every day
Processes:
ts3serv and ts3 are corresponding process for the DB file that was under
File location:
$ (gadmin config get System.DataRoot)/ts3/
Verify retention:
$ gadmin config get TS3.RetentionPeriodDay
Change retention if required as below:
$ gadmin config set TS3.RetentionPeriodDay 8
$ gadmin config apply
$ gadmin restart ts3serv,ts3
Main steps:
a) Stop ts3 and ts3serv
$ gadmin stop ts3serv ts3 -y
b) Verify the size and move the file to a desired location where there is atlease double to free space.
$ du -sh /tigergraph/data/ts3/db
$ mv /tigergraph/data/ts3/db /temp/location/
c) Download sqlite3 tool from official repository.
https://www.sqlite.org/download.html
File: sqlite-tools-linux-x64-3450100.zip (https://www.sqlite.org/2024/sqlite-tools-linux-x64-3450100.zip)
or
$ wget https://www.sqlite.org/2024/sqlite-tools-linux-x64-3450100.zip
d) $ unzip sqlite-tools-linux-x64-3450100.zip
e) Execute the below command by passing the temporary location of ts3 db file. (Don't use sqlite3 full path as it is throwing some error in our case, instead execute staying at unzipped location)
sqlite3 /temp/location/db -cmd "delete from datapoints where \"when\" < $(($(date +%s) - 8 * 24 * 3600)); VACUUM" .quit
f) Verify the size after above step and move back the "db" file to original location.
$ du -sh /temp/location/db
$ mv /temp/location/db /tigergraph/data/ts3/
g) Start first ts3serv and then ts3
$ gadmin start ts3serv ts3 -y
***