---
type: api
title: Get flow statistics
description: Get throughput and backpressure details.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/logstash/v9/operation/operation-nodestatsflow
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/logstash/v9/operation/operation-nodestatsflow
products:
  - Logstash
---

# Get flow statistics

- Server: `/`

## Paths

- `GET` `/_node/stats/flow`

- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/logstash/v9/authentication#basicauth)

## Description

Get throughput and backpressure details.

## Query String Parameters

- `pretty` (boolean)
  If you append `?pretty=true` to the request, the JSON returned will be pretty formatted. Use it for debugging only!

## Response

Flow rates provide visibility into how a Logstash instance or an individual pipeline is currently performing relative to itself over time. This allows us to attach meaning to the cumulative-value metrics that are also presented by this API, and to determine whether an instance or pipeline is behaving better or worse than it has in the past.

The following flow rates are available for the logstash process as a whole and for each of its pipelines individually. In addition, pipelines may have [additional flow rates](https://www.elastic.co/guide/en/logstash/current/node-stats-api.html#pipeline-flow-rates) depending on their configuration.

`application/json`

- `flow` ({} FlowStatsPart1)
  - `input_throughput` ({} FlowWindows)
    This metric is expressed in events-per-second, and is the rate of events being pushed into the pipeline(s) queue(s) relative to wall-clock time (`events.in` / second). It includes events that are blocked by the queue and have not yet been accepted.
    - `current` (union number | enum)
      The most recent ~10s.
      Values: `Infinity`
    - `last_1_minute` (union number | enum)
      Values: `Infinity`
    - `last_5_minutes` (union number | enum)
      Values: `Infinity`
    - `last_15_minutes` (union number | enum)
      Values: `Infinity`
    - `last_1_hour` (union number | enum)
      Values: `Infinity`
    - `last_24_hours` (union number | enum)
      Values: `Infinity`
    - `lifetime` (union number | enum)
      The lifetime of the relevant pipeline or process.
      Values: `Infinity`
  - `filter_throughput` ({} FlowWindows)
    This metric is expressed in events-per-second, and is the rate of events flowing through the filter phase of the pipeline(s) relative to wall-clock time (`events.filtered` / second).
    - `current` (union number | enum)
      The most recent ~10s.
      Values: `Infinity`
    - `last_1_minute` (union number | enum)
      Values: `Infinity`
    - `last_5_minutes` (union number | enum)
      Values: `Infinity`
    - `last_15_minutes` (union number | enum)
      Values: `Infinity`
    - `last_1_hour` (union number | enum)
      Values: `Infinity`
    - `last_24_hours` (union number | enum)
      Values: `Infinity`
    - `lifetime` (union number | enum)
      The lifetime of the relevant pipeline or process.
      Values: `Infinity`
  - `output_throughput` ({} FlowWindows)
    This metric is expressed in events-per-second, and is the rate of events flowing through the output phase of the pipeline(s) relative to wall-clock time (`events.out` / second).
    - `current` (union number | enum)
      The most recent ~10s.
      Values: `Infinity`
    - `last_1_minute` (union number | enum)
      Values: `Infinity`
    - `last_5_minutes` (union number | enum)
      Values: `Infinity`
    - `last_15_minutes` (union number | enum)
      Values: `Infinity`
    - `last_1_hour` (union number | enum)
      Values: `Infinity`
    - `last_24_hours` (union number | enum)
      Values: `Infinity`
    - `lifetime` (union number | enum)
      The lifetime of the relevant pipeline or process.
      Values: `Infinity`
  - `queue_backpressure` ({} FlowWindows)
    This is a unitless metric representing the cumulative time spent by all inputs blocked pushing events into their pipeline’s queue, relative to wall-clock time (queue_push_duration_in_millis / millisecond). It is typically most useful when looking at the stats for an individual pipeline.

While a "zero" value indicates no back-pressure to the queue, the magnitude of this metric is highly dependent on the shape of the pipelines and their inputs. It cannot be used to compare one pipeline to another or even one process to itself if the quantity or shape of its pipelines changes. A pipeline with only one single-threaded input may contribute up to 1.00, a pipeline whose inputs have hundreds of inbound connections may contribute much higher numbers to this combined value.

Additionally, some amount of back-pressure is both normal and expected for pipelines that are pulling data, as this back-pressure allows them to slow down and pull data at a rate its downstream pipeline can tolerate.
    - `current` (union number | enum)
      The most recent ~10s.
      Values: `Infinity`
    - `last_1_minute` (union number | enum)
      Values: `Infinity`
    - `last_5_minutes` (union number | enum)
      Values: `Infinity`
    - `last_15_minutes` (union number | enum)
      Values: `Infinity`
    - `last_1_hour` (union number | enum)
      Values: `Infinity`
    - `last_24_hours` (union number | enum)
      Values: `Infinity`
    - `lifetime` (union number | enum)
      The lifetime of the relevant pipeline or process.
      Values: `Infinity`
  - `worker_concurrency` ({} FlowWindows)
    This is a unitless metric representing the cumulative time spent by all workers relative to wall-clock time (duration_in_millis / millisecond).

A pipeline is considered "saturated" when its worker_concurrency flow metric approaches its available pipeline.workers, because it indicates that all of its available workers are being kept busy. Tuning a saturated pipeline to have more workers can often work to increase that pipeline’s throughput and decrease back-pressure to its queue, unless the pipeline is experiencing back-pressure from its outputs.

A process is also considered "saturated" when its top-level worker_concurrency flow metric approaches the cumulative pipeline.workers across all pipelines, and similarly can be addressed by tuning the individual pipelines that are saturated.
    - `current` (union number | enum)
      The most recent ~10s.
      Values: `Infinity`
    - `last_1_minute` (union number | enum)
      Values: `Infinity`
    - `last_5_minutes` (union number | enum)
      Values: `Infinity`
    - `last_15_minutes` (union number | enum)
      Values: `Infinity`
    - `last_1_hour` (union number | enum)
      Values: `Infinity`
    - `last_24_hours` (union number | enum)
      Values: `Infinity`
    - `lifetime` (union number | enum)
      The lifetime of the relevant pipeline or process.
      Values: `Infinity`
## Code Examples

#### Console

```console
GET /_node/stats/flow
```

#### curl

```curl
curl -X GET "/_node/stats/flow"
```

## Response Examples

#### 200

```json
{
  "flow": {
    "input_throughput": {
      "current": 0.07381,
      "last_1_minute": 0.01572,
      "last_5_minutes": 0.01618,
      "last_15_minutes": 0.0173,
      "lifetime": 0.01701
    },
    "filter_throughput": {
      "current": 0.07379,
      "last_1_minute": 0.01572,
      "last_5_minutes": 0.01618,
      "last_15_minutes": 0.0173,
      "lifetime": 0.01701
    },
    "output_throughput": {
      "current": 0.07379,
      "last_1_minute": 0.01572,
      "last_5_minutes": 0.01618,
      "last_15_minutes": 0.0173,
      "lifetime": 0.01701
    },
    "queue_backpressure": {
      "current": 7.379E-05,
      "last_1_minute": 1.572E-05,
      "last_5_minutes": 4.532E-05,
      "last_15_minutes": 5.407E-05,
      "lifetime": 6.464E-05
    },
    "worker_concurrency": {
      "current": 0.0001476,
      "last_1_minute": 0.0001257,
      "last_5_minutes": 0.000246,
      "last_15_minutes": 0.0002941,
      "lifetime": 0.000242
    }
  }
}
```

