# Why system.diskio doesn't produce I/O statistics fields like "iostat"

**URL:** <https://discuss.elastic.co/t/why-system-diskio-doesnt-produce-i-o-statistics-fields-like-iostat/91354>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 30, 2017, 1:19am UTC](https://discuss.elastic.co/t/why-system-diskio-doesnt-produce-i-o-statistics-fields-like-iostat/91354 "2017-06-30T01:19:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![PChou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pchou/32/22169_2.png) [@PChou](https://discuss.elastic.co/u/PChou)\
**Post date:** [June 30, 2017, 1:19am UTC](https://discuss.elastic.co/t/why-system-diskio-doesnt-produce-i-o-statistics-fields-like-iostat/91354/1 "2017-06-30T01:19:29Z")

</div>

The `system.diskio` just outputs metrics below:

```auto
{
    "io": {
        "time": 4130
    },
    "name": "vda1",
    "read": {
        "bytes": 204800,
        "count": 36,
        "time": 960
    },
    "write": {
        "bytes": 2281472,
        "count": 224,
        "time": 29700
    }
}

```

Actually, this is not make sense, user perfers the output of `"iostat"`. so whether it can be improved as, for example:

```auto
{
    "rBps": 27454.498582,
    "avgrqsz": 18810.434783,
    "wrqmCps": 0,
    "wrqCps": 1.54679,
    "rrqmCps": 0,
    "name": "/dev/sda2",
    "svctm": 2.086957,
    "busy": 0.494973,
    "wBps": 17159.061614,
    "rrqCps": 0.824955,
    "avgqusz": 0.010312,
    "await": 4.347826
}

```

I have enhanced the module and the output becomes almost the same fields like `"iostat"`. And i also tested and compared the result with `"iostat"` using `python` and `grafna`.

Anyone interest this feature? Can i open a PR ?

---

<div class="post-metadata">

**Author:** ![PChou](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pchou/32/22169_2.png) [@PChou](https://discuss.elastic.co/u/PChou)\
**Post date:** [July 4, 2017, 9:31am UTC](https://discuss.elastic.co/t/why-system-diskio-doesnt-produce-i-o-statistics-fields-like-iostat/91354/2 "2017-07-04T09:31:03Z")

</div>

![](https://us1.discourse-cdn.com/elastic/original/3X/e/c/ecb8bc6a557c7e8ccebc48712a72c80a5e55de66.png)

The graph above is configured in grafna, showing some metrics of a disk. The green series is report by my a simple python program which lauch `sar -d 1` every 1s; the yellow series is report my metricbeat(diskio output enhanced).

From the graph, we can see they are almost same.

> since our pipeline to process raw metricbeat data is quit complex, the yellow one is delayed a little.

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [July 4, 2017, 6:43pm UTC](https://discuss.elastic.co/t/why-system-diskio-doesnt-produce-i-o-statistics-fields-like-iostat/91354/3 "2017-07-04T18:43:36Z")

</div>

> [@PChou](#):
>
> Anyone interest this feature? Can i open a PR ?

Sure, open a PR with what you have and we can better consider adding the feature. Thanks

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 1, 2017, 6:43pm UTC](https://discuss.elastic.co/t/why-system-diskio-doesnt-produce-i-o-statistics-fields-like-iostat/91354/4 "2017-08-01T18:43:44Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
