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
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
August 2013
----- 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
6 participants
167 discussions
Start a n
N
ew thread
Check_MK Git: check_mk: FIX: zpool_status: Ignoring "No known data errors" text
by Lars Michelsen
Module: check_mk Branch: master Commit: 2f4a25ad831ff0da27da4defd17e03943d2c4ddb URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2f4a25ad831ff0…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Aug 19 10:12:09 2013 +0200 FIX: zpool_status: Ignoring "No known data errors" text --- ChangeLog | 1 + checks/zpool_status | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1e5af32..7497da1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -293,6 +293,7 @@ * FIX: blade_powerfan: fix mixup of default levels 50/40 -> 40/50 * FIX: Cleaned up graph rendering of Check_MK services * FIX: zypper: deal with output from SLES 10 + * FIX: zpool_status: Ignoring "No known data errors" text Multisite: * FIX: LDAP: Disabling use of referrals in active directory configuration diff --git a/checks/zpool_status b/checks/zpool_status index 6a5ac77..0289065 100644 --- a/checks/zpool_status +++ b/checks/zpool_status @@ -87,7 +87,9 @@ def check_zpool_status(_no_item, _no_params, info): if line[0] == "errors:": start_pool = False - pool_messages[last_pool] = " ".join(line[1:]) + msg = " ".join(line[1:]) + if msg != 'No known data errors': + pool_messages[last_pool] = msg continue if line[0] == "spares":
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Help texts of rules can now also be listed in rule lists ( set wato_hide_help_in_lists to False)
by Lars Michelsen
Module: check_mk Branch: master Commit: 3aa88f0c6ee336757338215d0d9d904e592281e0 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3aa88f0c6ee336…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Aug 19 09:05:20 2013 +0200 Help texts of rules can now also be listed in rule lists (set wato_hide_help_in_lists to False) --- web/htdocs/js/checkmk.js | 10 ++++++++++ web/htdocs/wato.css | 10 ++++++++++ web/htdocs/wato.py | 6 +++++- web/plugins/config/wato.py | 29 ++++++++++++++-------------- web/plugins/wato/check_mk_configuration.py | 8 ++++++++ 5 files changed, 48 insertions(+), 15 deletions(-) diff --git a/web/htdocs/js/checkmk.js b/web/htdocs/js/checkmk.js index c65cabd..2fcd72a 100644 --- a/web/htdocs/js/checkmk.js +++ b/web/htdocs/js/checkmk.js @@ -1761,6 +1761,16 @@ function help_switch(how) { helpdivs[i].style.display = how ? "block" : "none"; } + // small hack for wato ruleset lists, toggle the "nofloat" class + // on those objects to make the layout possible + var rulesetdivs = document.getElementsByClassName('ruleset'); + for (var i = 0; i < rulesetdivs.length; i++) { + if (how) + add_class(rulesetdivs[i], 'nofloat'); + else + remove_class(rulesetdivs[i], 'nofloat'); + } + get_url("ajax_switch_help.py?enabled=" + (how ? "yes" : "")); } diff --git a/web/htdocs/wato.css b/web/htdocs/wato.css index 134a24a..90d82bc 100644 --- a/web/htdocs/wato.css +++ b/web/htdocs/wato.css @@ -781,6 +781,16 @@ div.rulesets table.nform tr.bottom td { /* color: #444; */ } +.wato .rulesets div.ruleset.nofloat { + float: none; + clear: left; +} + +.wato .rulesets div.ruleset div.help { + height: auto; + clear: left; +} + /* Page edit_ruleset */ div.varname { color: white; diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index e4d489e..2a714c4 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -10301,16 +10301,20 @@ def mode_rulesets(phase): something_shown = True + float_cls = (not config.wato_hide_help_in_lists and html.help_visible) and ' nofloat' or '' url_vars = [("mode", "edit_ruleset"), ("varname", varname)] if only_host: url_vars.append(("host", only_host)) view_url = make_link(url_vars) - html.write('<div class=ruleset title="%s"><div class=text>' % html.strip_tags(rulespec["help"])) + html.write('<div class="ruleset%s" title="%s"><div class=text>' % + (float_cls, html.strip_tags(rulespec["help"] or ''))) html.write('<a class="%s" href="%s">%s</a>' % (num_rules and "nonzero" or "zero", view_url, rulespec["title"])) html.write('<span class=dots>%s</span></div>' % ("." * 100)) html.write('<div class="rulecount %s">%d</div>' % (num_rules and "nonzero" or "zero", num_rules)) + if not config.wato_hide_help_in_lists and rulespec["help"]: + html.help(rulespec["help"]) html.write('</div>') if something_shown: diff --git a/web/plugins/config/wato.py b/web/plugins/config/wato.py index 8251a77..744dde1 100644 --- a/web/plugins/config/wato.py +++ b/web/plugins/config/wato.py @@ -24,20 +24,21 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -wato_enabled = True -wato_host_tags = [] -wato_aux_tags = [] -wato_hide_filenames = True -wato_hide_hosttags = False -wato_hide_varnames = True -wato_max_snapshots = 50 -wato_num_hostspecs = 12 -wato_num_itemspecs = 15 -wato_activation_method = 'restart' -wato_write_nagvis_auth = False -wato_use_git = False -wato_hidden_users = [] -wato_user_attrs = [] +wato_enabled = True +wato_host_tags = [] +wato_aux_tags = [] +wato_hide_filenames = True +wato_hide_hosttags = False +wato_hide_varnames = True +wato_hide_help_in_lists = True +wato_max_snapshots = 50 +wato_num_hostspecs = 12 +wato_num_itemspecs = 15 +wato_activation_method = 'restart' +wato_write_nagvis_auth = False +wato_use_git = False +wato_hidden_users = [] +wato_user_attrs = [] def tag_alias(tag): for entry in wato_host_tags: diff --git a/web/plugins/wato/check_mk_configuration.py b/web/plugins/wato/check_mk_configuration.py index e6dbab2..85d5344 100644 --- a/web/plugins/wato/check_mk_configuration.py +++ b/web/plugins/wato/check_mk_configuration.py @@ -399,6 +399,14 @@ register_configvar(group, register_configvar(group, + "wato_hide_help_in_lists", + Checkbox(title = _("Hide help text of rules in list views"), + label = _("hide help text"), + help = _("When disabled, WATO shows the help texts of the rules also in the list views."), + default_value = True), + domain = "multisite") + +register_configvar(group, "wato_use_git", Checkbox(title = _("Use GIT version control for WATO"), label = _("enable GIT version control"),
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: performance data of apc_symmetra extended by runtime, pnp template polished
by Götz Golla
Module: check_mk Branch: master Commit: ab6394529db1232cdbf8e33569540363ec363a67 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ab6394529db123…
Author: Götz Golla <gg(a)mathias-kettner.de> Date: Wed Aug 14 17:20:20 2013 +0200 performance data of apc_symmetra extended by runtime, pnp template polished --- checks/apc_symmetra | 4 +-- pnp-templates/check_mk-apc_symmetra.php | 49 +++++++++++++++++++------------ 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/checks/apc_symmetra b/checks/apc_symmetra index a06f959..1dda539 100644 --- a/checks/apc_symmetra +++ b/checks/apc_symmetra @@ -121,10 +121,10 @@ def check_apc(item, params, info): single_states.append( (0, "output current %dA" % AdvOutputCurrent, ("current", AdvOutputCurrent)) ) # 8. run time remaining - # RunTimeRemaining == "0:0:26:00.00" + # RunTimeRemaining formatiert == "26:00.00" hrs = int(RunTimeRemaining) / 3600 mins, secs = divmod(int(RunTimeRemaining) % 3600, 60) - single_states.append( (0, "run time remaining: %02d:%02d:%02d" % (hrs, mins, secs), None) ) + single_states.append( (0, "run time remaining: %02d:%02d:%02d" % (hrs, mins, secs), ("runtime", RunTimeRemaining/60)) ) # create summary state worst_state = max([x[0] for x in single_states]) diff --git a/pnp-templates/check_mk-apc_symmetra.php b/pnp-templates/check_mk-apc_symmetra.php index fe18dc2..fa6de89 100644 --- a/pnp-templates/check_mk-apc_symmetra.php +++ b/pnp-templates/check_mk-apc_symmetra.php @@ -23,26 +23,28 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -$opt[1] = "--vertical-label \"Celsius\" -l 0 -u 60 --title \"Battery temperature\" "; - $color = sprintf("ff%02x80", $ACT[2] * 3, $ACT[2] * 2); -$def[1] = "DEF:var1=$RRDFILE[2]:$DS[2]:MAX "; -$def[1] .= "AREA:var1#$color:\"Temperature\:\" "; -$def[1] .= "GPRINT:var1:LAST:\"%2.0lfC\" "; -$def[1] .= "LINE1:var1#800040:\"\" "; -$def[1] .= "GPRINT:var1:MAX:\"(Max\: %2.0lfC,\" "; -$def[1] .= "GPRINT:var1:AVERAGE:\"Avg\: %2.0lfC)\" "; -$def[1] .= "HRULE:$CRIT[2]#FF0000:\"Critical\: $CRIT[2]C\" "; - -$opt[2] = "--vertical-label \"Percent\" -l 0 -u 100 --title \"Battery Capacity\" "; -$def[2] = "DEF:var2=$RRDFILE[1]:$DS[1]:MIN "; -$def[2] .= "AREA:var2#80e0c0:\"Capacity\:\" "; -$def[2] .= "GPRINT:var2:LAST:\"%2.0lf%%\" "; -$def[2] .= "LINE1:var2#008040:\"\" "; -$def[2] .= "GPRINT:var2:MAX:\"(Max\: %2.0lf%%,\" "; -$def[2] .= "GPRINT:var2:AVERAGE:\"Avg\: %2.0lf%%)\" "; -$def[2] .= "HRULE:$CRIT[1]#FF0000:\"Critical\: $CRIT[1]%\" "; +$opt[1] = "--vertical-label \"Percent\" -u 100 --title \"Battery Capacity\" "; +$def[1] = "DEF:var2=$RRDFILE[1]:$DS[1]:MIN "; +$def[1] .= "AREA:var2#80e0c0:\"Capacity\:\" "; +$def[1] .= "GPRINT:var2:LAST:\"%2.0lf%%\" "; +$def[1] .= "LINE1:var2#008040:\"\" "; +$def[1] .= "GPRINT:var2:MIN:\"(Min\: %2.0lf%%,\" "; +$def[1] .= "GPRINT:var2:MAX:\"Max\: %2.0lf%%,\" "; +$def[1] .= "GPRINT:var2:AVERAGE:\"Avg\: %2.0lf%%)\" "; +$def[1] .= "HRULE:$CRIT[1]#FF0000:\"Critical\: $CRIT[1]%\" "; + +$opt[2] = "--vertical-label \"Celsius\" -u 60 --title \"Battery temperature\" "; +$def[2] = "DEF:var1=$RRDFILE[2]:$DS[2]:MAX "; +$def[2] .= "AREA:var1#$color:\"Temperature\:\" "; +$def[2] .= "GPRINT:var1:LAST:\"%2.0lfC\" "; +$def[2] .= "LINE1:var1#800040:\"\" "; +$def[2] .= "GPRINT:var1:MIN:\"(min\: %2.0lfC,\" "; +$def[2] .= "GPRINT:var1:MAX:\"max\: %2.0lfC,\" "; +$def[2] .= "GPRINT:var1:AVERAGE:\"Avg\: %2.0lfC)\" "; +$def[2] .= "HRULE:$CRIT[2]#FF0000:\"Critical\: $CRIT[2]C\" "; + $opt[3] = "--vertical-label \"Ampere\" -l -0 --title \"Currencies\" "; $def[3] = "DEF:batcur=$RRDFILE[3]:$DS[3]:MAX "; @@ -52,7 +54,7 @@ $def[3] .= "GPRINT:batcur:LAST:\"%2.0lfA\" "; $def[3] .= "LINE:outcur#00c0c0:\"Output Currency\:\" "; $def[3] .= "GPRINT:outcur:LAST:\"%2.0lfA\" "; -$opt[4] = "--vertical-label \"Volt\" -l 0 -u 250 --title \"Output Voltage\" "; +$opt[4] = "--vertical-label \"Volt\" -u 250 --title \"Output Voltage\" "; $def[4] = "DEF:volt=$RRDFILE[4]:$DS[4]:MIN "; $def[4] .= "GPRINT:volt:LAST:\"%2.0lfV\" "; $def[4] .= "LINE1:volt#408040:\"\" "; @@ -60,4 +62,13 @@ $def[4] .= "GPRINT:volt:MIN:\"(min\: %2.0lfV,\" "; $def[4] .= "GPRINT:volt:AVERAGE:\"avg\: %2.0lfV)\" "; $def[4] .= "HRULE:$CRIT[4]#FF0000:\"Critical\: $CRIT[4]V\" "; +$opt[5] = "--vertical-label \"Time\" --title \"Remaining Runtime\" "; +$def[5] = "DEF:minutes=$RRDFILE[6]:$DS[6]:MIN "; +$def[5] .= "GPRINT:minutes:LAST:\"%2.0lfmin\" "; +$def[5] .= "LINE1:minutes#408040:\"\" "; +$def[5] .= "GPRINT:minutes:MIN:\"(min\: %2.0lfmin,\" "; +$def[5] .= "GPRINT:minutes:MAX:\"max\: %2.0lfmin,\" "; +$def[5] .= "GPRINT:minutes:AVERAGE:\"avg\: %2.0lfmin)\" "; +#$def[5] .= "HRULE:$CRIT[4]#FF0000:\"Critical\: $CRIT[4]V\" "; + ?>
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: no perf data for ups_test
by Götz Golla
Module: check_mk Branch: master Commit: effed7503fa618dbd00d0cc053604ce1d61c9115 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=effed7503fa618…
Author: Götz Golla <gg(a)mathias-kettner.de> Date: Wed Aug 14 16:44:40 2013 +0200 no perf data for ups_test --- checks/ups_test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/checks/ups_test b/checks/ups_test index 677aef8..e36a881 100644 --- a/checks/ups_test +++ b/checks/ups_test @@ -121,14 +121,14 @@ def check_ups_test(item, params, info): ResultsDetail = "%s%s Time elapsed since test: %s%s" % (line[-1], state_label, etime, time_label) - perf = [ ( "ElapsedTime", ElapsedTime, warn, crit) ] - return (state, ResultsDetail, perf ) + #perf = [ ( "ElapsedTime", ElapsedTime, warn, crit) ] + return (state, ResultsDetail ) check_info['ups_test'] = { "inventory_function" : inventory_ups_test, "check_function" : check_ups_test, "service_description" : "UPS Test", - "has_perfdata" : True, + "has_perfdata" : False, "group" : "ups_test", "snmp_info" : ( ".1.3.6.1.2.1.33.1.7", [3,5,6,4 ] ), "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") in [".1.3.6.1.4.1.534.1"]
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: more verbose infotext for apc_symmetra check
by Götz Golla
Module: check_mk Branch: master Commit: 2864732dc9414894c045bcf147b853d21eb18cb4 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2864732dc94148…
Author: Götz Golla <gg(a)mathias-kettner.de> Date: Wed Aug 14 16:41:19 2013 +0200 more verbose infotext for apc_symmetra check --- checks/apc_symmetra | 3 +- checks/apc_symmetra_test | 148 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 150 insertions(+), 1 deletion(-) diff --git a/checks/apc_symmetra b/checks/apc_symmetra index 7c2ee3e..a06f959 100644 --- a/checks/apc_symmetra +++ b/checks/apc_symmetra @@ -72,7 +72,8 @@ def check_apc(item, params, info): 6:"software bypass", 7:"off", 8:"rebooting", 9:"switched bypass", 10:"hardware failure bypass", 11:"sleeping until power return", 12:"on smart trim" } - infotxt = "output status: %s" % (status_text.get(BasicOutputStatus)) + calib_text = { 1:"", 2:"/calibration invalid", 3:"/calibration in progress" } + infotxt = "output status: %s%s" % (status_text.get(BasicOutputStatus), calib_text.get(AdvTestCalibrationResults)) if BasicOutputStatus not in [2, 4, 12] and AdvTestCalibrationResults != 3: state = 2 infotxt += "(!!)" diff --git a/checks/apc_symmetra_test b/checks/apc_symmetra_test new file mode 100644 index 0000000..e9597e7 --- /dev/null +++ b/checks/apc_symmetra_test @@ -0,0 +1,148 @@ +#!/usr/bin/python +# -*- encoding: utf-8; py-indent-offset: 4 -*- +# +------------------------------------------------------------------+ +# | ____ _ _ __ __ _ __ | +# | / ___| |__ ___ ___| | __ | \/ | |/ / | +# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / | +# | | |___| | | | __/ (__| < | | | | . \ | +# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ | +# | | +# | Copyright Mathias Kettner 2013 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. + +# We use the following OIDs: + + +# PowerNet-MIB::upsAdvTestDiagnosticsResults .1.3.6.1.4.1.318.1.1.1.7.2.3 +# upsAdvTestDiagnosticsResults OBJECT-TYPE +# SYNTAX INTEGER { +# ok(1), +# failed(2), +# invalidTest(3), +# testInProgress(4) +# } +# ACCESS read-only +# STATUS mandatory +# DESCRIPTION +# "The results of the last UPS diagnostics test performed." +# ::= { upsAdvTest 3 } + +# PowerNet-MIB::upsAdvTestLastDiagnosticsDate .1.3.6.1.4.1.318.1.1.1.7.2.4 +# upsAdvTestLastDiagnosticsDate OBJECT-TYPE +# SYNTAX DisplayString +# ACCESS read-only +# STATUS mandatory +# DESCRIPTION +# "The date the last UPS diagnostics test was performed in +# mm/dd/yy format." +# ::= { upsAdvTest 4 } +# + +# PowerNet-MIB::upsAdvTestCalibrationResults .1.3.6.1.4.1.318.1.1.1.7.2.6 +# upsAdvTestCalibrationResults OBJECT-TYPE +# SYNTAX INTEGER { +# ok(1), +# invalidTest(2), +# calibrationInProgress(3) +# } +# ACCESS read-only +# STATUS mandatory +# DESCRIPTION +# "The results of the last runtime calibration. +# +# Value ok(1) means a successful runtime calibration. +# +# Value invalidTest(2) indicates last calibration did +# not take place since the battery capacity was below +# 100%. +# +# Value calibrationInProgress(3) means a calibration +# is occurring now. " +# ::= { upsAdvTest 6 } + +# PowerNet-MIB::upsAdvTestCalibrationDate .1.3.6.1.4.1.318.1.1.1.7.2.7 +# upsAdvTestCalibrationDate OBJECT-TYPE +# SYNTAX DisplayString +# ACCESS read-only +# STATUS mandatory +# DESCRIPTION +# "The date the last UPS runtime calibration was +# performed in mm/dd/yy format." +# ::= { upsAdvTest 7 } + + + +# levels refer to the apc_symentra group which has 6 values, +# only the last two are needed in this test +# the others belong to the apc_symmetra check + +import datetime + +apc_test_default_levels = ( 0, 0, 0, 0, 0, 0 ) + +def check_apc_test(item, params, info): + warn, crit = params[4:] + line = info[0] + DiagnosticsResults, CalibrationResults = map(saveint, line[0:2]) + LastDiagnosticsDate, TestCalibrationDate = line[2:4] + + month, day, year = map(saveint, LastDiagnosticsDate.split('/')) + last_diag_date = datetime.date( year, month, day) + today = datetime.date.today() + diag_diff = today - last_diag_date + dcrit = datetime.timedelta(days=crit) + dwarn = datetime.timedelta(days=warn) + + diagnostic_status_text = { 1:"OK", 2:"failed", 3:"invalid", 4:"in progress" } + calibration_status_text = { 1:"OK", 2:"invalid", 3:"in progress" } + + state = 0 + diag_label = "" + if DiagnosticsResults == 2: + state = 2 + diag_label = "(!!)" + elif DiagnosticsResults == 3: + state = 1 + diag_label = "(!)" + + time_label = "" + if crit != 0 and diag_diff >= dcrit: + state = 2 + time_label = "(!!)" + elif warn != 0 and diag_diff >= dwarn: + state = max(state, 1) + time_label = "(!)" + + ResultsDetail = "Result of self test: %s%s, Date of last test: %s%s" \ + % (diagnostic_status_text.get(DiagnosticsResults), diag_label, LastDiagnosticsDate, time_label) + + return (state, ResultsDetail ) + +def inventory_apc_test(info): + if len(info) > 0: + return [(None, "apc_test_default_levels")] + + +check_info['apc_symmetra_test'] = { + "inventory_function" : inventory_apc_test, + "check_function" : check_apc_test, + "service_description" : "APC Symmetra Test Status", + "has_perfdata" : False, + "group" : "apc_symentra", + "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.318.1.3"), + "snmp_info" : (".1.3.6.1.4.1.318.1.1.1.7.2", [ 3,6,4,7 ] ) +}
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: apc symmetra checks extended with calibration and an extra check for diagnostic test
by Götz Golla
Module: check_mk Branch: master Commit: b5f16ff6be7987dbbf7e71795fb1903e698c3e5f URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b5f16ff6be7987…
Author: Götz Golla <gg(a)mathias-kettner.de> Date: Wed Aug 14 16:22:29 2013 +0200 apc symmetra checks extended with calibration and an extra check for diagnostic test --- checks/apc_symmetra | 23 +++++++++++++++-------- checks/ups_test | 2 +- web/plugins/wato/check_parameters.py | 32 +++++++++++++++++++++++++++----- 3 files changed, 43 insertions(+), 14 deletions(-) diff --git a/checks/apc_symmetra b/checks/apc_symmetra index a4b0a1c..7c2ee3e 100644 --- a/checks/apc_symmetra +++ b/checks/apc_symmetra @@ -32,27 +32,34 @@ # PowerNet-MIB::upsAdvBatteryCurrent.0 .1.3.6.1.4.1.318.1.1.1.2.2.9.0 # PowerNet-MIB::upsAdvOutputVoltage.0 .1.3.6.1.4.1.318.1.1.1.4.2.1.0 # PowerNet-MIB::upsAdvOutputCurrent.0 .1.3.6.1.4.1.318.1.1.1.4.2.4.0 +# PowerNet-MIB::upsAdvBatteryRunTimeRemaining.0 .1.3.6.1.4.1.318.1.1.1.2.2.3.0 +# PowerNet-MIB::upsAdvTestCalibrationResults .1.3.6.1.4.1.318.1.1.1.7.2.6 # upsBasicBatteryStatus: unknown(1), batteryNormal(2), batteryLow(3) # upsBasicOutputStatus: unknown(1), onLine(2), onBattery(3), onSmartBoost(4), # timedSleeping(5), softwareBypass(6), off(7), rebooting(8), switchedBypass(9), # hardwareFailureBypass(10), sleepingUntilPowerReturn(11), onSmartTrim(12) +# upsAdvTestCalibrationResults: ok(1), invalidTest(2), calibrationInProgress(3) -apc_default_levels = ( 95, 40, 1, 220 ) +# levels refer to the apc_symentra group which has 6 values, +# only the first four are needed in this test +# the others belong to the apc_symmetra_test check +apc_default_levels = ( 95, 40, 1, 220, 0, 0 ) def check_apc(item, params, info): BasicBatteryStatus, BasicOutputStatus, AdvBatteryCapacity, \ AdvBatteryTemperature, AdvBatteryCurrent, AdvOutputVoltage, \ - AdvOutputCurrent = [ saveint(x) for x in info[0][:7] ] - RunTimeRemaining = int(info[0][7]) / 100 + AdvOutputCurrent, AdvBatteryRunTimeRemaining, AdvTestCalibrationResults \ + = [ saveint(x) for x in info[0][:9] ] + RunTimeRemaining = AdvBatteryRunTimeRemaining / 100 - crit_capacity, crit_batt_temp, crit_batt_curr, crit_voltage = params + crit_capacity, crit_batt_temp, crit_batt_curr, crit_voltage = params[0:4] single_states = [] # 1. Check battery status status_text = { 1:"unknown", 2:"normal", 3:"low" } - infotxt = "Battery status %s" % (status_text.get(BasicBatteryStatus)) + infotxt = "Battery status: %s" % (status_text.get(BasicBatteryStatus)) if BasicBatteryStatus != 2: state = 2 infotxt += "(!!)" @@ -65,8 +72,8 @@ def check_apc(item, params, info): 6:"software bypass", 7:"off", 8:"rebooting", 9:"switched bypass", 10:"hardware failure bypass", 11:"sleeping until power return", 12:"on smart trim" } - infotxt = "output status %s" % (status_text.get(BasicOutputStatus)) - if BasicOutputStatus not in [2, 4, 12]: + infotxt = "output status: %s" % (status_text.get(BasicOutputStatus)) + if BasicOutputStatus not in [2, 4, 12] and AdvTestCalibrationResults != 3: state = 2 infotxt += "(!!)" else: @@ -138,5 +145,5 @@ check_info['apc_symmetra'] = { "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.318.1.3"), "snmp_info" : (".1.3.6.1.4.1.318.1.1.1", [ "2.1.1.0", "4.1.1.0", "2.2.1.0", "2.2.2.0", - "2.2.9.0", "4.2.1.0", "4.2.4.0", "2.2.3.0" ] ) + "2.2.9.0", "4.2.1.0", "4.2.4.0", "2.2.3.0", "7.2.6.0" ] ) } diff --git a/checks/ups_test b/checks/ups_test index d5d0497..677aef8 100644 --- a/checks/ups_test +++ b/checks/ups_test @@ -118,7 +118,7 @@ def check_ups_test(item, params, info): elif warn and ElapsedTime >= warn: state = max(state, 1) time_label = "(!)" - + ResultsDetail = "%s%s Time elapsed since test: %s%s" % (line[-1], state_label, etime, time_label) perf = [ ( "ElapsedTime", ElapsedTime, warn, crit) ] diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py index 212c77b..fe107ca 100644 --- a/web/plugins/wato/check_parameters.py +++ b/web/plugins/wato/check_parameters.py @@ -2880,24 +2880,46 @@ register_check_parameters( register_check_parameters( subgroup_os, "apc_symentra", - _("APC Symentra Checks"), + _("APC Symmetra Checks"), Tuple( elements = [ Integer( - title = _("Max. Crit Capacity"), + title = _("Critical Battery Capacity"), help = _("The battery capacity in percent at and below which a critical state is be triggered"), + unit = _("%"), + default_value = 95, ), Integer( - title = _("Max. Battery Temperature"), + title = _("Critical Battery Temperature"), help = _("The critical temperature of the battery"), + unit = _("C"), + default_value = 40, ), Integer( - title = _("Max. Current Power"), + title = _("Critical Battery Current"), help = _("The critical battery current in Ampere"), + unit = _("A"), + default_value = 1, ), Integer( - title = _("Min. Voltage"), + title = _("Critical Battery Voltage"), help = _("The output voltage at and below which a critical state is triggered."), + unit = _("V"), + default_value = 220, + ), + Integer( + title = _("Warning Level for time since last diagnostic test"), + help = _("Warning Level for time since last diagnostic test of the device. " + "For a value of 0 the warning level will not be used"), + unit = _("days"), + default_value = 0, + ), + Integer( + title = _("Critical Level for time since last diagnostic test"), + help = _("Critical Level for time since last diagnostic test of the device. " + "For a value of 0 the critical level will not be used"), + unit = _("days"), + default_value = 0, ), ] ),
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Host Tag Filter: fixed encoding problem
by Andreas Boesl
Module: check_mk Branch: master Commit: d0a7fe51cdfdb14ce190eca5d6fe4025182bd3cc URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0a7fe51cdfdb1…
Author: Andreas Boesl <ab(a)mathias-kettner.de> Date: Wed Aug 14 11:22:48 2013 +0200 Host Tag Filter: fixed encoding problem --- web/plugins/views/filters.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/plugins/views/filters.py b/web/plugins/views/filters.py index 2bc31a7..c454c5a 100644 --- a/web/plugins/views/filters.py +++ b/web/plugins/views/filters.py @@ -713,7 +713,10 @@ class FilterHostTags(Filter): title = tag_entry[1] if tag is None: tag = '' - grouped[entry[0]].append([tag, str(title)]) + + if type(title) == unicode: + title = title.encode("utf-8") + grouped[entry[0]].append([tag, title]) html.javascript('g_hosttag_groups = %r;' % grouped) html.write('<table>')
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Only apply foldertree reduce when folder is empty
by Lars Michelsen
Module: check_mk Branch: master Commit: 9248a31e636884de422d6da1029f7f99deb1984e URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9248a31e636884…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Aug 14 10:25:52 2013 +0200 Only apply foldertree reduce when folder is empty --- web/plugins/sidebar/wato.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/plugins/sidebar/wato.py b/web/plugins/sidebar/wato.py index 3cd3f66..d404f28 100644 --- a/web/plugins/sidebar/wato.py +++ b/web/plugins/sidebar/wato.py @@ -200,7 +200,7 @@ def render_wato_foldertree(): # top level def reduce_tree(folders): for folder_path, folder in folders.items(): - if len(folder['.folders']) == 1: + if len(folder['.folders']) == 1 and folder['.num_hosts'] == 0: child_path, child_folder = folder['.folders'].items()[0] folders[child_path] = child_folder del folders[folder_path]
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Fixed strange click behaviour when clicking context buttons
by Lars Michelsen
Module: check_mk Branch: master Commit: 673f321b95d6d28a86df7280afbe64461c78c8ca URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=673f321b95d6d2…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Aug 14 10:22:49 2013 +0200 Fixed strange click behaviour when clicking context buttons --- ChangeLog | 2 ++ web/htdocs/htmllib.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c6c361c..1e5af32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -117,6 +117,8 @@ * FIX: Fixed locking problem of multisite pages related to user loading/saving * FIX: Fixed wrong default settings of view filters in localized multisite * FIX: line wrapping of logwatch entries + * FIX: Fixed button dragging bug when opening the view editor + (at least in Firefox) WATO: * Allow to configure check-/retry_interval in second precision diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py index f85a6b0..d92a784 100644 --- a/web/htdocs/htmllib.py +++ b/web/htdocs/htmllib.py @@ -371,7 +371,7 @@ class html: if hover_title: self.write(' title="%s"' % hover_title) if bestof: - self.write(' onmousedown="count_context_button(this); document.location=this.href; " ') + self.write(' onclick="count_context_button(this); document.location=this.href; " ') if fkey and self.keybindings_enabled: title += '<div class=keysym>F%d</div>' % fkey self.add_keybinding([html.F1 + (fkey - 1)], "document.location='%s';" % url)
10 years, 10 months
1
0
0
0
Check_MK Git: check_mk: Also showing help text in global settings via hover
by Lars Michelsen
Module: check_mk Branch: master Commit: 4e10c9958195636eccf8ed4bb00ddec1c07edbfa URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4e10c995819563…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Aug 14 10:17:55 2013 +0200 Also showing help text in global settings via hover --- web/htdocs/wato.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py index d75bc24..e4d489e 100644 --- a/web/htdocs/wato.py +++ b/web/htdocs/wato.py @@ -5681,7 +5681,8 @@ def mode_globalvars(phase): defaultvalue = default_values.get(varname, valuespec.default_value()) edit_url = make_link([("mode", "edit_configvar"), ("varname", varname)]) - title = '<a href="%s">%s</a>' % (edit_url, valuespec.title()) + title = '<a href="%s" title="%s">%s</a>' % \ + (edit_url, html.strip_tags(valuespec.help() or ''), valuespec.title()) if varname in current_settings: to_text = valuespec.value_to_text(current_settings[varname]) @@ -10308,8 +10309,8 @@ def mode_rulesets(phase): html.write('<a class="%s" href="%s">%s</a>' % (num_rules and "nonzero" or "zero", view_url, rulespec["title"])) html.write('<span class=dots>%s</span></div>' % ("." * 100)) - html.write('<div class="rulecount %s" title="%s">%d</div>' % - (num_rules and "nonzero" or "zero", title, num_rules)) + html.write('<div class="rulecount %s">%d</div>' % + (num_rules and "nonzero" or "zero", num_rules)) html.write('</div>') if something_shown:
10 years, 10 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
17
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Results per page:
10
25
50
100
200