Add check command nginx_status

fixes #10374

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
Bastian Guse 2015-10-15 15:04:38 +02:00 committed by Gunnar Beutner
parent 13375d74fc
commit 6b3e3812e2
2 changed files with 91 additions and 0 deletions

View File

@ -1923,6 +1923,28 @@ squid_client | **Optional.** Path of squidclient (default: /usr/bin/squidclient
squid_timeout | **Optional.** Seconds before plugin times out (default: 15).
### <a id="plugins-contrib-nginx_status"></a> nginx_status
Plugin for monitoring [nginx_status](https://github.com/regilero/check_nginx_status).
Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
Name | Description
------------------------|----------------------------------------------------------------------------------
nginx_status_host_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, `address6` otherwise.
nginx_status_port | **Optional.** the http port.
nginx_status_url | **Optional.** URL to use, instead of the default (http://`nginx_status_hostname`/nginx_status).
nginx_status_servername | **Optional.** ServerName to use if you specified an IP to match the good Virtualhost in your target
nginx_status_ssl | **Optional.** set to use ssl connection
nginx_status_disable_sslverify | **Optional.** set to disable SSL hostname verification
nginx_status_user | **Optional.** Username for basic auth
nginx_status_pass | **Optional.** Password for basic auth
nginx_status_realm | **Optional.** Realm for basic auth
nginx_status_maxreach | **Optional.** Number of max processes reached (since last check) that should trigger an alert
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-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.

View File

@ -248,3 +248,72 @@ object CheckCommand "squid" {
vars.squid_hostname = "$check_address$"
vars.squid_client = "/usr/bin/squidclient"
}
object CheckCommand "nginx_status" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginContribDir + "/check_nginx_status.pl" ]
arguments = {
"--hostname" = {
value = "$nginx_status_host_address$"
description = "name or IP address of host to check"
}
"--port" = {
value = "$nginx_status_port$"
description = "the http port"
}
"--url" = {
value = "$nginx_status_url$"
description = "Specific URL to use, instead of the default 'http://<nginx_status_hostname>/nginx_status'"
}
"--servername" = {
value = "$nginx_status_servername$"
description = "ServerName, use it if you specified an IP in -H to match the good Virtualhost in your target"
}
"--ssl" = {
set_if = "$nginx_status_ssl$"
description = "Wether we should use HTTPS instead of HTTP"
}
"--disable-sslverifyhostname" = {
set_if = "$nginx_status_disable_sslverify$"
description = "Disable SSL hostname verification"
}
"--user" = {
value = "$nginx_status_user$"
description = "Username for basic auth"
}
"--pass" = {
value = "$nginx_status_pass$"
description = "Password for basic auth"
}
"--realm" = {
value = "$nginx_status_realm$"
description = "Realm for basic auth"
}
"--maxreach" = {
value = "$nginx_status_maxreach$"
description = "Number of max processes reached (since last check) that should trigger an alert"
}
"--timeout" = {
value = "$nginx_status_timeout$"
description = "timeout in seconds"
}
"--warn" = {
value = "$nginx_status_warn$"
description = "number of active connections, ReqPerSec or ConnPerSec that will cause a WARNING"
}
"--critical" = {
value = "$nginx_status_critical$"
description = "number of active connections, ReqPerSec or ConnPerSec that will cause a CRITICAL"
}
}
vars.nginx_status_host_address = "$check_address$"
vars.nginx_status_ssl = false
vars.nginx_status_disable_sslverify = false
vars.nginx_status_warn = "10000,100,200"
vars.nginx_status_critical = "20000,200,300"
vars.nginx_status_timeout = 15
}