wso2wso2-api-managerwso2-bam

Remove old statistics from MySql in WSO2 BAM


I am running the WSO2 API Manager which is then posting it's stats to BAM. However the usage stats per subscriber per API call is taking ages and eating up large amount of CPU. I am guessing since unlike most calls it is not date based the data is to large and I was wondering as I use MySql as the DB for BAM if there is a way to wipe data from it. I have found a few ways to clear the Casandra on BAM but nothing about also clearing the statistics from MySql

Thanks


Solution

  • If you don't need your old data you can simply drop the column families related to apim_stat in cassandra. And then you can delete data from apim_stat tables

    API_DESTINATION_SUMMARY
    API_FAULT_SUMMARY
    API_REQUEST_SUMMARY
    API_RESPONSE_SUMMARY
    API_Resource_USAGE_SUMMARY API_THROTTLED_OUT_SUMMARY
    API_VERSION_USAGE_SUMMARY