mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2024-11-25 11:53:55 +01:00
added icinga2 command definitions
This commit is contained in:
parent
47547951cf
commit
26a1b3dbe8
@ -226,7 +226,10 @@ define command{
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
More info about options in Usage.
|
## Icinga2 configuration
|
||||||
|
|
||||||
|
The Icinga2 command definition can be found here: (contrib/icinga2_check_command_definition.conf)
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
104
contrib/icinga2_check_command_definition.conf
Normal file
104
contrib/icinga2_check_command_definition.conf
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
object CheckCommand "http_json" {
|
||||||
|
import "plugin-check-command"
|
||||||
|
|
||||||
|
command = [ PluginDir + "/check_http_json.py" ]
|
||||||
|
|
||||||
|
arguments = {
|
||||||
|
"--host" = {
|
||||||
|
value = "$address$"
|
||||||
|
description = "Hostname or address of the interface to query"
|
||||||
|
required = true
|
||||||
|
}
|
||||||
|
"--port" = {
|
||||||
|
value = "$http_json_port$"
|
||||||
|
description = "TCP port number"
|
||||||
|
}
|
||||||
|
"--path" = {
|
||||||
|
value = "$http_json_path$"
|
||||||
|
description = "URL path to query (i.e.: /v1/service/xyz)"
|
||||||
|
}
|
||||||
|
"--timeout" = {
|
||||||
|
value = "$http_json_timeout$"
|
||||||
|
description = "Connection timeout (seconds)"
|
||||||
|
}
|
||||||
|
"--basic-auth" = {
|
||||||
|
value = "$http_json_basic_auth$"
|
||||||
|
description = "Basic auth string 'username:password'"
|
||||||
|
}
|
||||||
|
"--ssl" = {
|
||||||
|
set_if = "$http_json_ssl$"
|
||||||
|
description = "use TLS to connect to remote host"
|
||||||
|
}
|
||||||
|
"--insecure" = {
|
||||||
|
set_if = "$http_json_insecure$"
|
||||||
|
description = "do not check server SSL certificate"
|
||||||
|
}
|
||||||
|
"--cacert" = {
|
||||||
|
value = "$http_json_cacert_file$"
|
||||||
|
description = "path of cacert file to validate server cert"
|
||||||
|
}
|
||||||
|
"--cert" = {
|
||||||
|
value = "$http_json_cert_file$"
|
||||||
|
description = "client certificate in PEM format"
|
||||||
|
}
|
||||||
|
"--key" = {
|
||||||
|
value = "$http_json_key_file$"
|
||||||
|
description = "client certificate key file in PEM format ( if not bundled into the cert )"
|
||||||
|
}
|
||||||
|
"--data" = {
|
||||||
|
value = "$http_json_post_data$"
|
||||||
|
description = "the http payload to send as a POST"
|
||||||
|
}
|
||||||
|
"--headers" = {
|
||||||
|
value = "$http_json_headers$"
|
||||||
|
description = "additional http headers in JSON format to send with the request"
|
||||||
|
}
|
||||||
|
|
||||||
|
"--field_separator" = {
|
||||||
|
value = "$http_json_field_separator$"
|
||||||
|
description = "JSON Field separator, defaults to '.'; Select element in an array with '(' ')'"
|
||||||
|
}
|
||||||
|
|
||||||
|
"--warning" = {
|
||||||
|
value = "$http_json_warning$"
|
||||||
|
description = "Warning threshold for these values, WarningRange is in the format [@]start:end"
|
||||||
|
}
|
||||||
|
"--critical" = {
|
||||||
|
value = "$http_json_critical$"
|
||||||
|
description = "Critical threshold for these values, CriticalRange is in the format [@]start:end"
|
||||||
|
}
|
||||||
|
"--key_exists" = {
|
||||||
|
value = "$http_json_key_exists$"
|
||||||
|
description = "Checks existence of these keys to determine status. Return warning if key is not present."
|
||||||
|
}
|
||||||
|
"--key_exists_critical" = {
|
||||||
|
value = "$http_json_key_exists_critical$"
|
||||||
|
description = "Checks existence of these keys to determine status. Return critical if key is not present."
|
||||||
|
}
|
||||||
|
"--key_equals" = {
|
||||||
|
value = "$http_json_key_equals$"
|
||||||
|
description = "Checks equality of these keys and values. Return warning if equality check fails"
|
||||||
|
}
|
||||||
|
"--key_equals_critical" = {
|
||||||
|
value = "$http_json_key_equals_critical$"
|
||||||
|
description = "Checks equality of these keys and values. Return critical if equality check fails"
|
||||||
|
}
|
||||||
|
"--key_equals_unknown" = {
|
||||||
|
value = "$http_json_key_equals_unknown$"
|
||||||
|
description = "Checks equality of these keys and values. Return unknown if equality check fails"
|
||||||
|
}
|
||||||
|
"--key_not_equals" = {
|
||||||
|
value = "$http_json_key_not_equals$"
|
||||||
|
description = "Checks equality of these keys and values (key[>alias],value key2,value2) to determine status. Multiple key values can be delimited with colon (key,value1:value2). Return warning if equality check succeeds."
|
||||||
|
}
|
||||||
|
"--key_not_equals_critical" = {
|
||||||
|
value = "$http_json_key_not_equals_critical$"
|
||||||
|
description = "Checks equality of these keys and values (key[>alias],value key2,value2) to determine status. Multiple key values can be delimited with colon (key,value1:value2). Return critical if equality check succeeds."
|
||||||
|
}
|
||||||
|
"--key_metrics" = {
|
||||||
|
value = "$http_json_key_metrics$"
|
||||||
|
description = "Gathers the values of these keys"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user