icinga-zones/global-templates/commands.conf

52 lines
1.5 KiB
Text

// vim: set ft=icinga2 et sw=2 ts=2 si ai:
/*
* 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"
}