hcloud_get_server_metrics_raw
Retrieve CPU, disk, and network time-series metrics for a Hetzner Cloud server over a specified time range to monitor performance and troubleshoot resource usage.
Instructions
Get Metrics for a Server
Get Metrics for specified Server.
You must specify the type of metric to get: cpu, disk or network. You can also specify more than one type by comma separation, e.g. cpu,disk.
Depending on the type you will get different time series data
Type | Timeseries | Unit | Description |
cpu | cpu | percent | Percent CPU usage |
disk | disk.0.iops.read | iop/s | Number of read IO operations per second |
disk.0.iops.write | iop/s | Number of write IO operations per second | |
disk.0.bandwidth.read | bytes/s | Bytes read per second | |
disk.0.bandwidth.write | bytes/s | Bytes written per second | |
network | network.0.pps.in | packets/s | Public Network interface packets per second received |
network.0.pps.out | packets/s | Public Network interface packets per second sent | |
network.0.bandwidth.in | bytes/s | Public Network interface bytes/s received | |
network.0.bandwidth.out | bytes/s | Public Network interface bytes/s sent |
Note that the CPU value is not normalized to a fixed 0-100% scale. It is calculated per vCPU: a value of 100 represents full utilization on a 1-vCPU server, and 25% utilization on a 4-vCPU server. To calculate the overall CPU usage, divide the metric value by the number of vCPUs.
Metrics are available for the last 30 days only.
If you do not provide the step argument we will automatically adjust it so that a maximum of 200 samples are returned.
We limit the number of samples returned to a maximum of 500 and will adjust the step parameter accordingly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ID of the Server. | |
| end | Yes | End of period to get Metrics for (must be in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). | |
| step | No | Resolution of results in seconds. | |
| type | Yes | Type of metrics to get. | |
| start | Yes | Start of period to get Metrics for (must be in [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) format). |