Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 26 additions & 17 deletions pipeline/inputs/disk-io-metrics.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
# Disk I/O Metrics
# Disk I/O metrics

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_ 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.
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
## Configuration parameters

The plugin supports the following configuration parameters:

| Key | Description | Default |
| :--- | :--- | :--- |
| Interval\_Sec | Polling interval \(seconds\). | 1 |
| Interval\_NSec | Polling interval \(nanosecond\). | 0 |
| Dev\_Name | Device name to limit the target. \(e.g. sda\). If not set, _in\_disk_ gathers information from all of disks and partitions. | all disks |
| Threaded | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |
| `Interval_Sec` | Polling interval (seconds). | `1` |
| `Interval_NSec` | Polling interval (nanosecond). | `0` |
| `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 |
| `Threaded` | Indicates whether to run this input in its own [thread](../../administration/multithreading.md#inputs). | `false` |

## Getting Started
## 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
### Command line

You can run the plugin from the command line:

```bash
$ fluent-bit -i disk -o stdout
fluent-bit -i disk -o stdout
```

Which returns information like the following:

```text
Fluent Bit v1.x.x
* Copyright (C) 2019-2020 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data
Expand All @@ -37,12 +43,13 @@ Fluent Bit v1.x.x
[3] disk.0: [1485590300, {"read_size"=>0, "write_size"=>11997184}]
```

### Configuration File
### Configuration file

In your main configuration file append the following _Input_ & _Output_ sections:
In your main configuration file append the following `Input` and `Output` sections:

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

```python
[INPUT]
Name disk
Expand All @@ -53,9 +60,11 @@ In your main configuration file append the following _Input_ & _Output_ sections
Name stdout
Match *
```

{% endtab %}

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

```yaml
pipeline:
inputs:
Expand All @@ -67,10 +76,10 @@ pipeline:
- name: stdout
match: '*'
```

{% endtab %}
{% endtabs %}

Total interval (sec) = `Interval_Sec` + `(Interval_Nsec` / 1000000000)

Note: Total interval \(sec\) = Interval\_Sec + \(Interval\_Nsec / 1000000000\).

e.g. 1.5s = 1s + 500000000ns
For example: `1.5s` = `1s` + `500000000ns`