---
title: Metrics
description: Retrieve internal metrics for an InfluxDB OSS v2 instance in Prometheus exposition format.
url: https://docs.influxdata.com/influxdb/v2/api/metrics/
estimated_tokens: 1523
product: InfluxDB OSS v2
version: v2
---

[Download InfluxDB API Spec](/openapi/influxdb-oss-v2-api.yml)

Retrieve internal metrics for an InfluxDB OSS v2 instance in Prometheus exposition format.

GET `/metrics`

### Retrieve workload performance metrics

Returns metrics about the workload performance of an InfluxDB instance.

Use this endpoint to get performance, resource, and usage metrics.

#### Related guides

-   For the list of metrics categories, see [InfluxDB OSS metrics](/influxdb/v2/reference/internals/metrics/).
-   Learn how to use InfluxDB to [scrape Prometheus metrics](/influxdb/v2/write-data/developer-tools/scrape-prometheus-metrics/).
-   Learn how InfluxDB [parses the Prometheus exposition format](/influxdb/v2/reference/prometheus-metrics/).

#### Parameters

##### Header parameters

`Zap-Trace-Span` string

OpenTracing span context

Example request [Ask AI about this](#)

```sh
curl --request GET \
  "http://localhost:8086/metrics" \
  --header "Authorization: Bearer INFLUX_TOKEN"
```

#### Responses

200

Success. The response body contains metrics in [Prometheus plain-text exposition format](https://prometheus.io/docs/instrumenting/exposition_formats) Metrics contain a name, an optional set of key-value pairs, and a value.

The following descriptors precede each metric:

-   `HELP`: description of the metric
-   `TYPE`: [Prometheus metric type](https://prometheus.io/docs/concepts/metric_types/) (`counter`, `gauge`, `histogram`, or `summary`)

default Non 2XX error response from server.

`code` required string

code is the machine-readable error code.

Allowed: `internal error` , `not implemented` , `not found` , `conflict` , `invalid` , `unprocessable entity` , `empty value` , `unavailable` , `forbidden` , `too many requests` , `unauthorized` , `method not allowed` , `request too large` , `unsupported media type`

`err` string

Stack of errors that occurred during processing of the request. Useful for debugging.

`message` string

Human-readable message.

`op` string

Describes the logical code operation when the error occurred. Useful for debugging.
