If there are issues with syncing Cloud Controller Database with the App Usage Apps sometimes you need to Reset Usage Service by Purging Cloud Controller Events.
This article discuss on what to expect after purging and reseeding App Usage DB.
Here are the expected behavior after Reset Usage Service by Purging Cloud Controller Events:
1.) After Reset Usage Service by Purging Cloud Controller Events the Database is empty. Please expect the App Usage Report on Apps Manager to report empty service and application usage for a few minutes to 1 hour.
2.) The Monthly Report is expected to be empty and this should be updated every 15:00 UTC everyday. Please check after 15:00 UTC if this has been updated.
3.) Login to the MySQL Database using the root credentials from this link.
mysql -u root -p
4.) Change to use the app_usage_service database
USE app_usage_service;
5.) Wait for around 5 minutes after purging. Check the following tables they should be populated per 5 minutes schedule of events
Select * from app_events_fetcher_job_run_logs;
Select * from service_events_fetcher_job_run_logs;
6.) Wait for around 1 hour after purging. You should see the first events successfully extracted around 1h after the purge and reseed. The purge and reseed will ( on CC side ) delete all currently existing STOP Events, for all currently existing START Events it will set the created_at = now
. The usage-worker on the other end uses a filter to only get events older than around 1 hour. Check the following tables they should be populated
Select * from service_usage;
Select * from app_usage;
7.) Once the apps on Step 5 & 6 gets populated you should also see values in Apps Manager Usage Report