diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 5a89bb1d1..a3799ffd3 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -95,9 +95,19 @@ which contains the path of the plugins from the Monitoring Plugins project. ### apt -Check command for the `check_apt` plugin. +The plugin `apt` is used to check the aptitude package management system for updates on Debian based systems. -The `apt` check command does not support any vars. +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): + +Name | Description +------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +apt_extra_opts | **Optional.** Read options from an ini file. +apt_upgrade | **Optional.** [Default] Perform an upgrade. If an optional OPTS argument is provided, apt-get will be run with these command line options instead of the default. +apt_dist_upgrade | **Optional.** Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options. +apt_include | **Optional.** Include only packages matching REGEXP. Can be specified multiple times the values will be combined together. +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). ### by_ssh diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 8d640a4d4..3408a9abc 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -1181,6 +1181,38 @@ object CheckCommand "apt" { import "plugin-check-command" command = [ PluginDir + "/check_apt" ] + + arguments = { + "--extra-opts" = { + value = "$apt_extra_opts$" + description = "Read options from an ini file." + } + "--upgrade" = { + value = "$apt_upgrade$" + description = "[Default] Perform an upgrade. If an optional OPTS argument is provided, apt-get will be run with these command line options instead of the default." + } + "--dist-upgrade" = { + value = "$apt_dist_upgrade$" + description = "Perform a dist-upgrade instead of normal upgrade. Like with -U OPTS can be provided to override the default options." + } + "--include" = { + value = "$apt_include$" + description = "Include only packages matching REGEXP. Can be specified multiple times the values will be combined together." + } + "--exclude" = { + value = "$apt_exclude$" + description = "Exclude packages matching REGEXP from the list of packages that would otherwise be included. Can be specified multiple times." + } + "--critical" = { + value = "$apt_critical$" + description = "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." + } + "--timeout" = { + value = "$apt_timeout$" + description = "Seconds before plugin times out (default: 10)." + } + } + } object CheckCommand "dhcp" {