---
title: "Get metrics"
method: GET
path: "/api/vps/v1/virtual-machines/{virtualMachineId}/metrics"
tags: ["VPS: Virtual machine"]
---

# Get metrics

`GET /api/vps/v1/virtual-machines/{virtualMachineId}/metrics`

Retrieve historical metrics for a specified virtual machine.

It includes the following metrics: 
- CPU usage
- Memory usage
- Disk usage
- Network usage
- Uptime

Use this endpoint to monitor VPS performance and resource utilization over time.

## Path parameters

- `virtualMachineId` integer, required

## Query parameters

- `date_from` string, date-time, required
- `date_to` string, date-time, required

## Response `200`

Success response

- VPSV1MetricsMetricsCollection
  - `cpu_usage` object, nullable — CPU usage in percentage, 0 - 100%
    - `unit` string — Measurement unit
    - `usage` object — Object, containing UNIX timestamps as a key and measurement as a value.
  - `ram_usage` object, nullable — RAM usage in bytes
    - `unit` string — Measurement unit
    - `usage` object — Object, containing UNIX timestamps as a key and measurement as a value.
  - `disk_space` object, nullable — Disk space usage in bytes
    - `unit` string — Measurement unit
    - `usage` object — Object, containing UNIX timestamps as a key and measurement as a value.
  - `outgoing_traffic` object, nullable — Outgoing traffic in bytes
    - `unit` string — Measurement unit
    - `usage` object — Object, containing UNIX timestamps as a key and measurement as a value.
  - `incoming_traffic` object, nullable — Incoming traffic in bytes
    - `unit` string — Measurement unit
    - `usage` object — Object, containing UNIX timestamps as a key and measurement as a value.
  - `uptime` object, nullable — Uptime in milliseconds
    - `unit` string — Measurement unit
    - `usage` object — Object, containing UNIX timestamps as a key and measurement as a value.

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

---

[API](https://skmtc.net/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.net/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/versions/796bd5194565/schema)
