Add check command definition for check_radius

fixes #12762

Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
This commit is contained in:
Mathieu Arnold 2016-09-20 14:43:29 +02:00 committed by Gunnar Beutner
parent c9f807661c
commit be44ff720c
2 changed files with 70 additions and 0 deletions

View File

@ -1039,6 +1039,35 @@ procs_command | **Optional.** Only scan for exact matches of COMMAND (wit
procs_nokthreads | **Optional.** Only scan for non kernel threads. Defaults to false.
### <a id="plugin-check-command-radius"></a> radius
The [check_radius](https://www.monitoring-plugins.org/doc/man/check_radius.html) plugin
checks a RADIUS server to see if it is accepting connections. The server to test
must be specified in the invocation, as well as a user name and password. A configuration
file may also be present. The format of the configuration file is described in the
radiusclient library sources. The password option presents a substantial security
issue because the password can possibly be determined by careful watching of the
command line in a process listing. This risk is exacerbated because the plugin will
typically be executed at regular predictable intervals. Please be sure that the
password used does not allow access to sensitive system resources.
Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
Name | Description
-------------------|--------------
radius_address | **Optional.** The radius server's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
radius_config_file | **Required.** The radius configuration file.
radius_username | **Required.** The radius username to test.
radius_password | **Required.** The radius password to test.
radius_port | **Optional.** The radius port number (default 1645).
radius_nas_id | **Optional.** The NAS identifier.
radius_nas_address | **Optional.** The NAS IP address.
radius_expect | **Optional.** The response string to expect from the server.
radius_retries | **Optional.** The number of times to retry a failed connection.
radius_timeout | **Optional.** The number of seconds before connection times out (default: 10).
### <a id="plugin-check-command-simap"></a> simap
The [check_simap](https://www.monitoring-plugins.org/doc/man/check_simap.html) plugin

View File

@ -2234,3 +2234,44 @@ object CheckCommand "mysql_query" {
vars.mysql_query_hostname = "$check_address$"
}
object CheckCommand "radius" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [
PluginDir + "/check_radius",
]
arguments = {
"-H" = "$radius_address$",
"-F" = "$radius_config_file$",
"-u" = "$radius_username$",
"-p" = "$radius_password$",
"-P" = {
value = "$radius_port$",
},
"-n" = {
value = "$radius_nas_id$",
description = "NAS identifier"
}
"-N" = {
value = "$radius_nas_address$",
description = "NAS IP Address"
},
"-e" = {
value = "$radius_expect$",
description = "Response string to expect from the server"
},
"-r" = {
value = "$radius_retries$",
description = "Number of times to retry a failed connection"
},
"-t" = {
value = "$radius_timeout$",
description = "Seconds before connection times out (default: 10) Optional :<timeout state> can be a state integer (0,1,2,3) or a state STRING"
},
}
vars.radius_address = "$check_address$"
}