You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
3.0 KiB
Plaintext
106 lines
3.0 KiB
Plaintext
// vim: set ft=icinga2 et sw=2 ts=2 si ai:
|
|
|
|
/*
|
|
* Checks the validity of a custom CA certificate (like a Icinga or Puppet CA).
|
|
*/
|
|
object CheckCommand "custom_ca_cert" {
|
|
command = [ PluginContribDir + "/check_ssl_cert" ]
|
|
|
|
arguments = {
|
|
"-f" = {
|
|
value = "$ssl_cert_file$"
|
|
description = "Local file path (works with -H localhost only)"
|
|
}
|
|
"-s" = {
|
|
set_if = "$ssl_cert_selfsigned$"
|
|
description = "Allow self-signed certificate"
|
|
}
|
|
"-A" = {
|
|
set_if = "$ssl_cert_noauth$"
|
|
description = "Ignore authority warnings (expiration only)"
|
|
}
|
|
"--ignore-maximum-validity" = {
|
|
set_if = "$ssl_cert_ignore_maximum_validity$"
|
|
description = "Ignore the certificate maximum validity"
|
|
}
|
|
"--allow-empty-san" = {
|
|
set_if = "$ssl_cert_allow_empty_san$"
|
|
description = "Allow certificates without Subject Alternative Names (SANs)"
|
|
}
|
|
"-w" = {
|
|
value = "$ssl_cert_warn$"
|
|
description = "Minimum number of days a certificate has to be valid"
|
|
}
|
|
"-c" = {
|
|
value = "$ssl_cert_critical$"
|
|
description = "Minimum number of days a certificate has to be valid to issue a critical status"
|
|
}
|
|
}
|
|
|
|
vars.ssl_cert_selfsigned = true
|
|
vars.ssl_cert_noauth = true
|
|
vars.ssl_cert_ignore_maximum_validity = true
|
|
vars.ssl_cert_allow_empty_san = true
|
|
vars.ssl_cert_warn = 90
|
|
vars.ssl_cert_critical = 30
|
|
}
|
|
|
|
/*
|
|
* Local command to check whether the current kernel is the latest installed
|
|
* kernel.
|
|
*/
|
|
object CheckCommand "kernel_status" {
|
|
command = [ LocalPluginDir + "/check_kernel_status" ]
|
|
}
|
|
|
|
/*
|
|
* Checks a local PostgreSQL database. You need to grant the given user
|
|
* (normally nagios, which is what Icinga is running as) privileges to connect
|
|
* the specified database (or 'template1') and optionally execute the specified
|
|
* query.
|
|
*/
|
|
object CheckCommand "pgsql_socket" {
|
|
command = [ PluginDir + "/check_pgsql" ]
|
|
|
|
arguments = {
|
|
"-d" = {
|
|
value = "$pgsql_database$"
|
|
description = "Database to check (default: template1)"
|
|
}
|
|
"-l" = {
|
|
value = "$pgsql_username$"
|
|
description = "Login name of user"
|
|
}
|
|
"-o" = {
|
|
value = "$pgsql_options$"
|
|
description = "Connection parameters (keyword = value), see below"
|
|
}
|
|
"-w" = {
|
|
value = "$pgsql_warning$"
|
|
description = "Response time to result in warning status (seconds)"
|
|
}
|
|
"-c" = {
|
|
value = "$pgsql_critical$"
|
|
description = "Response time to result in critical status (seconds)"
|
|
}
|
|
"-t" = {
|
|
value = "$pgsql_timeout$"
|
|
description = "Seconds before connection times out (default: 10)"
|
|
}
|
|
"-q" = {
|
|
value = "$pgsql_query$"
|
|
description = "SQL query to run. Only first column in first row will be read"
|
|
}
|
|
"-W" = {
|
|
value = "$pgsql_query_warning$"
|
|
description = "SQL query value to result in warning status (double)"
|
|
}
|
|
"-C" = {
|
|
value = "$pgsql_query_critical$"
|
|
description = "SQL query value to result in critical status (double)"
|
|
}
|
|
}
|
|
|
|
vars.pgsql_username = "nagios"
|
|
}
|