Virtual Machine
Update Enhanced Monitoring for a virtual machine
Turn Enhanced Monitoring on or off for an existing virtual machine. Enabling records your intent and returns a one-line install_command; run that command inside the virtual machine to install the monitoring agent, which is what actually starts metrics collection. Disabling stops collection and omits install_command from the response, and leaves the agent installed so it resumes if you enable it again. Enhanced Monitoring requires a Linux image running systemd. For what the agent collects and how to read the metrics, see Enhanced Monitoring.
patch/core/virtual-machines/{vm_id}/enhanced-metrics
Request
- Base URL: https://infrahub-api.nexgencloud.com/v1
- URL: https://infrahub-api.nexgencloud.com/v1/core/virtual-machines/{vm_id}/enhanced-metrics
- Auth: API key in header api_key
Path parameters
vm_idinteger required
ID of the vm. Call the List virtual machines API to retrieve the id of an existing virtual machine.
Request body
Example request
{
"enabled": true
}Response
Enhanced metrics updated.
Example response
{
"status": true,
"message": "Enhanced metrics updated.",
"metrics": {
"enabled": true
},
"install_command": "curl -fsSL \"https://observability.hyperstack.cloud/install?runtime=systemd\" | bash"
}Changes
No recorded changes to this operation across all 1 revision of this API.