diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index b7e6a04f0..68437d8b3 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -1801,6 +1801,25 @@ jmx4perl_unknown_is_critical | **Optional.** Map UNKNOWN errors to errors with a jmx4perl_timeout | **Optional.** Seconds before plugin times out. Defaults to "15". +### squid + +Plugin for monitoring [Squid](https://exchange.icinga.org/exchange/check_squid). + +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): + +Name | Description +------------------------|---------------------------------------------------------------------------------- +squid_hostname | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise. +squid_data | **Optional.** Data to fetch (default: Connections) available data: Connections Cache Resources Memory FileDescriptors. +squid_port | **Optional.** Port number (default: 3128). +squid_user | **Optional.** WWW user +squid_password | **Optional.** WWW password +squid_warning | **Optional.** Warning threshold. See http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT for the threshold format. +squid_critical | **Optional.** Critical threshold. See http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT for the threshold format. +squid_client | **Optional.** Path of squidclient (default: /usr/bin/squidclient). +squid_timeout | **Optional.** Seconds before plugin times out (default: 15). + + ## Operating System In this category you can find plugins for gathering information about your operating system or the system beneath like memory usage. diff --git a/itl/plugins-contrib.d/web.conf b/itl/plugins-contrib.d/web.conf index 7f61afb2b..17cfc421a 100644 --- a/itl/plugins-contrib.d/web.conf +++ b/itl/plugins-contrib.d/web.conf @@ -199,3 +199,52 @@ object CheckCommand "jmx4perl" { vars.jmx4perl_numeric = false vars.jmx4perl_unknown_is_critical = false } + +object CheckCommand "squid" { + import "plugin-check-command" + import "ipv4-or-ipv6" + + command = [ PluginContribDir + "/check_squid" ] + + arguments = { + "--host" = { + value = "$squid_hostname$" + description = "Name of the proxy to check (default: localhost)" + } + "--data" = { + value = "$squid_data$" + description = "Optional data to fetch (default: Connections) available data : Connections Cache Resources Memory FileDescriptors" + } + "--port" = { + value = "$squid_port$" + description = "Optional port number (default: 3128)" + } + "--user" = { + value = "$squid_user$" + description = "WWW user" + } + "--password" = { + value = "$squid_password$" + description = "WWW password" + } + "--warning" = { + value = "$squid_warning$" + description = "Warning threshold. See http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT for the threshold format." + } + "--critical" = { + value = "$squid_critical$" + description = "Critical threshold. See http://nagiosplug.sourceforge.net/developer-guidelines.html#THRESHOLDFORMAT for the threshold format." + } + "--squidclient" = { + value = "$squid_client$" + description = "Path of squidclient (default: /usr/bin/squidclient)" + } + "--timeout" = { + value = "$squid_timeout$" + description = "Seconds before plugin times out (default: 15)" + } + } + + vars.squid_hostname = "$check_address$" + vars.squid_client = "/usr/bin/squidclient" +}