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
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
April 2017
----- 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
11 participants
159 discussions
Start a n
N
ew thread
Updated Werks
by Mathias Kettner
Module: check_mk Branch: master Commit: bdf9dffd9bfc205df05cbc73464d18f0e4d3a875 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bdf9dffd9bfc20…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Apr 18 10:48:22 2017 +0200 Updated Werks Change-Id: I5959c4e2e81bc82785bea1f5fe135a6b6906a32e --- .werks/4497 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.werks/4497 b/.werks/4497 index e8cd399..f71c528 100644 --- a/.werks/4497 +++ b/.werks/4497 @@ -1,6 +1,6 @@ Title: Alert handling: Added several missing match conditions -Level: 1 -Component: core +Level: 2 +Component: alerts Compatible: compat Edition: cee Version: 1.5.0i1
7 years, 5 months
1
0
0
0
4616 FIX mk_postgres/mk_db2.linux: Fixed quotes which lead into wrong interpretation
by Marcel Arentz
Module: check_mk Branch: master Commit: de2167f37bdd1f04d2235f50736816ad47e82e4a URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=de2167f37bdd1f…
Author: Marcel Arentz <ma(a)mathias-kettner.de> Date: Tue Apr 11 12:24:24 2017 +0200 4616 FIX mk_postgres/mk_db2.linux: Fixed quotes which lead into wrong interpretation The double quotes in awk of the function compare_version_greater_euqal lead into a bash interpreting of the $1 variable expansion. In consequence the comparison between e.g. 9.0 and 7.3 resultet in a return 1. This misbehaviour has been fixed now. Change-Id: Ibf69d13979d691404d5bb4fdfa048304d18e3f1e --- .werks/4616 | 13 +++++++++++++ agents/plugins/mk_db2.linux | 2 +- agents/plugins/mk_postgres | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.werks/4616 b/.werks/4616 new file mode 100644 index 0000000..cb7d4f0 --- /dev/null +++ b/.werks/4616 @@ -0,0 +1,13 @@ +Title: mk_postgres/mk_db2.linux: Fixed quotes which lead into wrong interpretation +Level: 1 +Component: checks +Compatible: compat +Edition: cre +Version: 1.5.0i1 +Date: 1491906005 +Class: fix + +The double quotes in awk of the function compare_version_greater_euqal lead +into a bash interpreting of the $1 variable expansion. In consequence the +comparison between e.g. 9.0 and 7.3 resultet in a return 1. This misbehaviour +has been fixed now. diff --git a/agents/plugins/mk_db2.linux b/agents/plugins/mk_db2.linux index cf1d0d5..3f5793b 100755 --- a/agents/plugins/mk_db2.linux +++ b/agents/plugins/mk_db2.linux @@ -70,7 +70,7 @@ function query_instances { function compare_version_greater_equal { - GREATER_ONE=\\\$(echo "\\\$1 \\\$2" | awk "{if (\\\$1 >= \\\$2) print \\\$1; else print \\\$2}") + GREATER_ONE=\\\$(echo "\\\$1 \\\$2" | awk '{if (\\\$1 >= \\\$2) print \\\$1; else print \\\$2}') if [ \\\$GREATER_ONE == \\\$1 ] ; then return 0 else diff --git a/agents/plugins/mk_postgres b/agents/plugins/mk_postgres index 77837d8..afb551c 100755 --- a/agents/plugins/mk_postgres +++ b/agents/plugins/mk_postgres @@ -33,7 +33,7 @@ else fi function compare_version_greater_equal() { - GREATER_ONE=$(echo "$1 $2" | awk "{if ($1 >= $2) print $1; else print $2}") + GREATER_ONE=$(echo "$1 $2" | awk '{if ($1 >= $2) print $1; else print $2}') if [ $GREATER_ONE == $1 ] ; then return 0 else
7 years, 5 months
1
0
0
0
4555 FIX apc_humidity: Fixed missing conversion from old format of parameters to new one
by Marcel Arentz
Module: check_mk Branch: master Commit: 4fba595cf10ab3ef7fdd2bf66f2ce05c43d1666b URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4fba595cf10ab3…
Author: Marcel Arentz <ma(a)mathias-kettner.de> Date: Tue Apr 11 10:49:40 2017 +0200 4555 FIX apc_humidity: Fixed missing conversion from old format of parameters to new one The missing conversion lead into a crash if thresholds has been set. Change-Id: I6ff9b99439e81d93341c84f93300d5cd4582fad8 --- .werks/4555 | 10 ++++++++++ checks/apc_humidity | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.werks/4555 b/.werks/4555 new file mode 100644 index 0000000..0b588cd --- /dev/null +++ b/.werks/4555 @@ -0,0 +1,10 @@ +Title: apc_humidity: Fixed missing conversion from old format of parameters to new one +Level: 1 +Component: checks +Compatible: compat +Edition: cre +Version: 1.5.0i1 +Date: 1491900478 +Class: fix + +The missing conversion lead into a crash if thresholds has been set. diff --git a/checks/apc_humidity b/checks/apc_humidity index de36623..0697748 100644 --- a/checks/apc_humidity +++ b/checks/apc_humidity @@ -25,7 +25,10 @@ # Boston, MA 02110-1301 USA. -apc_humidity_default_levels = (35, 40, 60, 65) +factory_settings["apc_humidity_default_levels"] = { + 'levels' : (40, 35), + 'levels_lower' : (60, 65), +} def inventory_apc_humidity(info): @@ -33,11 +36,20 @@ def inventory_apc_humidity(info): if int(line[1]) >= 0: yield line[0], "apc_humidity_default_levels" + def check_apc_humidity(item, params, info): + if isinstance(params, tuple): + params = { + 'levels' : (params[1], params[0]), + 'levels_lower' : (params[2], params[3]), + } + for line in info: if line[0] == item: + warnlow, critlow = params['levels_lower'] + warnhigh, crithigh = params['levels'] humidity = saveint(line[1]) - critlow, warnlow, warnhigh, crithigh = params + infotext = "%s%% (warn/crit below %.1f/%.1f or above %.1f/%.1f %%)" % \ ( humidity, warnlow, critlow, warnhigh, crithigh) perfdata = [ ( "humidity", humidity, critlow, warnlow, warnhigh, crithigh ) ] @@ -59,4 +71,5 @@ check_info["apc_humidity"] = { 'snmp_info': ('.1.3.6.1.4.1.318.1.1.10.4.2.3.1', ['3', '6']), '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"), 'group': 'humidity', + 'default_levels_variable' : 'apc_humidity_default_levels', }
7 years, 5 months
1
0
0
0
Reserved 10 Werk IDS
by Konstantin Büttner
Module: check_mk Branch: master Commit: 9c93013fd847ceb51bfc07f724a7080898e9800f URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9c93013fd847ce…
Author: Konstantin Büttner <kb(a)mathias-kettner.de> Date: Fri Apr 14 12:26:36 2017 +0200 Reserved 10 Werk IDS Change-Id: I2a2bd31bb19e69fc8d9b139dec1bc58f4fbe24de --- .werks/first_free | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.werks/first_free b/.werks/first_free index e2f5cf7..b02620c 100644 --- a/.werks/first_free +++ b/.werks/first_free @@ -1 +1 @@ -4626 +4636
7 years, 5 months
1
0
0
0
4588 FIX cisco_wlc, cisco_wlc_clients: Fixed missing OID for Cisco WLC-8510 devices
by Simon Betz
Module: check_mk Branch: master Commit: 76eaf6d23f0aa4b54e32d7c4fa1f01fe5e9e390c URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76eaf6d23f0aa4…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 13 13:51:07 2017 +0200 4588 FIX cisco_wlc, cisco_wlc_clients: Fixed missing OID for Cisco WLC-8510 devices Change-Id: Idc469fa2968ef2274d5e9d04b810f146988f74cc --- .werks/4588 | 11 +++++++++++ checks/cisco_wlc | 1 + checks/cisco_wlc_clients | 1 + 3 files changed, 13 insertions(+) diff --git a/.werks/4588 b/.werks/4588 new file mode 100644 index 0000000..890c61b --- /dev/null +++ b/.werks/4588 @@ -0,0 +1,11 @@ +Title: cisco_wlc, cisco_wlc_clients: Fixed missing OID for Cisco WLC-8510 devices +Level: 1 +Component: checks +Class: fix +Compatible: compat +Edition: cre +State: unknown +Version: 1.5.0i1 +Date: 1492084188 + + diff --git a/checks/cisco_wlc b/checks/cisco_wlc index 019b3b3..1e3d10c 100644 --- a/checks/cisco_wlc +++ b/checks/cisco_wlc @@ -64,6 +64,7 @@ check_info["cisco_wlc"] = { "snmp_scan_function" : lambda oid: oid('.1.3.6.1.2.1.1.2.0') in [ ".1.3.6.1.4.1.9.1.1069", ".1.3.6.1.4.1.14179.1.1.4.3", + ".1.3.6.1.4.1.9.1.1615", ".1.3.6.1.4.1.9.1.1645", ".1.3.6.1.4.1.9.1.1631", ".1.3.6.1.4.1.9.1.1279", diff --git a/checks/cisco_wlc_clients b/checks/cisco_wlc_clients index 86ca33f..79386f9 100644 --- a/checks/cisco_wlc_clients +++ b/checks/cisco_wlc_clients @@ -68,6 +68,7 @@ check_info["cisco_wlc_clients"] = { "has_perfdata" : True, "snmp_scan_function" : lambda oid: oid('.1.3.6.1.2.1.1.2.0') in [ ".1.3.6.1.4.1.9.1.1069", + ".1.3.6.1.4.1.9.1.1615", ".1.3.6.1.4.1.9.1.1645", ".1.3.6.1.4.1.9.1.1631", ".1.3.6.1.4.1.14179.1.1.4.3",
7 years, 5 months
1
0
0
0
Removed useless group which caused 'invalid parameters'
by Simon Betz
Module: check_mk Branch: master Commit: 467357f1c6f7cd2b9b1356cae5572d112c5a3a08 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=467357f1c6f7cd…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 13 12:40:34 2017 +0200 Removed useless group which caused 'invalid parameters' Change-Id: Iee83c522f9243a941b54f282bd20669770d2a6e3 --- checks/megaraid_pdisks | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks/megaraid_pdisks b/checks/megaraid_pdisks index 71e87ac..575013b 100644 --- a/checks/megaraid_pdisks +++ b/checks/megaraid_pdisks @@ -125,5 +125,5 @@ check_info["megaraid_pdisks"] = { 'check_function': check_megaraid_pdisks, 'inventory_function': inventory_megaraid_pdisks, 'service_description': 'RAID PDisk Adapt/Enc/Sl %s', - 'group': 'raid_disk', + 'has_perfdata': False, }
7 years, 5 months
1
0
0
0
4587 FIX juniper_trpz_aps, juniper_trpz_aps_sessions: Fixed missing OID for WLC800R series
by Simon Betz
Module: check_mk Branch: master Commit: 2b5c798e1a55d3d73a95a08127e65848ca95b7f6 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2b5c798e1a55d3…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 13 12:10:56 2017 +0200 4587 FIX juniper_trpz_aps, juniper_trpz_aps_sessions: Fixed missing OID for WLC800R series Change-Id: I7e99e733b9a11f4d66c32fc4fca55415e2be997a --- .werks/4587 | 11 +++++++++++ checks/juniper_trpz_aps | 3 ++- checks/juniper_trpz_aps_sessions | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.werks/4587 b/.werks/4587 new file mode 100644 index 0000000..b9e19dc --- /dev/null +++ b/.werks/4587 @@ -0,0 +1,11 @@ +Title: juniper_trpz_aps, juniper_trpz_aps_sessions: Fixed missing OID for WLC800R series +Level: 1 +Component: checks +Class: fix +Compatible: compat +Edition: cre +State: unknown +Version: 1.5.0i1 +Date: 1492078119 + + diff --git a/checks/juniper_trpz_aps b/checks/juniper_trpz_aps index 6367fa0..79b6b73 100644 --- a/checks/juniper_trpz_aps +++ b/checks/juniper_trpz_aps @@ -60,7 +60,8 @@ check_info["juniper_trpz_aps"] = { "service_description" : "Access Points", "node_info" : True, "has_perfdata" : True, - "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.1"), + "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.1") or \ + oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.3"), "snmp_info" : (".1.3.6.1.4.1.14525.4", [ "5.1.1.1", # number of active access points "4.1.1.4", # number of sessions on active access points diff --git a/checks/juniper_trpz_aps_sessions b/checks/juniper_trpz_aps_sessions index 31e179d..5ae813c 100644 --- a/checks/juniper_trpz_aps_sessions +++ b/checks/juniper_trpz_aps_sessions @@ -178,7 +178,8 @@ check_info["juniper_trpz_aps_sessions"] = { "service_description" : "Access Point %s", "has_perfdata" : True, "node_info" : True, - "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.1"), + "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.1") or \ + oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14525.3.3"), "snmp_info" : [ ( ".1.3.6.1.4.1.14525.4.5.1.1.2.1", [ OID_END,
7 years, 5 months
1
0
0
0
Removed useless return
by Simon Betz
Module: check_mk Branch: master Commit: 8f2c3271c9e3b9eb3c780889fa99aaad958b93e9 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8f2c3271c9e3b9…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 13 11:40:23 2017 +0200 Removed useless return Change-Id: Ice1f2bbf5c33274b678db74b7d1aa160c6f17cbb --- checks/juniper_trpz_aps_sessions | 1 - 1 file changed, 1 deletion(-) diff --git a/checks/juniper_trpz_aps_sessions b/checks/juniper_trpz_aps_sessions index e16fa15..31e179d 100644 --- a/checks/juniper_trpz_aps_sessions +++ b/checks/juniper_trpz_aps_sessions @@ -166,7 +166,6 @@ def check_juniper_trpz_aps_sessions(item, _no_params, parsed): perfdata.append(("noise_floor", max(noise_floor_radios))) yield state, ", ".join(infotexts) - return else: yield 1, "Access point not reachable"
7 years, 5 months
1
0
0
0
4585 FIX juniper_trpz_aps_sessions: Fixed crashes if access point is not reachable or no values could be calculated
by Simon Betz
Module: check_mk Branch: master Commit: cfd57987ff83f3712428e97cdc4e9199529e14e9 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cfd57987ff83f3…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 13 11:33:58 2017 +0200 4585 FIX juniper_trpz_aps_sessions: Fixed crashes if access point is not reachable or no values could be calculated Change-Id: I9ea6063bba30a6584b17e0daa9ee77a08855abba --- .werks/4586 | 11 ++++ checks/juniper_trpz_aps | 28 +++++---- checks/juniper_trpz_aps_sessions | 129 ++++++++++++++++++++++----------------- 3 files changed, 101 insertions(+), 67 deletions(-) diff --git a/.werks/4586 b/.werks/4586 new file mode 100644 index 0000000..f98410c --- /dev/null +++ b/.werks/4586 @@ -0,0 +1,11 @@ +Title: juniper_trpz_aps_sessions: Fixed crashes if access point is not reachable or no values could be calculated +Level: 1 +Component: checks +Class: fix +Compatible: compat +Edition: cre +State: unknown +Version: 1.5.0i1 +Date: 1492075527 + + diff --git a/checks/juniper_trpz_aps b/checks/juniper_trpz_aps index e3c5bfa..6367fa0 100644 --- a/checks/juniper_trpz_aps +++ b/checks/juniper_trpz_aps @@ -24,31 +24,35 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. + def inventory_juniper_trpz_aps(info): return [ (None, None) ] + def check_juniper_trpz_aps(_no_item, _no_params, info): - total_aps = 0 + total_aps = 0 total_sessions = 0 - message = "" + infotexts = [] for node, aps, sessions in info: # Are we a cluster? + message = "" if node != None: - message += "%s: " % node + message += "[%s] " % node - total_aps += int(aps) + total_aps += int(aps) total_sessions += int(sessions) - message += "%s access points online, %s sessions - " % (aps, sessions) - - if message.endswith(' - '): - message = message[:-3] + message += "Online access points: %s, Sessions: %s" % \ + (aps, sessions) + infotexts.append(message) if len(info) > 1: - infotext = "Total: %d access points, %d sessions (%s)" % (total_aps, total_sessions, message) - else: - infotext = message + infotexts = ["Total: %d access points, Sessions: %d" % \ + (total_aps, total_sessions)] + infotexts + + return 0, ", ".join(infotexts), [ + ('ap_devices_total', total_aps), + ("total_sessions", total_sessions)] - return 0, infotext, [ ('ap_devices_total', total_aps), ("total_sessions", total_sessions) ] check_info["juniper_trpz_aps"] = { "check_function" : check_juniper_trpz_aps, diff --git a/checks/juniper_trpz_aps_sessions b/checks/juniper_trpz_aps_sessions index aac0cdf..e16fa15 100644 --- a/checks/juniper_trpz_aps_sessions +++ b/checks/juniper_trpz_aps_sessions @@ -55,30 +55,31 @@ # } def parse_juniper_trpz_aps_sessions(info): - access_points, radios = info parsed = {} - for node, end_oid, status, name in access_points: - # 10 means that that accesspoint is located on the - # other cluster part. Use custered_services to see all APs - if int(status) != 10: - name = name.replace('AP-','') - parsed[name] = { - 'node_info' : node, - 'end_oid' : end_oid, - 'status' : int(status), - 'radios' : {}, - } - - for data in radios: - radio_oid, radio_number = data[1].rsplit('.', 1) - for ap_name, ap_data in parsed.items(): - if radio_oid == parsed[ap_name]['end_oid']: - ap_data['radios'][radio_number] = { - 'counters' : map(int, data[2:-2]), - 'sessions' : int(data[-2]), - 'noise_floor' : int(data[-1]), + for access_points, radios in zip(info[::2], info[1::2]): + for node, end_oid, status, name in access_points: + # 10 means that that accesspoint is located on the + # other cluster part. Use clustered_services to see all APs + if int(status) != 10: + name = name.replace('AP-','') + parsed.setdefault(name, {}) + parsed[name].setdefault(node, {}) + parsed[name][node] = { + 'end_oid' : end_oid, + 'status' : int(status), + 'radios' : {}, } + for data in radios: + radio_oid, radio_number = data[1].rsplit('.', 1) + for ap_name, ap_data in parsed.items(): + if radio_oid == ap_data.get(data[0], {}).get('end_oid'): + ap_data[data[0]]['radios'][radio_number] = { + 'counters' : data[2:-2], + 'sessions' : data[-2], + 'noise_floor' : data[-1], + } + return parsed @@ -102,39 +103,53 @@ def check_juniper_trpz_aps_sessions(item, _no_params, parsed): 10 : (0, "redundant"), 20 : (2, "conn outage"), } - state, ap_status = ap_states[parsed[item]['status']] - - if parsed[item]["node_info"] is not None: - node_info = " (on node %s)" % parsed[item]["node_info"] - else: - node_info = "" - yield state, "Status: %s%s" % (ap_status, node_info) - now = time.time() - ap_rates = [0, 0, 0, 0, 0, 0, 0, 0, 0] - ap_sessions = 0 + infotexts = [] + state = 0 + data = parsed[item] + now = time.time() + ap_rates = [0, 0, 0, 0, 0, 0, 0, 0, 0] + ap_sessions = 0 noise_floor_radios = [] - for radio_number, radio_data in parsed[item]['radios'].items(): - noise_floor_radios.append( radio_data['noise_floor'] ) - ap_sessions += radio_data['sessions'] - - radio_rates = [] - for nr, counter in enumerate(radio_data['counters']): - radio_rate = get_rate("juniper_trpz_aps_sessions.%s.%s.%d" \ - % (item, radio_number, nr), now, counter) - radio_rates.append(radio_rate) - ap_rates[nr] += radio_rate - - infotext = ("Radio %s: Input: %s/s, Output: %s/s, " + \ - "%d errors, %d resets, %d retries, %d sessions, noise: %d dBm") % \ - ( radio_number, - get_bytes_human_readable(radio_rates[5]), - get_bytes_human_readable(radio_rates[1] + radio_rates[3]), - radio_rates[6], radio_rates[7], radio_rates[8], - radio_data['sessions'], radio_data['noise_floor'] ) - - yield 0, infotext + for node, ap_data in data.items(): + node_info = "" + if node is not None: + node_info += "[%s] " % node + + state, state_readable = ap_states[ap_data['status']] + infotexts.append("%sStatus: %s" % (node_info, state_readable)) + + for radio_number, radio_data in ap_data['radios'].items(): + try: + radio_data_noise_floor = int(radio_data['noise_floor']) + noise_floor_radios.append(radio_data_noise_floor) + except: + radio_data_noise_floor = "None" + + try: + radio_data_sessions = int(radio_data['sessions']) + ap_sessions += radio_data_sessions + except: + radio_data_sessions = "None" + + radio_rates = [0, 0, 0, 0, 0, 0, 0, 0, 0] + for nr, counter in enumerate(radio_data['counters']): + try: + radio_rate = get_rate("juniper_trpz_aps_sessions.%s.%s.%d" \ + % (item, radio_number, nr), now, int(counter)) + radio_rates.append(radio_rate) + ap_rates[nr] += radio_rate + except: + pass + + infotexts.append(("Radio %s: Input: %s/s, Output: %s/s, " + \ + "Errors: %d, Resets: %d, Retries: %d, Sessions: %s, Noise: %s dBm") % \ + ( radio_number, + get_bytes_human_readable(radio_rates[5]), + get_bytes_human_readable(radio_rates[1] + radio_rates[3]), + radio_rates[6], radio_rates[7], radio_rates[8], + radio_data_sessions, radio_data_noise_floor )) perfdata = [ ("if_out_unicast", ap_rates[0]), @@ -146,11 +161,15 @@ def check_juniper_trpz_aps_sessions(item, _no_params, parsed): ("wlan_physical_errors", ap_rates[6]), ("wlan_resets", ap_rates[7]), ("wlan_retries", ap_rates[8]), - ("total_sessions", ap_sessions), - ("noise_floor", max(noise_floor_radios)), - ] + ("total_sessions", ap_sessions), ] + if noise_floor_radios: + perfdata.append(("noise_floor", max(noise_floor_radios))) + + yield state, ", ".join(infotexts) + return - yield 0, "", perfdata + else: + yield 1, "Access point not reachable" check_info["juniper_trpz_aps_sessions"] = {
7 years, 5 months
1
0
0
0
a tag: Always set href attribute
by Lars Michelsen
Module: check_mk Branch: master Commit: cca4d6507ad1333f755591ef185712c6dd4de5da URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cca4d6507ad133…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Thu Apr 13 11:15:03 2017 +0200 a tag: Always set href attribute Change-Id: I90746f112a826bf040a00917901df4b05841c30a --- web/htdocs/htmllib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py index ce74e02..bacd115 100644 --- a/web/htdocs/htmllib.py +++ b/web/htdocs/htmllib.py @@ -2231,7 +2231,7 @@ class html(HTMLGenerator, Encoder, RequestHandler): attrs["class_"] += [ "toggle_switch", "on" if enabled else "off", ] link_attrs = { - "href" : attrs.pop("href", None), + "href" : attrs.pop("href", "javascript:void(0)"), "onclick" : attrs.pop("onclick", None), }
7 years, 5 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
16
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Results per page:
10
25
50
100
200