]> granicus.if.org Git - icinga2/commitdiff
ITL: Add check command squid
authorLennart Betz <lennart.betz@netways.de>
Mon, 7 Sep 2015 08:57:06 +0000 (10:57 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 7 Sep 2015 09:41:52 +0000 (11:41 +0200)
fixes #10109

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
doc/7-icinga-template-library.md
itl/plugins-contrib.d/web.conf

index 7cf0550b808dbf8fa03e324c97235a36b6e05978..edbd97387ca2dd98bf02e230bed4bf9fbfc6c08c 100644 (file)
@@ -1805,6 +1805,25 @@ jmx4perl_unknown_is_critical | **Optional.** Map UNKNOWN errors to errors with a
 jmx4perl_timeout             | **Optional.** Seconds before plugin times out. Defaults to "15".
 
 
+### <a id="plugins-contrib-squid"></a> 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).
+
+
 ## <a id="plugins-contrib-operating-system"></a> Operating System
 
 In this category you can find plugins for gathering information about your operating system or the system beneath like memory usage.
index 7f61afb2b98ccbae06d75a5f5769cdfaf9bdd97d..17cfc421aa4a7d288c91468edc3963a6052d54e2 100644 (file)
@@ -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"
+}