---
title: "Returns a list of metrics for the requested chains, and systems between a time period sorted by most recent. A number limit of metrics per source is specified."
method: POST
path: "/server/mongo/metrics"
tags: ["Mongo"]
---

# Returns a list of metrics for the requested chains, and systems between a time period sorted by most recent. A number limit of metrics per source is specified.

`POST /server/mongo/metrics`

## Request body

- MongoMetrics
  - `chains` object[]
  - `systems` object[]
  - `minTimestamp` integer
  - `maxTimestamp` integer
  - `noOfMetricsPerSource` integer

## Response `200`

OK

- MongoMetricsOverview
  - `result` object
    - `metrics` object
      - `unique_source_id` SystemMetricsMongo[]
        - `process_cpu_seconds_total` string
        - `process_memory_usage` string
        - `virtual_memory_usage` string
        - `open_file_descriptors` string
        - `system_cpu_usage` string
        - `system_ram_usage` string
        - `system_storage_usage` string
        - `network_transmit_bytes_per_second` string
        - `network_receive_bytes_per_second` string
        - `network_receive_bytes_total` string
        - `network_transmit_bytes_total` string
        - `disk_io_time_seconds_total` string
        - `disk_io_time_seconds_in_interval` string
        - `went_down_at` string
        - `timestamp` number

## Other responses

- `532` — Error: Missing key(s) in request body.
- `535` — Error: Mongo client not initialised.
- `536` — Error: Could not retrieve data from Mongo.
- `539` — Error: An invalid value was given to the parameter.

## Changes

- **2022-03-30** `b115d1f2939d` — 1 warning, 2 info
  - removed the request property `sources`
  - added the new optional request property `systems`
  - added the media type `application/json` for the response with the status `200`
- **2021-07-09** `0b3c71df3e2f` — 1 info
  - endpoint added
- **2021-07-09** `7abd9c7d6948` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/simplystaking/apis/panic-api/changes/server/mongo/metrics/post.md)

---

[API](https://skmtc.dev/simplystaking/apis/panic-api.md) · [All operations](https://skmtc.dev/simplystaking/apis/panic-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/simplystaking/panic-api/revisions/4400907a393c/schema)
