From d8dbf781a70afff84936621529b4188825a0dabf Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Thu, 16 Feb 2017 10:57:59 +0100 Subject: [PATCH] Support --only-critical for check_apt fixes #117 Signed-off-by: Gunnar Beutner --- doc/10-icinga-template-library.md | 1 + itl/command-plugins.conf | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index 374634067..0d36740fd 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -140,6 +140,7 @@ apt_include | **Optional.** Include only packages matching REGEXP. C apt_exclude | **Optional.** Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times. apt_critical | **Optional.** If the full package information of any of the upgradable packages match this REGEXP, the plugin will return CRITICAL status. Can be specified multiple times. apt_timeout | **Optional.** Seconds before plugin times out (default: 10). +apt_only_critical | **Optional.** Only warn about critical upgrades. ### breeze diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 2a3830c24..5d2b1a803 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -1492,6 +1492,10 @@ object CheckCommand "apt" { value = "$apt_timeout$" description = "Seconds before plugin times out (default: 10)." } + "--only-critical" = { + set_if = "$apt_only_critical$" + description = "Only warn about critical upgrades." + } } timeout = 5m