]> granicus.if.org Git - icinga2/commitdiff
Add check_iostat to ITL
authorThomas Widhalm <thomas.widhalm@netways.de>
Sat, 5 Dec 2015 19:37:23 +0000 (20:37 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Tue, 23 Feb 2016 08:47:28 +0000 (09:47 +0100)
fixes #10777

Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>
doc/7-icinga-template-library.md
itl/plugins-contrib.d/operating-system.conf

index 1ee470af2507a3e0ff0987b1ea8057a9b608297f..1bed473ea6f44a6a7b5e448cbd530ee511e83f7f 100644 (file)
@@ -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.
 
+#### <a id="plugins-contrib-command-iostat"></a> 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)
+
 #### <a id="plugin-contrib-command-yum"></a> 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).
index 96fed288c33fef7c88e7e2c27b43bec8ff76f88c..a209b54a2f92c80afa5411f5e118859527cd179b 100644 (file)
@@ -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
+}