Recurring Analytics Services Maintenance Tasks
Edge for Private Cloud v. 4.16.09
Many Apigee Analytics Services tasks can be performed using standard Postgres utilities. The routine maintenance tasks you would perform on the Analytics database – such as database reorganization using VACUUM, reindexing and log file maintenance - are the same as those you would perform on any PostgreSQL database. Information on routine Postgres maintenance can be found at http://www.postgresql.org/docs/9.1/static/maintenance.html.
Postgres autovacuum is enabled by default, so you do not have to explicitly run the VACUUM command. Autovacuum reclaims storage by removing obsolete data from the PostgreSQL database.
Important Note: Apigee does not recommend moving the PostgreSQL database without contacting Apigee Customer Success. The Apigee system PostgreSQL database servers using their IP address, and moving the database or changing its IP address without performing corresponding updates on the Apigee environment metadata will cause undesirable results.
For more on maintaining PostgreSQL database, see http://www.postgresql.org/docs/9.1/static/maintenance.html.
No pruning is required for Cassandra. Expired tokens are automatically purged after 180 days.
Pruning Analytics Data
As the amount of analytics data available within the Apigee repository increases, you may find it desirable to "prune" the data beyond your required retention interval. Run the following command to prune data for a specific organization and environment:
> /<inst_root>/apigee/apigee-service/bin/apigee-service apigee-postgresql pg-data-purge <Org> <Env> <NoOfDaysToPurgeBackFromCurrentDate>
This command interrogates the "childfactables" table in the "analytics" schema to determine which raw data partitions cover the dates for which data pruning is to be performed, then drops those tables. Once the tables are dropped, the entries in "childfactables" related to those partitions are deleted.
Childfactables are daily-partitioned fact data. Every day new partitions are created and data gets ingested into the daily partitioned tables. So at a later point in time, when the old fact data will not be required, you can purge the respective childfactables.
If you have configured master-standby replication between Postgres servers, then you only need to run this script on the Postgres master.
Help or comments?
- If something's not working: Ask the Apigee Community or see Apigee Support.
- If something's wrong with the docs: Send Docs Feedback
(Incorrect? Unclear? Broken link? Typo?)