]> granicus.if.org Git - icinga2/commitdiff
Add all missing UPS check parameters
authorLouis Sautier <sautier.louis@gmail.com>
Fri, 27 Mar 2015 11:48:45 +0000 (12:48 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Fri, 27 Mar 2015 11:58:05 +0000 (12:58 +0100)
fixes #8881

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
doc/7-icinga-template-library.md
itl/command-plugins.conf

index d2c696cf34fb04b11dbcc766e481010bc2e848ef..7b32c2720a8413bf552d07bbc2d08f175a75b8f0 100644 (file)
@@ -760,8 +760,14 @@ Custom Attributes:
 
 Name            | Description
 ----------------|--------------
-ups_address     | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
-ups_name        | **Optional.** The UPS name. Defaults to `ups`.
+ups_address     | **Required.** The address of the host running upsd. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
+ups_name        | **Required.** The UPS name. Defaults to `ups`.
+ups_port        | **Optional.** The port to which to connect. Defaults to 3493.
+ups_variable    | **Optional.** The variable to monitor. Must be one of LINE, TEMP, BATTPCT or LOADPCT. If this is not set, the check only relies on the value of `ups.status`.
+ups_warning     | **Optional.** The warning threshold for the selected variable.
+ups_critical    | **Optional.** The critical threshold for the selected variable.
+ups_celsius     | **Optional.** Display the temperature in degrees Celsius instead of Fahrenheit. Defaults to `false`.
+ups_timeout     | **Optional.** The number of seconds before the connection times out. Defaults to 10.
 
 
 ## <a id="plugin-check-command-users"></a> users
index 6df1ad744e040317cbdd2b730b9afe27783f8e03..bdd838f3b81815b207df1bfad8c011416888e352 100644 (file)
@@ -932,8 +932,40 @@ object CheckCommand "ups" {
        command = [ PluginDir + "/check_ups" ]
 
        arguments = {
-               "-H" = "$ups_address$"
-               "-u" = "$ups_name$"
+               "-H" = {
+                       value = "$ups_address$"
+                       description = "Address of the upsd server"
+                       required = true
+               }
+               "-u" = {
+                       value = "$ups_name$"
+                       description = "Name of the UPS to monitor"
+                       required = true
+               }
+               "-p" = {
+                       value = "$ups_port"$
+                       description = "Port number (default: 3493)"
+               }
+               "-v" = {
+                       value = "$ups_variable$"
+                       description = "Variable to monitor, valid strings are LINE, TEMP, BATTPCT or LOADPCT"
+               }
+               "-w" = {
+                       value = "$ups_warning$"
+                       description = "Warning threshold for the selected variable"
+               }
+               "-c" = {
+                       value = "$ups_critical$"
+                       description = "Critical threshold for the selected variable"
+               }
+               "-T" = {
+                       set_if = "$ups_celsius$"
+                       description = "Display temperature in degrees Celsius instead of Fahrenheit"
+               }
+               "-t" = {
+                       value = "$ups_timeout$"
+                       description = "Seconds before the connection times out (default: 10)"
+               }
        }
 
        vars.ups_address = "$check_address$"