We just updated the vCenter to 7.0.3.01000 and now the database health API call is returning an error, though VAMI shows no issues.
When we call {{vcenter_url}}/api/appliance/health/database we get back:
{
"error_type": "INTERNAL_SERVER_ERROR",
"messages": [
{
"args": [
"[Errno 2] No such file or directory: 'dbcc': 'dbcc'"
],
"default_message": "Error in method invocation [Errno 2] No such file or directory: 'dbcc': 'dbcc'",
"id": "vapi.method.invoke.exception"
}
]
}
VMware Support have come back and said:
I am following up on this case and wondering if you are able to run the below api call instead?
https://{api_host}/rest/appliance/health/database-storage
I believe this is the same as previous but for an older version of vCenter.
https://developer.vmware.com/apis/vsphere-automation/v7.0U1/appliance/rest/appliance/health/database...
Can you please provide the output of the below command to be run on the appliance. This will confirm if the dbcc rpm installed on the vCenter.
rpm -qa | grep dbcc
It seems that dbcc has been excluded from 7.0 Update 3f onwards, including 8.0. It appears to have been removed due to a vulnerability.
From checking it does not appear that there is an alternative for this, so I am unsure how the API call is to work.
I think the question might best be placed in the communities code help page.
https://communities.vmware.com/t5/vSphere/ct-p/4572
Can it really be that the /api/appliance/health/database endpoint has been left so that it just returns an error?