# Disk I/O metrics

{% hint style="info" %}
**Supported event types:** `logs`
{% endhint %}

The *Disk* input plugin gathers the information about the disk throughput of the running system every certain interval of time and reports them.

The *Disk I/O metrics* plugin creates metrics that are log-based, such as JSON payload. For Prometheus-based metrics, see the Node Exporter Metrics input plugin.

## Configuration parameters

The plugin supports the following configuration parameters:

| Key             | Description                                                                                                                       | Default   |
| --------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `dev_name`      | Device name to limit the target (for example, `sda`). If not set, `in_disk` gathers information from all of disks and partitions. | all disks |
| `interval_nsec` | Polling interval in nanoseconds.                                                                                                  | `0`       |
| `interval_sec`  | Polling interval in seconds.                                                                                                      | `1`       |
| `threaded`      | Indicates whether to run this input in its own [thread](/manual/administration/multithreading.md#inputs).                         | `false`   |

## Get started

In order to get disk usage from your system, you can run the plugin from the command line or through the configuration file:

### Command line

You can run the plugin from the command line:

```shell
fluent-bit -i disk -o stdout
```

Which returns information like the following:

```
...
[0] disk.0: [1485590297, {"read_size"=>0, "write_size"=>0}]
[1] disk.0: [1485590298, {"read_size"=>0, "write_size"=>0}]
[2] disk.0: [1485590299, {"read_size"=>0, "write_size"=>0}]
[3] disk.0: [1485590300, {"read_size"=>0, "write_size"=>11997184}]
...
```

### Configuration file

In your main configuration file append the following:

{% tabs %}
{% tab title="fluent-bit.yaml" %}

```yaml
pipeline:
  inputs:
    - name: disk
      tag: disk
      interval_sec: 1
      interval_nsec: 0

  outputs:
    - name: stdout
      match: '*'
```

{% endtab %}

{% tab title="fluent-bit.conf" %}

```
[INPUT]
  Name          disk
  Tag           disk
  Interval_Sec  1
  Interval_Nsec 0

[OUTPUT]
  Name   stdout
  Match  *
```

{% endtab %}
{% endtabs %}

Total interval (sec) = `interval_sec` + (`interval_nsec` / 1000000000)

For example: `1.5s` = `1s` + `500000000ns`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fluentbit.io/manual/data-pipeline/inputs/disk-io-metrics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
