]> granicus.if.org Git - icinga2/commitdiff
Add check command for plugin check_apache_status
authorLennart Betz <lennart.betz@netways.de>
Fri, 17 Jun 2016 11:51:09 +0000 (13:51 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 20 Jun 2016 06:16:19 +0000 (08:16 +0200)
fixes #11970

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
doc/7-icinga-template-library.md
itl/plugins-contrib.d/web.conf

index dbb35b94c1b8a67295f7a92adb39714b2743c4f3..a332ac7fbbae45cc3b3dccf751760e21d718f505 100644 (file)
@@ -2225,6 +2225,24 @@ nginx_status_timeout             | **Optional.** timeout in seconds
 nginx_status_warn              | **Optional.** Warning threshold (number of active connections, ReqPerSec or ConnPerSec that will cause a WARNING) like '10000,100,200'.
 nginx_status_critical          | **Optional.** Critical threshold (number of active connections, ReqPerSec or ConnPerSec that will cause a CRITICAL) like '20000,200,300'.
 
+
+#### <a id="plugins-contrib-apache_status"></a> apache_status
+
+Plugin for monitoring [apache_status](https://github.com/lbetz/check_apache_status).
+
+Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
+
+Name                    | Description
+------------------------|----------------------------------------------------------------------------------
+apache_status_address  | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, `address6` otherwise.
+apache_status_port     | **Optional.** the http port.
+apache_status_url      | **Optional.** URL to use, instead of the default (http://`apache_status_address`/server-status).
+apache_status_ssl      | **Optional.** set to use ssl connection
+apache_status_timeout  | **Optional.** timeout in seconds
+apache_status_warning  | **Optional.** Warning threshold (number of open slots, busy workers and idle workers that will cause a WARNING) like ':20,50,:50'.
+apache_status_critical | **Optional.** Critical threshold (number of open slots, busy workers and idle workers that will cause a CRITICAL) like ':10,25,:20'.
+
+
 ### <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 79a3919f3cfc59fea84e61f9f3d91a0129e7dc1c..176d21005fc2e659aaf3945004326a3f48775834 100644 (file)
@@ -331,3 +331,45 @@ object CheckCommand "nginx_status" {
                vars.nginx_status_critical = "20000,200,300"
                vars.nginx_status_timeout = 15
 }
+
+object CheckCommand "apache-status" {
+       import "plugin-check-command"
+       import "ipv4-or-ipv6"
+
+       command = [ PluginContribDir + "/check_apache_status.pl" ]
+
+       arguments = {
+               "-H" = {
+                       value = "$apache_status_address$"
+                       description = "name or IP address of host to check"
+               }
+               "-p" = {
+                       value = "$apache_status_port$"
+                       description = "the http port"
+               }
+               "-s" = {
+                       set_if = "$apache_status_ssl$"
+                       description = "Wether we should use HTTPS instead of HTTP"
+               }
+               "-u" = {
+                       value = "$apache_status_uri$"
+                       description = "Specific URL to use, instead of the default 'http://<apache_status_address>/server-status'"
+               }
+               "-w" = {
+                       value = "$apache_status_warning$"
+                       description = "number of open slots, busy workers and idle workers that will cause a WARNING"
+               }
+               "-c" = {
+                       value = "$apache_status_critical$"
+                       description = "number of open slots, busy workers and idle workers that will cause a CRITICAL"
+               }
+               "-t" = {
+                       value = "$apache_status_timeout$"
+                       description = "timeout in seconds"
+               }
+       }
+
+       vars.apache_status_address = "$check_address$"
+       vars.apache_status_ssl = false
+}
+