Naveen Asapu
Naveen Asapu

Reputation: 37

How to monitor bluemix app usage using cloudfoundary/curl

I want to monitor app usage for that I am using curl command. It gives this error :

command: curl "https://api.ng.bluemix.net/v2/app_usage_events/guid-xxxxxxxxxxx" -X GET -H "Authorization: bearer eyJhbGciOiJIUxxxxxxxxxxCI6ImNmIiwiZ3JhbnRfdHlwZSI6InBhc3N3b3" -H "Cookie: "

Error: { "code": 230002, "description": "Event could not be found: guid-xxxxxxxxx", "error_code": "CF-EventNotFound" }

Upvotes: 0

Views: 119

Answers (2)

Jeff Sloyer
Jeff Sloyer

Reputation: 4964

If you want to monitor how much you are spending in Bluemix do the following.

  1. Log into Bluemix
  2. In the top right corner click on the person's head icon
  3. Click account
  4. The page that comes up will show you your monthly spend and break it down per application.

Upvotes: 0

James Thomas
James Thomas

Reputation: 4339

The App Usage Events API is only available to platform admins, not individual users.

Application users can use the Event API to access similar information.

curl "https://api.[your-domain.com]/v2/events" -X GET \
    -H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM0NyIsImVtYWlsIjoiZW1haWwtMjM4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTR9.zafzzB3szzWSzto_IjBvDpmuWvpuHfil0QNqdyM60m0" \
    -H "Host: example.org" \
    -H "Cookie: "

Upvotes: 1

Related Questions