forked from zito/cmk-ups
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3fa3c3e
Showing
30 changed files
with
1,866 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.pyc | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
____ __ __ _ __ _ _ ____ ____ | ||
/ ___| \/ | |/ / | | | | _ \/ ___| | ||
| | | |\/| | ' /_____| | | | |_) \___ \ | ||
| |___| | | | . \_____| |_| | __/ ___) | | ||
\____|_| |_|_|\_\ \___/|_| |____/ | ||
|
||
|
||
Check-MK plugin for monitoring UPS using SNMP, | ||
UPS must support general UPS-MIB | ||
|
||
Copyright (C) 2012 Václav Ovsík <[email protected]> | ||
|
||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
--------------------------------------------------------------------------- | ||
|
||
For Check_MK see http://mathias-kettner.de/check_mk.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
title: Check UPS Alarm status | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to monitor an alarm state of the UPS that supports the | ||
generic {UPS-MIB}. If an alarm is present (the object {upsAlarmsPresent} | ||
contains a value greater zero) the check is {CRITICAL}. There are no | ||
parameters. | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB containes | ||
{UPS-MIB::upsAlarmsPresent} object. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
title: Check UPS AutoRestart setting | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to monitor the {upsAutoRestart} object of the | ||
UPS that supports the generic {UPS-MIB}. | ||
The check is {CRITICAL} if the object value is not equal to a parameter value. | ||
The parameter value can be {on(1)} or {off(2)}. | ||
|
||
examples: | ||
# The UPS should have autorestart enabled | ||
ups_autorestart_default_param = 1 | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB containes | ||
{UPS-MIB::upsAutoRestart} object. | ||
|
||
[parameters] | ||
autorestart_value (int): The value the object {upsAutoRestart} should be. | ||
|
||
[configuration] | ||
ups_autorestart_default_param (int): Default value is set to 1 (on). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
title: Check UPS Battery | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to monitor the state of the battery of UPS supporting | ||
the generic {UPS-MIB}. The {UPS-MIB} data objects usage follows: | ||
|
||
{upsBatteryStatus}: | ||
the check is {CRITICAL} if the value is not equal to {batteryNormal(2)}. | ||
|
||
{upsSecondsOnBattery}: | ||
its value is displayed as text and provided with perfdata. | ||
|
||
{upsEstimatedMinutesRemaining}: | ||
its value is displayed as text and provided with perfdata. The check is | ||
{CRITICAL} if the value is bellow the parameter {crit_minutes_remain}. | ||
|
||
{upsEstimatedChargeRemaining}: | ||
its value is displayed as text and provided with perfdata. The check is | ||
{CRITICAL} if the value is bellow the parameter {crit_charge_remain}. | ||
|
||
{upsBatteryVoltage}: | ||
its value is displayed as text and provided with perfdata. | ||
|
||
{upsBatteryCurrent}: | ||
its value is displayed as text and provided with perfdata. | ||
|
||
{upsBatteryTemperature}: | ||
it is displayed and perfdata provided. The check is CRITICAL if the value id | ||
above the parameter {crit_battery_temp}. | ||
|
||
|
||
examples: | ||
# Disable performance data for the SecondsOnBattery | ||
ups_default_levels["batt_running_time_perfdata"] = False | ||
|
||
# Set the warning level to 5 minutes and critical to 2 minutes remainning | ||
ups_default_levels["batt_time_left_levels"] = (5, 2) | ||
|
||
perfdata: | ||
The check sends following performance variables only if it is enabled by | ||
configuration parameters: | ||
{SecondsOnBattery}, {EstimatedMinutesRemaining}, {EstimatedChargeRemaining}, | ||
{BatteryVoltage}, {BatteryCurrent}, {BatteryTemperature} | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB contains | ||
{UPS-MIB::upsBatteryStatus} object. | ||
|
||
[parameters] | ||
parameters (dict): The dictionary of keys: | ||
|
||
{batt_running_time_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {SecondsOnBattery} value. | ||
|
||
{batt_time_left_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for {EstimatedMinutesRemaining} value. | ||
|
||
{batt_time_left_levels} a tuple of ints (lw, lc) representing warning level | ||
and critical level for the {EstimatedMinutesRemaining} value. It defaults | ||
to (15, 10). | ||
|
||
{batt_charge_left_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {EstimatedChargeRemaining} value. | ||
|
||
{batt_charge_left_levels} a tuple of ints (lw, lc) representing warning level | ||
and critical level for the {EstimatedChargeRemaining} value. It defaults | ||
to (15, 10). | ||
|
||
{batt_volt_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {BatteryVoltage} value. | ||
|
||
{batt_volt_levels} a tuple of ints (lc, lw, hw, hc) representing the levels | ||
for the {BatteryVoltage} value. It has no defult. | ||
|
||
{batt_curr_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {BatteryCurrent} value. | ||
|
||
{batt_curr_levels} a tuple of ints (hw, hc) representing the levels for the | ||
{BatteryCurrent} value. It has no default. | ||
|
||
{batt_temp_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {BatteryTemperature} value. | ||
|
||
{batt_temp_levels} a tuple of ints (hw, hc) representing the levels for the | ||
{BatteryTemperature} value. It has default (35, 40). | ||
|
||
[configuration] | ||
ups_default_levels: dictionary with default parameters. It is common for all ups_* | ||
checks so you should probably manipulate only individual keys. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
title: Check UPS Bypass voltage | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to monitor a bypass voltage of the UPS that supports the | ||
generic {UPS-MIB}. | ||
|
||
The check reads a value of an object {upsBypassVoltage}. | ||
|
||
The check status depends on the above value. The value must be in defined levels | ||
the check has OK status. | ||
|
||
perfdata: | ||
The check sends a single performance variable {Voltage} if enabled. | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB containes | ||
{UPS-MIB::upsBypassFrequency} object. The inventory creates one service for | ||
each bypass power line found. | ||
|
||
examples: | ||
# Disable performance data for the voltage | ||
ups_default_levels["bypass_volt_perfdata"] = False | ||
|
||
[parameters] | ||
parameters (dict): The dictionary of keys: | ||
|
||
{bypass_volt_perfdata} setting it to True enables or to False disables | ||
generating performance data for the {Voltage} value. | ||
|
||
{bypass_volt_levels} a tuple of ints (lc, lw, hw, hc) representing the levels | ||
for the {Voltage} value. It has default (210, 220, 240, 250). | ||
|
||
[configuration] | ||
ups_default_levels: dictionary with default parameters. It is common for all ups_* | ||
checks so you should probably manipulate only individual keys. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
title: Check UPS Bypass frequency | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to monitor a bypass frequency of the UPS that supports | ||
the generic {UPS-MIB}. | ||
|
||
The check reads a value of an object {upsBypassFrequency}. | ||
|
||
The check status depends on the above value. The value must be in defined levels | ||
the check has OK status. | ||
|
||
examples: | ||
# Disable frequency perf data | ||
ups_default_levels["bypass_freq_perfdata"] = False | ||
|
||
perfdata: | ||
The check sends a single performance variable {Frequency} when enabled. | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB containes | ||
{UPS-MIB::upsBypassFrequency} object. | ||
|
||
[parameters] | ||
parameters (dict): The dictionary of keys: | ||
|
||
{bypass_freq_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {Frequency} value. | ||
|
||
{bypass_freq_levels} a tuple of ints (lc, lw, hw, hc) representing the levels | ||
for the {Frequency} value. It has default (48, 49.5, 50.5, 52). | ||
|
||
[configuration] | ||
ups_default_levels: dictionary with default parameters. It is common for all ups_* | ||
checks so you should probably manipulate only individual keys. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
title: Check UPS configuration | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to display a configuration information about the UPS | ||
that supports the generic {UPS-MIB}. The check is always {OK}. | ||
|
||
The following {UPS-MIB} object values are displayed in text: | ||
{upsConfigInputVoltage}, {upsConfigInputFreq}, {upsConfigOutputVoltage}, | ||
{upsConfigOutputFreq}, {upsConfigOutputVA}, {upsConfigLowBattTime}. | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB containes | ||
{UPS-MIB::upsConfigInputVoltage} object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
title: Check UPS identification | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to display identification attributes of the UPS that | ||
supports the generic {UPS-MIB}. The check is always {OK}. | ||
|
||
The following {UPS-MIB} object values are displayed in text: | ||
{upsIdentManufacturer}, {upsIdentModel}, {upsIdentUPSSoftwareVersion}, | ||
{upsIdentAgentSoftwareVersion}. | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB containes | ||
{UPS-MIB::upsIdentModel} object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
title: Check UPS input lines | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to monitor input lines of the UPS that supports the | ||
generic {UPS-MIB}. For every input line the voltage, current and frequency is | ||
monitored. | ||
|
||
The check reads values of objects: {upsInputFrequency}, {upsInputVoltage}, | ||
{upsInputCurrent}. | ||
|
||
The check status depends on above values. All values must be in defined levels | ||
the check has OK status. | ||
|
||
examples: | ||
# Disable frequency perf data | ||
ups_default_levels["input_freq_perfdata"] = False | ||
|
||
perfdata: | ||
The check sends performance variables: {Voltage}, {Current}, {Frequency} if | ||
enabled. | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB containes | ||
{UPS-MIB::upsInputLineBads} object. The inventory creates one service for each | ||
input power line. | ||
|
||
[parameters] | ||
parameters (dict): This check uses a dictionary with keys: | ||
|
||
{input_volt_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {Voltage} value. | ||
|
||
{input_volt_levels} a tuple of ints (lc, lw, hw, hc) representing the levels | ||
for the {Voltage} value. It has default (210, 220, 240, 250). | ||
|
||
{input_curr_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {Current} value. | ||
|
||
{input_curr_levels} a tuple of ints (hw, hc) representing the levels for the | ||
{Current} value. It has no default. | ||
|
||
{input_freq_perfdata} setting it to True enables or to False disables | ||
generating perfomance data for the {Frequency} value. | ||
|
||
{input_freq_levels} a tuple of ints (lc, lw, hw, hc) representing the levels | ||
for the {Frequency} value. It has default (48, 49.5, 50.5, 52). | ||
|
||
[configuration] | ||
ups_default_levels: dictionary with default parameters. It is common for all ups_* | ||
checks so you should probably manipulate only individual keys. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
title: Check UPS input line bads | ||
agents: snmp | ||
author: Václav Ovsík <[email protected]> | ||
license: GPL | ||
distribution: check_mk | ||
description: | ||
The check can be used to monitor a number of times the input line of the UPS was bad. | ||
The UPS that supports the generic {UPS-MIB} can be monitored. The check is always {OK}. | ||
|
||
inventory: | ||
The check will be inventorized if the UPS MIB containes | ||
{UPS-MIB::upsInputLineBads} object. |
Oops, something went wrong.