lists.checkmk.com
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
List overview
Download
Checkmk git commits
September 2012
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
checkmk-commits@lists.checkmk.com
1 participants
212 discussions
Start a n
N
ew thread
Check_MK Git: check_mk: Merged ups_power with masterguard_power
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: 19fd653e7ac2fcec5c5377abef6a0429a59a9926 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=19fd653e7ac2fc…
Author: Bastian Kuhn <bk(a)mathias-kettner.de> Date: Mon Sep 3 12:06:32 2012 +0200 Merged ups_power with masterguard_power --- checks/masterguard_power | 59 ----------------------------------- checks/ups_power | 77 ++++++++-------------------------------------- 2 files changed, 13 insertions(+), 123 deletions(-) diff --git a/checks/masterguard_power b/checks/masterguard_power deleted file mode 100644 index b611694..0000000 --- a/checks/masterguard_power +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8; py-indent-offset: 4 -*- -# +------------------------------------------------------------------+ -# | ____ _ _ __ __ _ __ | -# | / ___| |__ ___ ___| | __ | \/ | |/ / | -# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | -# | | |___| | | | __/ (__| < | | | | . \ | -# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | -# | | -# | Copyright Mathias Kettner 2012 mk(a)mathias-kettner.de | -# +------------------------------------------------------------------+ -# -# This file is part of Check_MK. -# The official homepage is at
http://mathias-kettner.de/check_mk
. -# -# check_mk 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 in version 2. check_mk is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- -# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more de- -# ails. You should have received a copy of the GNU General Public -# License along with GNU Make; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -# Boston, MA 02110-1301 USA. - -masterguard_power_default_levels = (20, 1) # warning / critical - -def check_masterguard_power(item, params, info): - warn, crit = params - for line in info: - if line[0] == item: - power = saveint(line[1]) - # Some "RPS SpA" systems are not RFC conform in this value. - # The values can get negative but should never be. - if power < 0: - power *= -1 - perfdata = [ ( "power", power, warn, crit, 0 ) ] - infotext = " - current power: %dW (warn/crit at %dW/%dW)" % \ - (power, warn, crit) - - if power <= crit: - return (2, "CRIT" + infotext, perfdata) - elif power <= warn: - return (1, "WARN" + infotext, perfdata) - else: - return (0, "OK" + infotext, perfdata) - - return (3, "UNKNOWN - Phase %s not found in SNMP output" % item) - -check_info['masterguard_power'] = { - "inventory_function" : lambda info: [ ( x[0], "masterguard_power_default_levels") for x in info ], - "check_function" : check_masterguard_power, - "service_description" : "Power phase %s", - "has_perfdata" : True, - "group" : "hw_temperature", - "snmp_info" : ( ".1.3.6.1.2.1.33.1.4.4.1", [ 0, 4 ] ), - "snmp_scan_function" : lambda oid: "masterguard" in oid('.1.3.6.1.2.1.1.1.0').lower(), -} diff --git a/checks/ups_power b/checks/ups_power index 2f8a48c..60b2019 100644 --- a/checks/ups_power +++ b/checks/ups_power @@ -24,61 +24,7 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. - -# SNMPv2-SMI::mib-2.33.1.1.1.0 = STRING: "GE" -# SNMPv2-SMI::mib-2.33.1.1.2.0 = STRING: "SitePro" -# SNMPv2-SMI::mib-2.33.1.1.3.0 = STRING: "2.12" -# SNMPv2-SMI::mib-2.33.1.1.4.0 = STRING: "GEDE CP5 SNMP/Web Interface Ver.1.0 (2008/05/09)" -# SNMPv2-SMI::mib-2.33.1.1.5.0 = STRING: "GEDE_SNMP_UPS_Interface" -# SNMPv2-SMI::mib-2.33.1.1.6.0 = STRING: "UPS attached device" -# SNMPv2-SMI::mib-2.33.1.2.1.0 = INTEGER: 2 -# SNMPv2-SMI::mib-2.33.1.2.2.0 = INTEGER: 0 -# SNMPv2-SMI::mib-2.33.1.2.3.0 = INTEGER: 150 -# SNMPv2-SMI::mib-2.33.1.2.4.0 = INTEGER: 100 -# SNMPv2-SMI::mib-2.33.1.2.5.0 = INTEGER: 4080 -# SNMPv2-SMI::mib-2.33.1.2.6.0 = INTEGER: 0 -# SNMPv2-SMI::mib-2.33.1.2.7.0 = INTEGER: 23 -# SNMPv2-SMI::mib-2.33.1.3.1.0 = Counter32: 13 -# SNMPv2-SMI::mib-2.33.1.3.2.0 = INTEGER: 3 -# SNMPv2-SMI::mib-2.33.1.3.3.1.2.1 = INTEGER: 499 -# SNMPv2-SMI::mib-2.33.1.3.3.1.3.1 = INTEGER: 377 -# SNMPv2-SMI::mib-2.33.1.3.3.1.3.2 = INTEGER: 378 -# SNMPv2-SMI::mib-2.33.1.3.3.1.3.3 = INTEGER: 378 -# SNMPv2-SMI::mib-2.33.1.4.1.0 = INTEGER: 3 -# SNMPv2-SMI::mib-2.33.1.4.2.0 = INTEGER: 500 -# SNMPv2-SMI::mib-2.33.1.4.3.0 = INTEGER: 3 -# SNMPv2-SMI::mib-2.33.1.4.4.1.2.1 = INTEGER: 232 -# SNMPv2-SMI::mib-2.33.1.4.4.1.2.2 = INTEGER: 232 -# SNMPv2-SMI::mib-2.33.1.4.4.1.2.3 = INTEGER: 232 -# SNMPv2-SMI::mib-2.33.1.4.4.1.3.1 = INTEGER: 440 -# SNMPv2-SMI::mib-2.33.1.4.4.1.3.2 = INTEGER: 420 -# SNMPv2-SMI::mib-2.33.1.4.4.1.3.3 = INTEGER: 360 - -# ==> Here is the current power of the phases -# SNMPv2-SMI::mib-2.33.1.4.4.1.4.1 = INTEGER: 9508 -# SNMPv2-SMI::mib-2.33.1.4.4.1.4.2 = INTEGER: 9040 -# SNMPv2-SMI::mib-2.33.1.4.4.1.4.3 = INTEGER: 8128 - -# SNMPv2-SMI::mib-2.33.1.4.4.1.5.1 = INTEGER: 34 -# SNMPv2-SMI::mib-2.33.1.4.4.1.5.2 = INTEGER: 32 -# SNMPv2-SMI::mib-2.33.1.4.4.1.5.3 = INTEGER: 27 -# SNMPv2-SMI::mib-2.33.1.5.1.0 = INTEGER: 500 -# SNMPv2-SMI::mib-2.33.1.5.2.0 = INTEGER: 3 -# SNMPv2-SMI::mib-2.33.1.5.3.1.2.1 = INTEGER: 220 -# SNMPv2-SMI::mib-2.33.1.5.3.1.2.2 = INTEGER: 221 -# SNMPv2-SMI::mib-2.33.1.5.3.1.2.3 = INTEGER: 221 -# SNMPv2-SMI::mib-2.33.1.6.1.0 = Gauge32: 0 -# SNMPv2-SMI::mib-2.33.1.9.2.0 = INTEGER: 500 -# SNMPv2-SMI::mib-2.33.1.9.3.0 = INTEGER: 230 -# SNMPv2-SMI::mib-2.33.1.9.4.0 = INTEGER: 500 -# SNMPv2-SMI::mib-2.33.1.9.5.0 = INTEGER: 90000 -# SNMPv2-SMI::mib-2.33.1.9.7.0 = INTEGER: 3 -# SNMPv2-SMI::mib-2.33.1.9.8.0 = INTEGER: 2 - -ups_power_default_levels = (20, 1) # warning / critical *below* those levels (Watt) - -def inventory_ups_power(info): - return [ (line[0], "", "ups_power_default_levels") for line in info ] +ups_power_default_levels = (20, 1) # warning / critical def check_ups_power(item, params, info): warn, crit = params @@ -90,7 +36,7 @@ def check_ups_power(item, params, info): if power < 0: power *= -1 perfdata = [ ( "power", power, warn, crit, 0 ) ] - infotext = " - current power: %dW, (levels at %dW/%dW)" % \ + infotext = " - current power: %dW (warn/crit at %dW/%dW)" % \ (power, warn, crit) if power <= crit: @@ -102,11 +48,14 @@ def check_ups_power(item, params, info): return (3, "UNKNOWN - Phase %s not found in SNMP output" % item) -check_info['ups_power'] = ( check_ups_power, "Power phase %s", 1, inventory_ups_power ) -snmp_info['ups_power'] = ( ".1.3.6.1.2.1.33.1.4.4.1", [ 0, 4 ] ) -# also on some devices on: enterprises.818.1.1.10.4.4.1 -# .1.3.6.1.2.1.33.1.1.1.0 "RPS SpA": Some usvs only support the UPS-MIB -snmp_scan_functions['ups_power'] = \ - lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \ - [ ".1.3.6.1.4.1.818.1.100.1.1", ".1.3.6.1.2.1.33.2", ".1.3.6.1.2.1.33" ] \ - or oid('.1.3.6.1.2.1.33.1.1.1.0').startswith('RPS') +check_info['ups_power'] = { + "inventory_function" : lambda info: [ ( x[0], "ups_power_default_levels") for x in info ], + "check_function" : check_ups_power, + "service_description" : "Power phase %s", + "has_perfdata" : True, + "group" : "hw_temperature", + "snmp_info" : ( ".1.3.6.1.2.1.33.1.4.4.1", [ 0, 4 ] ), + "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in \ + [ ".1.3.6.1.4.1.818.1.100.1.1", ".1.3.6.1.2.1.33.2", ".1.3.6.1.2.1.33" ] \ + or oid('.1.3.6.1.2.1.33.1.1.1.0').startswith('RPS'), +}
12 years, 3 months
1
0
0
0
Check_MK Git: check_mk: Merged ups_capacity with masterguard_capacity
by git@mathias-kettner.de
Module: check_mk Branch: master Commit: c71ddffce4c821615e8522d6ecdf31aa798c0995 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c71ddffce4c821…
Author: Bastian Kuhn <bk(a)mathias-kettner.de> Date: Mon Sep 3 11:43:04 2012 +0200 Merged ups_capacity with masterguard_capacity --- checks/masterguard_capacity | 52 ------------------------------------------- checks/ups_capacity | 10 +++++-- 2 files changed, 7 insertions(+), 55 deletions(-) diff --git a/checks/masterguard_capacity b/checks/masterguard_capacity deleted file mode 100644 index 6272a82..0000000 --- a/checks/masterguard_capacity +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/python -# -*- encoding: utf-8; py-indent-offset: 4 -*- -# +------------------------------------------------------------------+ -# | ____ _ _ __ __ _ __ | -# | / ___| |__ ___ ___| | __ | \/ | |/ / | -# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | -# | | |___| | | | __/ (__| < | | | | . \ | -# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | -# | | -# | Copyright Mathias Kettner 2012 mk(a)mathias-kettner.de | -# +------------------------------------------------------------------+ -# -# This file is part of Check_MK. -# The official homepage is at
http://mathias-kettner.de/check_mk
. -# -# check_mk 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 in version 2. check_mk is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with- -# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more de- -# ails. You should have received a copy of the GNU General Public -# License along with GNU Make; see the file COPYING. If not, write -# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -# Boston, MA 02110-1301 USA. - - -# ==> Remaining capacity in estimated minutes -# SNMPv2-SMI::mib-2.33.1.2.3.0 = INTEGER: 150 - -masterguard_capacity_default_levels = (20, 10) - -def check_masterguard_capacity(item, params, info): - warn, crit = params - minutes = int(info[0][0]) - message = " - remaining capacity is estimated %d minutes" % minutes - state = 0 - if minutes <= warn: - state = 1 - if minutes <= crit: - state = 2 - perf = [("capacity", minutes, warn, crit)] - return (state, nagios_state_names[state] + message, perf ) - -check_info['masterguard_capacity'] = { - "inventory_function" : lambda info: [( None, "masterguard_capacity_default_levels")], - "check_function" : check_masterguard_capacity, - "service_description" : "Battery capacity", - "has_perfdata" : True, - "snmp_info" : ( ".1.3.6.1.2.1.33.1.2", [ "3.0" ] ), - "snmp_scan_function" : lambda oid: "masterguard" in oid('.1.3.6.1.2.1.1.1.0').lower(), -} diff --git a/checks/ups_capacity b/checks/ups_capacity index 228e7c6..4f12489 100644 --- a/checks/ups_capacity +++ b/checks/ups_capacity @@ -53,7 +53,7 @@ def check_ups_capacity(item, params, info): if params != None: warn, crit = params else: - warn, crit = ups_capacity_defaul_levels + warn, crit = (0, 0) time_on_bat, minutes_left, percent_fuel = map(int, info[0]) perf = [ @@ -72,6 +72,10 @@ check_info["ups_capacity"] = { "inventory_function" : inventory_ups_capacity, "service_description" : "Battery capacity", "has_perfdata" : True, - "snmp_scan_function" : lambda oid: (".1.3.6.1.2.1.33.1.2.3.0"), - "snmp_info" : ( ".1.3.6.1.2.1.33.1.2", [ "2.0" , "3.0" ,"4.0" ] ) + "snmp_info" : ( ".1.3.6.1.2.1.33.1.2", [ "2.0" , "3.0" ,"4.0" ] ), + "snmp_scan_function" : lambda oid:"masterguard" in oid(".1.3.6.1.2.1.1.1.0").lower() or \ + "CS121" in oid(".1.3.6.1.2.1.1.1.0") or \ + oid(".1.3.6.1.2.1.1.2.0") in \ + [ ".1.3.6.1.4.1.818.1.100.1.1", ".1.3.6.1.2.1.33.2" ] \ + or oid('.1.3.6.1.2.1.33.1.1.1.0').startswith('RPS') }
12 years, 3 months
1
0
0
0
← Newer
1
...
19
20
21
22
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Results per page:
10
25
50
100
200