]> granicus.if.org Git - icinga2/commitdiff
Add phpfpm-status CheckCommand definition 6864/head
authorBarbUk <julien.virey@gmail.com>
Sat, 22 Dec 2018 09:51:27 +0000 (13:51 +0400)
committerBarbUk <julien.virey@gmail.com>
Sat, 22 Dec 2018 09:51:27 +0000 (13:51 +0400)
doc/10-icinga-template-library.md
itl/plugins-contrib.d/web.conf

index e8f48ab287a0181e149b99cc3dbeb1ec4852c260..136bc326a849e581f954254108600416cad3fe60 100644 (file)
@@ -5415,3 +5415,28 @@ haproxy_url             | **Required.** URL of the HAProxy csv statistics page.
 haproxy_timeout         | **Optional.** Seconds before plugin times out (default: 10)
 haproxy_warning         | **Optional.** Warning request time threshold (in seconds)
 haproxy_critical        | **Optional.** Critical request time threshold (in seconds)
+
+#### phpfpm_status <a id="plugin-contrib-command-phpfpm_status"></a>
+
+The [check_phpfpm_status](http://github.com/regilero/check_phpfpm_status) plugin,
+uses the `php-fpm` status page to monitor php-fpm.
+
+Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
+
+Name                      | Description
+--------------------------|----------------------------------------------------------------------------------
+phpfpm\_status\_hostname  | **Required.** name or IP address of host to check
+phpfpm\_status\_port      | **Optional.** Http port, or Fastcgi port when using --fastcgi
+phpfpm\_status\_url       | **Optional.** Specific URL (only the path part of it in fact) to use, instead of the default /fpm-status
+phpfpm\_status\_servername| **Optional.** ServerName, (host header of HTTP request) use it if you specified an IP in -H to match the good Virtualhost in your target
+phpfpm\_status\_fastcgi   | **Optional.** If set, connect directly to php-fpm via network or local socket, using fastcgi protocol instead of HTTP.
+phpfpm\_status\_user      | **Optional.** Username for basic auth
+phpfpm\_status\_pass      | **Optional.** Password for basic auth
+phpfpm\_status\_realm     | **Optional.** Realm for basic auth
+phpfpm\_status\_debug     | **Optional.** If set, debug mode (show http request response)
+phpfpm\_status\_timeout   | **Optional.** timeout in seconds (Default: 15)
+phpfpm\_status\_ssl       | **Optional.** Wether we should use HTTPS instead of HTTP. Note that you can give some extra parameters to this settings. Default value is 'TLSv1' but you could use things like 'TLSv1_1' or 'TLSV1_2' (or even 'SSLv23:!SSLv2:!SSLv3' for old stuff).
+phpfpm\_status\_verifyssl | **Optional.** If set, verify certificate and hostname from ssl cert, default is 0 (no security), set it to 1 to really make SSL peer name and certificater checks.
+phpfpm\_status\_cacert    | **Optional.** Full path to the cacert.pem certificate authority used to verify ssl certificates (use with --verifyssl). if not given the cacert from Mozilla::CA cpan plugin will be used.
+phpfpm\_status\_warn      | **Optional.** MIN_AVAILABLE_PROCESSES,PROC_MAX_REACHED,QUEUE_MAX_REACHED number of available workers, or max states reached that will cause a warning. -1 for no warning
+phpfpm\_status\_critical  | **Optional.** MIN_AVAILABLE_PROCESSES,PROC_MAX_REACHED,QUEUE_MAX_REACHED number of available workers, or max states reached that will cause an error, -1 for no CRITICAL
index 73266e3b1f75fd2aab5091f39c763bd1a669bc6d..cccadefc1d9c2c0909da305812c8e8530e4191ea 100644 (file)
@@ -618,3 +618,74 @@ object CheckCommand "haproxy" {
                }
        }
 }
+
+object CheckCommand "phpfpm_status" {
+       import "plugin-check-command"
+       command = [ PluginDir + "/check_phpfpm_status" ]
+
+       arguments = {
+               "-H" = {
+                       value = "$phpfpm_status_hostname$"
+                       description = "name or IP address of host to check"
+                       required = true
+               }
+               "-p" = {
+                       value = "$phpfpm_status_port$"
+                       description = "Http port, or Fastcgi port when using --fastcgi"
+               }
+               "-u" = {
+                       value = "$phpfpm_status_url$"
+                       description = "Specific URL (only the path part of it in fact) to use, instead of the default /fpm-status"
+               }
+               "-s" = {
+                       value = "$phpfpm_status_servername$"
+                       description = "ServerName, (host header of HTTP request) use it if you specified an IP in -H to match the good Virtualhost in your target"
+               }
+               "-f" = {
+                       set_if = "$phpfpm_status_fastcgi$"
+                       description = "Connect directly to php-fpm via network or local socket, using fastcgi protocol instead of HTTP."
+               }
+               "-U" = {
+                       value = "$phpfpm_status_user$"
+                       description = "Username for basic auth"
+               }
+               "-P" = {
+                       value = "$phpfpm_status_pass$"
+                       description = "Password for basic auth"
+               }
+               "-r" = {
+                       value = "$phpfpm_status_realm$"
+                       description = "Realm for basic auth"
+               }
+               "-d" = {
+                       set_if = "$phpfpm_status_debug$"
+                       description = "Debug mode (show http request response)"
+               }
+               "-t" = {
+                       value = "$phpfpm_status_timeout$"
+                       description = "timeout in seconds (Default: 15)"
+               }
+               "-S" = {
+                       set_if = "$phpfpm_status_ssl$"
+                       description = "Wether we should use HTTPS instead of HTTP. Note that you can give some extra parameters to this settings. Default value is 'TLSv1' but you could use things like 'TLSv1_1' or 'TLSV1_2' (or even 'SSLv23:!SSLv2:!SSLv3' for old stuff)."
+               }
+               "-x" = {
+                       set_if = "$phpfpm_status_verifyssl$"
+                       description = "verify certificate and hostname from ssl cert, default is 0 (no security), set it to 1 to really make SSL peer name and certificater checks."
+               }
+               "-X" = {
+                       value = "$phpfpm_status_cacert$"
+                       description = "Full path to the cacert.pem certificate authority used to verify ssl certificates (use with --verifyssl). if not given the cacert from Mozilla::CA cpan plugin will be used."
+               }
+               "-w" = {
+                       value = "$phpfpm_status_warn$"
+                       description = "MIN_AVAILABLE_PROCESSES,PROC_MAX_REACHED,QUEUE_MAX_REACHED number of available workers, or max states reached that will cause a warning. -1 for no warning"
+               }
+               "-c" = {
+                       value = "$phpfpm_status_critical$"
+                       description = "MIN_AVAILABLE_PROCESSES,PROC_MAX_REACHED,QUEUE_MAX_REACHED number of available workers, or max states reached that will cause an error, -1 for no CRITICAL"
+               }
+       }
+
+       vars.phpfpm_status_hostname = "$address$"
+}