From 360ae308c3c886f93f0a87eab7dc8c13774e131c Mon Sep 17 00:00:00 2001 From: Takahiro YAMASHITA Date: Sat, 28 Jan 2017 17:10:56 +0900 Subject: [PATCH] in_disk: add new documentation about in_disk Signed-off-by: Takahiro YAMASHITA --- SUMMARY.md | 1 + input/README.md | 1 + input/disk.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 input/disk.md diff --git a/SUMMARY.md b/SUMMARY.md index 8a8cedfe022..aab9be08ce4 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -20,6 +20,7 @@ * [TLS / SSL](getting_started/tls_ssl.md) * [Input Plugins](input/README.md) * [CPU Usage](input/cpu.md) + * [Disk Usage](input/disk.md) * [Forward](input/forward.md) * [Head](input/head.md) * [Health](input/health.md) diff --git a/input/README.md b/input/README.md index d1bc22464cb..f481ce04b11 100644 --- a/input/README.md +++ b/input/README.md @@ -5,6 +5,7 @@ The _input plugins_ defines the source from where [Fluent Bit](http://fluentbit. | name | title | description | |-----------------------------|--------------------|-----------------| | [cpu](cpu.md) | CPU Usage | measure total CPU usage of the system.| +| [disk](disk.md) | Disk Usage | measure Disk I/Os. | | [forward](forward.md) | Forward | Fluentd forward protocol. | | [head](head.md) | Head | read first part of files. | | [health](health.md) | Health | Check health of TCP services. | diff --git a/input/disk.md b/input/disk.md new file mode 100644 index 00000000000..da3fe0e2d29 --- /dev/null +++ b/input/disk.md @@ -0,0 +1,50 @@ +# Disk Usage + +The __disk__ input plugin, gathers the information about the disk usage of the running system every certain interval of time and reports them. + +## Configuration Parameters + +The plugin supports the following configuration parameters: + +| Key | Description | +| --------------|-------------| +| Interval_Sec | Polling interval (seconds). default: 1| +| Interval_NSec | Polling interval (nanosecond). default: 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.| + +## Getting 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 + +```bash +$ fluent-bit -i disk -o stdout +Fluent-Bit v0.11.0 +Copyright (C) Treasure Data + +[2017/01/28 16:58:16] [ info] [engine] started +[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 _Input_ & _Output_ sections: + +```python +[INPUT] + Name disk + Tag disk + Interval_Sec 1 + Interval_NSec 0 +[OUTPUT] + Name stdout + Match * +``` + +Note: Total interval (sec) = Interval_Sec + (Interval_Nsec / 1000000000). + +e.g. 1.5s = 1s + 500000000ns