Problem
Unable to monitor the health of VMware Chargeback and check if the application is up and running.
Solution
You can use the API from VMware Chargeback to monitor the health of the dockers running in the VMware Chargeback.
- If you do not have a token, then enter the command, GET : https://<vmware-chargeback-ip>/ui. A document is displayed as response. If the response code is 200, then we can conclude that the vmware-chargeback-ui container is up and running.
- If you have a token, then enter the command, POST: https://<vmware-chargeback-ip>/suite-api/api/auth/token/acquire
{ "username": "<admi-username>", "password": "<admin-password>" }The following response is displayed:{ "token": "string", "validity": 0, "expiresAt": "string", "roles": [ "string" ] } - For self-health check of VMware Chargeback, enter the command, GET : https://<vmware-chargeback-ip>/vmware-chargeback-api/services and enter the token that you acquired in the header as
"Authorization": "vRealizeOpsToken <token>"
The list of all services in VMware Chargeback along with the status will be displayed.