How to use /v2/app_usage_events for billing purpose


王小锋 <zzuwxf at gmail.com...>
 

Hi, there

I have deployed CF env in AWS, and there are some applications running on
it. I found one useful article talking about billing CF users :
https://blog.starkandwayne.com/2015/01/22/billing-your-cloud-foundry-users/.

I tried cf curl /v2/app_usage_events in my CF env, I found that I could
only retrieve app events for one month, is this exepcted? Is it able to
change the default "one month" in CF deployment manifest?

If I want to track the app usage for one org, for example org1, and org1
have one app running for more than one month, then there will be no app
usage for this long running app, then how to meter such app? Should I list
all apps available in the org currenlty, if the app is not in the app usage
event, I could image the app has been created more than one month?

Another thing, if I want to bill app usage by month, should I call
/v2/app_usage_events/destructively_purge_all_and_reseed_started_apps at the
end of each month?

Is there anyone have done similar things in the past and share your
experience? Many thanks.

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.