4

We are using api manager(2.1.0) and configured the analytics.

We have done the load testing and the event data created by analytics in the database crossed 2 GB.

Is there any way to control the size of the database. OR Is there any impact if we use the h2 database for the processed data.

We are using oracle DB

Thanks

prabhat
  • 71
  • 2

3 Answers3

1

You should purge the data periodically. You can perform data purging in analytics based on the following methods.

  • Per table data purging
  • Global data purging

You can read on how to enable data purging in here. APIM analytics runs wso2das underneath therefore you can do the same configs as mentioned in the document.

  • Hi anuruddha thanks for the reply can you let me know whether datapurging happens on all three data sources analytics_event_store,analytics_processed_data_store and stats_db .Because all the analytics data user is seeing comes from stats_db so we don't want to purge the data and we can write anx__* tables to purge – prabhat Jul 26 '17 at 02:17
  • In global purging it depends on the regex you apply ".*
    "
    – Anuruddha Lanka Liyanarachchi Jul 27 '17 at 03:56
  • ORG_WSO2_APIMGT_STATISTICS_DESTINATION table is not present in any database so why do we need to give the table name – prabhat Aug 07 '17 at 11:19
  • This table is generated at runtime. It will be generated when a created API is accessed. It is created at stats_db. – Anuruddha Lanka Liyanarachchi Aug 09 '17 at 06:31
  • we have asked the query because the table is not generated in the stat_db even after accesing the api and so basically purge delete data in stat_db but is there a way to delete data in the analytics_event_store and analytics_processed_data_store. If there is no way can I delete all the daa which are one month old? – prabhat Aug 09 '17 at 08:10
  • I want to delete summarized tables. When use ".*
    ", it didn't delete the records of summarized tables such as "API_RESOURCE_USAGE_SUMMARY. I tried purging data in this table using the management console as well. But those data was not deleted. Is there any way which I can purge summarize data?
    – Chintha May 03 '18 at 06:34
0

As far as I know, that is expected since it will store all the events when you enable analytics. But what you can do is purge the data in a periodic manner. Further having h2 in production is not recommended at all.

  • Hi thusitha thanks for the reply More data is present in analytics_event_store and analytics_processed_data_store . And the table generated are random can you tell how to purge the data – prabhat Jul 24 '17 at 05:50
0

You can always purge the data of below tables, but you shouldn't purge summarized data.

ORG_WSO2_APIMGT_STATISTICS_DESTINATION
ORG_WSO2_APIMGT_STATISTICS_FAULT
ORG_WSO2_APIMGT_STATISTICS_REQUEST
ORG_WSO2_APIMGT_STATISTICS_RESPONSE
ORG_WSO2_APIMGT_STATISTICS_WORKFLOW
ORG_WSO2_APIMGT_STATISTICS_THROTTLE
Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
  • For purge do I need to use the following command ./analytics-backup.sh -purge -table "ORG_WSO2_APIMGT_STATISTICS_DESTINATION," -tenantId -1234 -timeFrom 15-10-11-12:40:00 -timeTo 15-10-15-17:00:00 – prabhat Jul 24 '17 at 05:43
  • 1
    More data is present in analytics_event_store and analytics_processed_data_store . And the table generated are random can you tell how to purge the data – prabhat Jul 24 '17 at 05:48