Module: check_mk
Branch: master
Commit: 3fe9d64d9cb46eefdbc43bee01bc65ae67a62c23
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3fe9d64d9cb46e…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Fri Sep 27 11:16:40 2013 +0200
new version of apc_symmetra check is now reflected in check man page
---
checkman/apc_symmetra | 63 ++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 52 insertions(+), 11 deletions(-)
diff --git a/checkman/apc_symmetra b/checkman/apc_symmetra
index 6231480..0b83668 100644
--- a/checkman/apc_symmetra
+++ b/checkman/apc_symmetra
@@ -8,16 +8,49 @@ description:
{(2)} the output status, {(3)} the battery capacity, {(4)} the battery
temperature, {(5)} the battery current, {(6)} the output voltage and
{(7)} the output current, {(8)} the remaing run time. The output current and
- remaining run time are not checked against
- a level but just being displayed.
+ remaining run time are not checked against a level but are just displayed.
+
+ The check output includes the calibration status of the UPS. During a
+ calibration the check result in section {(2)} is OK even though the UPS is running
+ on battery.
+ The check reads the date of the last calibration and optionally applies an alternative
+ level for the battery capacity on the day of the calibration. This is because the
battery
+ capacity is reduced after calibration and may cause an unwanted critical condition
+ with the standard level. In addition a time span after the day of the calibration
+ can be configured during which the post-calibration phase still persists.
examples:
- # Set the critical levels for all APC checks to:
+ # Set the critical levels for the normal operation mode of all APC checks to:
# - battery capacity at 90% or lower
# - battery temperature to 38C or higher
# - battery current to 10A or higher
# - output voltage to 225V or lower
- apc_default_levels = (90, 38, 10, 225)
+ # old method, unsets the post calibration levels
+ apc_default_levels = ( 90, 38, 10, 225 )
+ # new method
+ apc_default_levels = {
+ "levels": ( 90, 38, 10, 225 )
+ }
+
+ # also set the alternative level for the battery capacity and the delay time span
+ apc_default_levels = {
+ "levels": ( 90, 38, 10, 225 ),
+ "post_calibration_levels": {
+ "altcapacity": 50, # in percent
+ "additional_time_span": 60 # in minutes
+ }
+
+ # checkgroup_parameters syntax
+ # please note that the name of the group is apc_symentra, NOT apc_symmetra !
+ checkgroup_parameters.setdefault('apc_symentra', [])
+
+ checkgroup_parameters['apc_symentra'] += [
+ # All UPS in production get other critical levels
+ ( { "levels": (85, 35, 2, 210) }, ["prod"], ALL_HOSTS ),
+ # All UPS get post calibration level of 50%
+ ( { "post_calibration_levels": { "altcapacity": 50 } },
["prod"],ALL_HOSTS ),
+ ( { "post_calibration_levels": { "additional_time_span": 60 } },
["prod"], ALL_HOSTS ),
+ ]
perfdata:
This check outputs five performance values: the battery capacity,
@@ -25,14 +58,22 @@ perfdata:
the output current.
inventory:
- Supported.
+ The inventory process checks if the device has a system description OIDs
(.1.3.6.1.2.1.1.2.0)
+ and if the name of this OID is known to the test. If this is true the system is
inventorized.
[parameters]
-crit_capacity (int): The battery capacity in percent at and below which a critical state
is be triggered
-crit_batt_temp (int): The critical temperature of the battery
-crit_batt_curr (int): The critical battery current in Ampere
-crit_voltage (int): The output voltage at and below which a critical state is triggered.
+parameters(dict): parameters is a dictionary with two keys
+
+ {"levels"}: a tuple of critical levels for battery capacity, temperature,
current and output
+ voltage. The numbers are integers.
+
+ {"post_calibration_levels"}: a dictionary of two parameters:
{"altcapacity"} is the alternative
+ critical level for the battery capacity in the post-calibration phase in precent.
{"additional_time_span"}
+ is a time span the post-calibration phase is extended past the day of the calibration in
minutes.
+
+parameters(tuple): The old format of a tuple of 4 values is also still supported,
containing what
+ is found in the key {"levels"} in the dictionary.
+
[configuration]
-apc_default_levels (int, int, int, int): The default levels to be used
- for inventorized checks. This variable is preset to {(95, 40, 1, 220)}
+apc_default_levels (dict): This variable is preset to {{ "levels": ( 95, 40, 1,
220 ) }}