From cba87212d39c36f791f7a8c4fc5ed38f6d83da32 Mon Sep 17 00:00:00 2001 From: Canux Date: Wed, 4 Jul 2018 02:03:17 +0800 Subject: [PATCH] Use non_negative_derivative in diskio example queries (#4370) --- plugins/inputs/system/DISKIO_README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/inputs/system/DISKIO_README.md b/plugins/inputs/system/DISKIO_README.md index c71b6d76b..3cec5cf55 100644 --- a/plugins/inputs/system/DISKIO_README.md +++ b/plugins/inputs/system/DISKIO_README.md @@ -107,13 +107,13 @@ requests that are in the queue but not yet issued to the device driver. #### Calculate percent IO utilization per disk and host: ``` -SELECT derivative(last("io_time"),1ms) FROM "diskio" WHERE time > now() - 30m GROUP BY "host","name",time(60s) +SELECT non_negative_derivative(last("io_time"),1ms) FROM "diskio" WHERE time > now() - 30m GROUP BY "host","name",time(60s) ``` #### Calculate average queue depth: `iops_in_progress` will give you an instantaneous value. This will give you the average between polling intervals. ``` -SELECT derivative(last("weighted_io_time",1ms)) from "diskio" WHERE time > now() - 30m GROUP BY "host","name",time(60s) +SELECT non_negative_derivative(last("weighted_io_time",1ms)) from "diskio" WHERE time > now() - 30m GROUP BY "host","name",time(60s) ``` ### Example Output: