From c97c42bff405a3c6b7c6f8f36ce8ef9303da7c90 Mon Sep 17 00:00:00 2001
From: BarbUk <julien.virey@gmail.com>
Date: Thu, 20 Dec 2018 13:22:59 +0400
Subject: [PATCH] Fix ITL CheckCommand disk

Add -N/--include-type option, available since release 1.5.
---
 doc/10-icinga-template-library.md | 1 +
 itl/command-plugins.conf          | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md
index 3ff76f7f4..05f94654b 100644
--- a/doc/10-icinga-template-library.md
+++ b/doc/10-icinga-template-library.md
@@ -347,6 +347,7 @@ disk\_ignore\_ereg\_path  | **Optional.** Regular expression to ignore selected
 disk\_timeout             | **Optional.** Seconds before connection times out (default: 10).
 disk\_units               | **Optional.** Choose bytes, kB, MB, GB, TB (default: MB).
 disk\_exclude\_type       | **Optional.** Ignore all filesystems of indicated type. Multiple regular expression strings must be defined as array. Defaults to "none", "tmpfs", "sysfs", "proc", "configfs", "devtmpfs", "devfs", "mtmfs", "tracefs", "cgroup", "fuse.gvfsd-fuse", "fuse.gvfs-fuse-daemon", "fdescfs", "overlay", "nsfs", "squashfs".
+disk\_include\_type       | **Optional.** Check only filesystems of indicated type. Multiple regular expression strings must be defined as array.
 
 ### disk_smb <a id="plugin-check-command-disk-smb"></a>
 
diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf
index 9960d10a7..e5b365539 100644
--- a/itl/command-plugins.conf
+++ b/itl/command-plugins.conf
@@ -1475,6 +1475,11 @@ object CheckCommand "disk" {
 			description = "Ignore all filesystems of indicated type (may be repeated)"
 			repeat_key = true
 		}
+		"-N" = {
+			value = "$disk_include_type$"
+			description = "Check only filesystems of indicated type (may be repeated)"
+			repeat_key = true
+		}
 	}
 
 	vars.disk_wfree = "20%"