From: Thomas Widhalm Date: Sat, 5 Dec 2015 19:37:23 +0000 (+0100) Subject: Add check_iostat to ITL X-Git-Tag: v2.4.2~37 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd0aa4a290d0f5e1ba1807d3ce9a3a188f6c580b;p=icinga2 Add check_iostat to ITL fixes #10777 Signed-off-by: Jean Flach --- diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 1ee470af2..1bed473ea 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -2156,6 +2156,22 @@ Name | Description ---------------------------|------------- running\_kernel\_use\_sudo | Whether to run the plugin with `sudo`. Defaults to false except on Ubuntu where it defaults to true. +#### iostat + +The plugin [check_iostat](https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_iostat) is used to monitor I/O with `iostat` on a linux host. The default thresholds are rather high so you can use a grapher for baselining before setting your own. + +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): + +Name | Description +---------------|----------------------------------------------------------------------------------------------------------------------- +iostat\_disk | **Required.** The device to monitor without path. e.g. sda or vda. (default: sda) +iostat\_wtps | **Required.** Warning threshold for tps (default: 100) +iostat\_wread | **Required.** Warning threshold for KB/s reads (default: 100) +iostat\_wwrite | **Required.** Warning threshold for KB/s writes (default: 100) +iostat\_ctps | **Required.** Critical threshold for tps (default: 200) +iostat\_cread | **Required.** Critical threshold for KB/s reads (default: 200) +iostat\_cwrite | **Required.** Critical threshold for KB/s writes (default: 200) + #### yum The plugin `yum` is used to check the YUM package management system for package updates. To differentiate between security and normal updates it requires the YUM security plugin installed. It is provied by `Christoph Anton Mitterer` on [https://github.com](https://github.com/calestyo/check_yum). diff --git a/itl/plugins-contrib.d/operating-system.conf b/itl/plugins-contrib.d/operating-system.conf index 96fed288c..a209b54a2 100644 --- a/itl/plugins-contrib.d/operating-system.conf +++ b/itl/plugins-contrib.d/operating-system.conf @@ -126,3 +126,30 @@ object CheckCommand "yum" { timeout = 5m } + +object CheckCommand "iostat" { + import "plugin-check-command" + command = [ PluginContribDir + "/check_iostat" ] + arguments = { + "-d" = { + value = "$iostat_disk$" + description = "Device to check without path. e.g. sda" + } + "-w" = { + value ="$iostat_wtps$,$iostat_wread$,$iostat_wwrite$" + description = "warning threshold for tps, KB_read/s and KB_written/s" + } + "-c" = { + value ="$iostat_ctps$,$iostat_cread$,$iostat_cwrite$" + description = "warning threshold for tps, KB_read/s and KB_written/s" + } + } + + vars.iostat_disk = "sda" + vars.iostat_wtps = 100 + vars.iostat_wread = 100 + vars.iostat_wwrite = 100 + vars.iostat_ctps = 200 + vars.iostat_cread = 200 + vars.iostat_cwrite = 200 +}