From 62e9c0baddb0ec70ebf8c69064daa188d740001a Mon Sep 17 00:00:00 2001 From: Mark Leary Date: Wed, 31 Oct 2018 13:28:27 -0400 Subject: [PATCH 1/4] Add support for -q argument to check_snmp_storage.pl. --- itl/command-plugins-manubulon.conf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/itl/command-plugins-manubulon.conf b/itl/command-plugins-manubulon.conf index ce9cfa1a4..013d97d5f 100644 --- a/itl/command-plugins-manubulon.conf +++ b/itl/command-plugins-manubulon.conf @@ -215,6 +215,10 @@ object CheckCommand "snmp-storage" { value = "$snmp_storage_olength$" description = "Max-size of the SNMP message, usefull in case of Too Long responses." } + "-q" = { + value = "$storage_type$" + description = "Storage type: Other, Ram, VirtualMemory, FixedDisk, RemovableDisk, FloppyDisk, CompactDisk, RamDisk, FlashMemory, or NetworkDisk" + } } vars.snmp_storage_name = "^/$$" @@ -396,6 +400,6 @@ object CheckCommand "snmp-service" { description = "Do not use regexp to match NAME in service description." } } - + vars.snmp_service_name = ".*" } From 1b062e0a5bc12d7564333a5deb224808e195365d Mon Sep 17 00:00:00 2001 From: Mark Leary Date: Fri, 2 Nov 2018 09:52:37 -0400 Subject: [PATCH 2/4] Change indents to tab. --- itl/command-plugins-manubulon.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/itl/command-plugins-manubulon.conf b/itl/command-plugins-manubulon.conf index 013d97d5f..d11c52b64 100644 --- a/itl/command-plugins-manubulon.conf +++ b/itl/command-plugins-manubulon.conf @@ -215,10 +215,10 @@ object CheckCommand "snmp-storage" { value = "$snmp_storage_olength$" description = "Max-size of the SNMP message, usefull in case of Too Long responses." } - "-q" = { - value = "$storage_type$" - description = "Storage type: Other, Ram, VirtualMemory, FixedDisk, RemovableDisk, FloppyDisk, CompactDisk, RamDisk, FlashMemory, or NetworkDisk" - } + "-q" = { + value = "$storage_type$" + description = "Storage type: Other, Ram, VirtualMemory, FixedDisk, RemovableDisk, FloppyDisk, CompactDisk, RamDisk, FlashMemory, or NetworkDisk" + } } vars.snmp_storage_name = "^/$$" From 1b10e81511cbe05d224140c44a24271a8f14be00 Mon Sep 17 00:00:00 2001 From: Mark Leary Date: Fri, 2 Nov 2018 09:58:44 -0400 Subject: [PATCH 3/4] Follow naming convention for snmp plugin attributes. --- itl/command-plugins-manubulon.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/itl/command-plugins-manubulon.conf b/itl/command-plugins-manubulon.conf index d11c52b64..39e9cf153 100644 --- a/itl/command-plugins-manubulon.conf +++ b/itl/command-plugins-manubulon.conf @@ -216,7 +216,7 @@ object CheckCommand "snmp-storage" { description = "Max-size of the SNMP message, usefull in case of Too Long responses." } "-q" = { - value = "$storage_type$" + value = "$snmp_storage_type$" description = "Storage type: Other, Ram, VirtualMemory, FixedDisk, RemovableDisk, FloppyDisk, CompactDisk, RamDisk, FlashMemory, or NetworkDisk" } } From aa93caae62947023907d2c637a7d66aadec68738 Mon Sep 17 00:00:00 2001 From: Mark Leary Date: Fri, 2 Nov 2018 10:03:19 -0400 Subject: [PATCH 4/4] Document snmp_storage_type attribute. --- doc/10-icinga-template-library.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index a9a861651..195a52ec8 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -2067,6 +2067,7 @@ snmp_privpass | **Required.** SNMP version 3 priv password. No value d snmp_warn | **Optional.** The warning threshold. snmp_crit | **Optional.** The critical threshold. snmp_storage_name | **Optional.** Storage name. Default to regex "^/$$". More options available in the [snmp storage](http://nagios.manubulon.com/snmp_storage.html) documentation. +snmp_storage_type | **Optional.** Filter by storage type. Valid options are Other, Ram, VirtualMemory, FixedDisk, RemovableDisk, FloppyDisk, CompactDisk, RamDisk, FlashMemory, or NetworkDisk. No value defined as default. snmp_perf | **Optional.** Enable perfdata values. Defaults to true. snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds. snmp_storage_olength | **Optional.** Max-size of the SNMP message, usefull in case of Too Long responses.