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
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
December 2018
----- 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
15 participants
342 discussions
Start a n
N
ew thread
aws_ec2_summary: Minor cleanup
by Simon Betz
Module: check_mk Branch: master Commit: f828d73d4c3f6be08f9b47bbc0ee91e1f8c2641f URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f828d73d4c3f6b…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Fri Dec 14 10:53:10 2018 +0100 aws_ec2_summary: Minor cleanup Change-Id: I2dab830e1715ce7a0d3ba77f2e0a965b77556a3b --- checks/aws_ec2_summary | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/checks/aws_ec2_summary b/checks/aws_ec2_summary index c91ff8d..b97ea7b 100644 --- a/checks/aws_ec2_summary +++ b/checks/aws_ec2_summary @@ -32,20 +32,20 @@ def inventory_aws_ec2_summary(parsed): def check_aws_ec2_summary(item, params, parsed): instances_by_state = {} + long_output = [] for reservation in parsed: for instance in reservation['Instances']: - instances_by_state.setdefault(instance['State']['Name'], [])\ - .append(instance['InstanceId']) + instance_id = instance['InstanceId'] + instance_state = instance['State']['Name'] + instances_by_state.setdefault(instance_state, []).append(instance_id) + long_output.append("Instance: %s, Status: %s" % (instance_id, instance_state)) yield 0, "Instances: %s" % sum([len(v) for v in instances_by_state.itervalues()]) - - long_output = [] for instance_state, instances in instances_by_state.iteritems(): if instance_state == 'running': state = 0 else: state = 1 - long_output.append("%s: %s" % (instance_state, ", ".join(instances))) yield state, "%s: %s" % (instance_state, len(instances)) if long_output:
5 years, 9 months
1
0
0
0
Fixed a tiny typo in a werk.
by Sven Panne
Module: check_mk Branch: master Commit: e370ab7324047ab84f8def17ac3bd82acc647669 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e370ab7324047a…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Fri Dec 14 13:38:26 2018 +0100 Fixed a tiny typo in a werk. Change-Id: I9ad46815728fb47e3bf60ea1a8ba25cb13da0578 --- .werks/4880 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.werks/4880 b/.werks/4880 index af69787..2404040 100644 --- a/.werks/4880 +++ b/.werks/4880 @@ -5,6 +5,6 @@ Compatible: compat Edition: cre Version: 1.5.0i1 Date: 1498658718 -class: fix +Class: fix
5 years, 9 months
1
0
0
0
Adapted catalog entry of aws checks
by Simon Betz
Module: check_mk Branch: master Commit: 185f4ecd201a5c425252fbc110aac37ad2203931 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=185f4ecd201a5c…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Fri Dec 14 13:28:35 2018 +0100 Adapted catalog entry of aws checks Change-Id: I86666ddbbf8f5e842cf9d786620dcec99e82f60c --- checkman/aws_ec2 | 2 +- checkman/aws_ec2.cpu_credits | 2 +- checkman/aws_ec2.cpu_util | 2 +- checkman/aws_ec2.disk_io | 2 +- checkman/aws_ec2.network_io | 2 +- checkman/aws_ec2_summary | 2 +- checkman/aws_exceptions | 2 +- checkman/aws_s3 | 2 +- checkman/aws_s3_objects | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/checkman/aws_ec2 b/checkman/aws_ec2 index f72d474..49c0b1e 100644 --- a/checkman/aws_ec2 +++ b/checkman/aws_ec2 @@ -1,6 +1,6 @@ title: AWS EC2 Instance Status agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description: diff --git a/checkman/aws_ec2.cpu_credits b/checkman/aws_ec2.cpu_credits index 9509f8e..4d218bf 100644 --- a/checkman/aws_ec2.cpu_credits +++ b/checkman/aws_ec2.cpu_credits @@ -1,6 +1,6 @@ title: AWS EC2 Instance Credit Usage agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description: diff --git a/checkman/aws_ec2.cpu_util b/checkman/aws_ec2.cpu_util index 6d51896..a5ae8b5 100644 --- a/checkman/aws_ec2.cpu_util +++ b/checkman/aws_ec2.cpu_util @@ -1,6 +1,6 @@ title: AWS EC2 Instance CPU utilization agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description: diff --git a/checkman/aws_ec2.disk_io b/checkman/aws_ec2.disk_io index 8b2f25f..458e1dc 100644 --- a/checkman/aws_ec2.disk_io +++ b/checkman/aws_ec2.disk_io @@ -1,6 +1,6 @@ title: AWS EC2 Instance Disk IO agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description: diff --git a/checkman/aws_ec2.network_io b/checkman/aws_ec2.network_io index a95a304..1904aed 100644 --- a/checkman/aws_ec2.network_io +++ b/checkman/aws_ec2.network_io @@ -1,6 +1,6 @@ title: AWS EC2 Instance Network IO agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description: diff --git a/checkman/aws_ec2_summary b/checkman/aws_ec2_summary index 5a5b0a5..1371aa3 100644 --- a/checkman/aws_ec2_summary +++ b/checkman/aws_ec2_summary @@ -1,6 +1,6 @@ title: AWS EC2 Instances Summary agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description: diff --git a/checkman/aws_exceptions b/checkman/aws_exceptions index 8107b94..8d559d2 100644 --- a/checkman/aws_exceptions +++ b/checkman/aws_exceptions @@ -1,6 +1,6 @@ title: AWS Exceptions agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description: diff --git a/checkman/aws_s3 b/checkman/aws_s3 index c3c19f6..eb20b92 100644 --- a/checkman/aws_s3 +++ b/checkman/aws_s3 @@ -1,6 +1,6 @@ title: AWS S3 Metrics agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description: diff --git a/checkman/aws_s3_objects b/checkman/aws_s3_objects index 2929786..bd3f958 100644 --- a/checkman/aws_s3_objects +++ b/checkman/aws_s3_objects @@ -1,6 +1,6 @@ title: AWS S3 Objects agents: aws -catalog: applications +catalog: cloud/aws license: GPL distribution: check_mk description:
5 years, 9 months
1
0
0
0
Fixed accidentally purged code at end of file
by Lars Michelsen
Module: check_mk Branch: master Commit: 6eac55816b8c8a793937786bcb1d9930be600722 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6eac55816b8c8a…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Fri Dec 14 13:09:55 2018 +0100 Fixed accidentally purged code at end of file Change-Id: I7555062071c773682509811abe834d832a2689a8 --- cmk_base/modes/check_mk.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/cmk_base/modes/check_mk.py b/cmk_base/modes/check_mk.py index 33b4634..a510abe 100644 --- a/cmk_base/modes/check_mk.py +++ b/cmk_base/modes/check_mk.py @@ -1692,3 +1692,39 @@ modes.register( )) #. +# .--help----------------------------------------------------------------. +# | _ _ | +# | | |__ ___| |_ __ | +# | | '_ \ / _ \ | '_ \ | +# | | | | | __/ | |_) | | +# | |_| |_|\___|_| .__/ | +# | |_| | +# '----------------------------------------------------------------------' + + +def mode_help(): + console.output("""WAYS TO CALL: +%s + +OPTIONS: +%s + +NOTES: +%s + +""" % ( + modes.short_help(), + modes.general_option_help(), + modes.long_help(), + )) + + +modes.register( + Mode( + long_option="help", + short_option="h", + handler_function=mode_help, + short_help="Print this help", + needs_config=False, + needs_checks=False, + ))
5 years, 9 months
1
0
0
0
Fixed some redefined-outer-name issues
by Lars Michelsen
Module: check_mk Branch: master Commit: 54193b6d5ce5c70d7d57a63933a65f717d4b765a URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=54193b6d5ce5c7…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Thu Dec 13 22:29:18 2018 +0100 Fixed some redefined-outer-name issues Change-Id: Ib89dfc8d7a0bb72400b743f96e2f008d287d4e6b --- active_checks/check_sftp | 3 +- cmk/gui/availability.py | 13 ++-- cmk/gui/config.py | 61 +++++++-------- cmk/gui/dashboard.py | 4 +- cmk/gui/gui_background_job.py | 8 +- cmk/gui/mobile.py | 27 +++---- cmk/gui/notifications.py | 3 +- cmk/gui/pagetypes.py | 20 ++--- cmk/gui/plugins/sidebar/host_matrix.py | 2 +- cmk/gui/plugins/sidebar/tactical_overview.py | 7 +- cmk/gui/plugins/userdb/ldap_connector.py | 42 +++++----- cmk/gui/plugins/views/icons/builtin.py | 2 +- cmk/gui/plugins/views/layouts.py | 50 ++++++------ cmk/gui/plugins/views/painters.py | 4 +- cmk/gui/sidebar.py | 18 ++--- cmk/gui/table.py | 33 ++++---- cmk/gui/userdb.py | 2 +- cmk/gui/visuals.py | 14 ++-- cmk/paths.py | 3 +- cmk_base/config.py | 45 ++++++----- cmk_base/data_sources/programs.py | 2 +- cmk_base/modes/check_mk.py | 111 ++++++++------------------- omd/packages/omd/omdlib/main.py | 24 +++--- 23 files changed, 224 insertions(+), 274 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=54193b6d5c…
5 years, 9 months
1
0
0
0
Fixed various typos in werks.
by Sven Panne
Module: check_mk Branch: master Commit: 0c3dac576ae60daee000a6c744645e7f9e6a7446 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0c3dac576ae60d…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Fri Dec 14 12:18:35 2018 +0100 Fixed various typos in werks. Change-Id: Ia70e8b463b04e9bbac9cea89adb8fb5326132dbc --- .werks/1101 | 2 +- .werks/1516 | 2 +- .werks/4045 | 2 +- .werks/4737 | 2 +- .werks/4914 | 2 +- .werks/5183 | 2 +- .werks/5713 | 2 +- .werks/6642 | 2 +- .werks/6789 | 2 +- .werks/8055 | 3 ++- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.werks/1101 b/.werks/1101 index 7764435..40d93a2 100644 --- a/.werks/1101 +++ b/.werks/1101 @@ -1,6 +1,6 @@ Title: WATO check parameter: renamed 'Nominal Voltages' to 'Voltage Levels..' Level: 1 -Component: wato +Component: wato Compatible: compat Version: 1.2.5i6 Date: 1409142625 diff --git a/.werks/1516 b/.werks/1516 index 1070dfb..7388a41 100644 --- a/.werks/1516 +++ b/.werks/1516 @@ -1,6 +1,6 @@ Title: win_disks: fix exception in case of empty signature Level: 1 -Component: inventory +Component: inv Compatible: compat Version: 1.2.6b1 Date: 1416572007 diff --git a/.werks/4045 b/.werks/4045 index c67f6ef..076e903 100644 --- a/.werks/4045 +++ b/.werks/4045 @@ -1,7 +1,7 @@ Title: Tactical Overview: do not count OK events as problems Level: 2 Component: wato -Compatible: multisite +Compatible: compat Version: 1.4.0i3 Date: 1479461630 Class: fix diff --git a/.werks/4737 b/.werks/4737 index 8e479ca..463ca5b 100644 --- a/.werks/4737 +++ b/.werks/4737 @@ -1,7 +1,7 @@ Title: cisco_asa_failover: Now roles of cluster and state of failover is configurable Level: 1 Component: checks -Compatible: incompat +Compatible: incomp Edition: cre Version: 1.5.0i1 Date: 1495464590 diff --git a/.werks/4914 b/.werks/4914 index 5ea49c5..04b650a 100644 --- a/.werks/4914 +++ b/.werks/4914 @@ -1,7 +1,7 @@ Title: statgrab_mem: Plugin is now prioritized over solaris_mem if both is available Level: 1 Component: checks -Compatible: incompat +Compatible: incomp Edition: cre Version: 1.5.0i1 Date: 1499342226 diff --git a/.werks/5183 b/.werks/5183 index ebe90bb..a6e2554 100644 --- a/.werks/5183 +++ b/.werks/5183 @@ -1,6 +1,6 @@ Title: Updated shipped navicli to 7.33.9.1.84 Level: 1 -Component: omd/packages +Component: packages Compatible: compat Edition: cre Version: 1.5.0i1 diff --git a/.werks/5713 b/.werks/5713 index d04cc26..bc199de 100644 --- a/.werks/5713 +++ b/.werks/5713 @@ -2,7 +2,7 @@ Title: mk_logwatch: Fix message rewriting and continuation patterns Level: 2 Component: checks Class: fix -Compatible: comp +Compatible: compat Edition: cre State: unknown Version: 1.6.0i1 diff --git a/.werks/6642 b/.werks/6642 index c691e72..9c43d17 100644 --- a/.werks/6642 +++ b/.werks/6642 @@ -2,7 +2,7 @@ Title: Performance data for mknotify Level: 1 Component: nagvis Compatible: compat -Edition: c1e +Edition: cee Version: 1.6.0i1 Date: 1538662417 Class: feature diff --git a/.werks/6789 b/.werks/6789 index 5f875c1..b9817fc 100644 --- a/.werks/6789 +++ b/.werks/6789 @@ -1,7 +1,7 @@ Title: esx_vsphere_sensors: List sensors in long output Level: 1 Component: checks -Compatible: comp +Compatible: compat Edition: cre Version: 1.6.0i1 Date: 1538126830 diff --git a/.werks/8055 b/.werks/8055 index e52736f..d2a4e83 100644 --- a/.werks/8055 +++ b/.werks/8055 @@ -4,7 +4,8 @@ Edition: cee Component: config Version: 1.2.5i5 Date: 1403877191 -Class: incomp +Class: feature +Compatible: incomp Up to now the CMC adopted the behaviour of Nagios when it came to the authorization of seeing host and service groups. Nagios lets a user see a
5 years, 9 months
1
0
0
0
Fixed typo in werk.
by Sven Panne
Module: check_mk Branch: master Commit: d40bf2cafa29fc46af1975e69be2d0200ac929e7 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d40bf2cafa29fc…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Fri Dec 14 12:09:05 2018 +0100 Fixed typo in werk. Change-Id: Ia8654041a0397fdbcc0becdd58e6b46792b3b9c5 --- .werks/8000 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.werks/8000 b/.werks/8000 index 938b76d..748d54f 100644 --- a/.werks/8000 +++ b/.werks/8000 @@ -2,7 +2,7 @@ Title: Reschedule active checks if neccessary after timeperiod change Level: 1 Edition: cee Component: cmc -Class: fi +Class: fix State: unknown Version: 1.2.5i1 Date: 1387303430
5 years, 9 months
1
0
0
0
Refactored mkp part declarations to named tuples ( fix redefined-outer-name on the way)
by Lars Michelsen
Module: check_mk Branch: master Commit: 75f3e1f21c8e2447ce2f44035e5a3bff0526181e URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=75f3e1f21c8e24…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Thu Dec 13 20:58:48 2018 +0100 Refactored mkp part declarations to named tuples (fix redefined-outer-name on the way) Change-Id: I2bfc87740c92c0e17ceef264b6af78baa664c665 --- cmk_base/packaging.py | 179 +++++++++++++++++----------------- tests/unit/cmk_base/test_packaging.py | 31 ++++++ 2 files changed, 122 insertions(+), 88 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=75f3e1f21c…
5 years, 9 months
1
0
0
0
6947 Poseidon devices: Input and temperature sensors
by Moritz Kiemer
Module: check_mk Branch: master Commit: 8f271ffd9bc9c84735061a5bba473daf96d7c514 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8f271ffd9bc9c8…
Author: Moritz Kiemer <mo(a)mathias-kettner.de> Date: Thu Dec 13 20:41:11 2018 +0100 6947 Poseidon devices: Input and temperature sensors This werk adds checks for Poseidon temperature and digital input sensors. Change-Id: Ib70d99026e40ddde186edab0148f3d76f8e1a941 --- .werks/6947 | 11 +++++ checkman/poseidon_inputs | 15 ++++++ checkman/poseidon_temp | 15 ++++++ checks/poseidon_inputs | 57 ++++++++++++++++++++++ checks/poseidon_temp | 53 ++++++++++++++++++++ .../generictests/datasets/poseidon_inputs_1.py | 44 +++++++++++++++++ .../generictests/datasets/poseidon_temp_1.py | 15 ++++++ 7 files changed, 210 insertions(+) diff --git a/.werks/6947 b/.werks/6947 new file mode 100644 index 0000000..0897c46 --- /dev/null +++ b/.werks/6947 @@ -0,0 +1,11 @@ +Title: Poseidon devices: Input and temperature sensors +Level: 1 +Component: checks +Compatible: compat +Edition: cre +Version: 1.6.0i1 +Date: 1544783204 +Class: feature + +This werk adds checks for Poseidon temperature and +digital input sensors. diff --git a/checkman/poseidon_inputs b/checkman/poseidon_inputs new file mode 100644 index 0000000..21ecad0 --- /dev/null +++ b/checkman/poseidon_inputs @@ -0,0 +1,15 @@ +title: Input Sensors from HWgroup Poseidon devices +agents: snmp +catalog: hw/network/hwgroup +license: GPL +distribution: check_mk +description: + This check monitors all digital inputs from Poseidon devices. + +item: + The name of the sensors + + +inventory: + One separate service per sensor is being created. + diff --git a/checkman/poseidon_temp b/checkman/poseidon_temp new file mode 100644 index 0000000..bb94041 --- /dev/null +++ b/checkman/poseidon_temp @@ -0,0 +1,15 @@ +title: Temperature sensors (HWgroup Poseidon devices) +agents: snmp +catalog: hw/network/hwgroup +license: GPL +distribution: check_mk +description: + This check monitors all temperature sensors from Poseidon devices. + +item: + The name of the sensors + + +inventory: + One separate service per sensor is being created. + diff --git a/checks/poseidon_inputs b/checks/poseidon_inputs new file mode 100644 index 0000000..a982c49 --- /dev/null +++ b/checks/poseidon_inputs @@ -0,0 +1,57 @@ +#!/usr/bin/python +# -*- encoding: utf-8; py-indent-offset: 4 -*- + + +def parse_poseidon_inputs(info): + parsed = {} + if info: + for line_number, line in enumerate(info, 1): + input_value, input_name, input_alarm_setup, input_alarm_state = line + if input_name == '': + input_name = 'Eingang %d' % line_number + try: + input_value = int(input_value) + except ValueError: + input_value = 3 + try: + input_alarm_setup = int(input_alarm_setup) + except ValueError: + input_alarm_setup = 3 + try: + input_alarm_state = int(input_alarm_state) + except ValueError: + input_alarm_state = 3 + parsed[input_name] = { + 'input_value': input_value, + 'input_alarm_setup': input_alarm_setup, + 'input_alarm_state': input_alarm_state, + } + return parsed + + +@get_parsed_item_data +def check_poseidon_inputs(item, params, data): + alarm_setup = {0: 'inactive', 1: 'activeOff', 2: 'activeOn', 3: 'unkown'} + input_values = {0: 'off', 1: 'on', 3: 'unkown'} + alarm_states = {0: 'normal', 1: 'alarm', 3: 'unkown'} + txt = '%s: AlarmSetup: %s' % (item, alarm_setup[data.get('input_alarm_setup', 3)]) + yield 0, txt + + state = data.get('input_alarm_state', 3) + txt = 'Alarm State: %s' % alarm_states[state] + if state == 1: + state = 2 + yield state, txt + + yield 0, "Values %s" % input_values.get(data.get('input_value', 3), 'unknown') + + +check_info["poseidon_inputs"] = { + "parse_function": parse_poseidon_inputs, + "check_function": check_poseidon_inputs, + "inventory_function": discover(), + "service_description": "%s", + "has_perfdata": False, + "snmp_scan_function": lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith('.1.3.6.1.4.1.21796.3'), + "snmp_info": (".1.3.6.1.4.1.21796.3.3.1.1", ['2', '3', '4', '5']), +} diff --git a/checks/poseidon_temp b/checks/poseidon_temp new file mode 100644 index 0000000..79e8344 --- /dev/null +++ b/checks/poseidon_temp @@ -0,0 +1,53 @@ +#!/usr/bin/python +# -*- encoding: utf-8; py-indent-offset: 4 -*- + +factory_settings["poseidon_temp_default_levels"] = {} + + +def parse_poseidon_temp(info): + parsed = {} + if not info: + return + for name, state, value_string in info: + try: + temp = float(value_string.replace('C', '')) + except ValueError: + temp = None + parsed[name] = {'temp': temp, 'status': state} + return parsed + + +@get_parsed_item_data +def check_poseidon_temp(item, params, data): + sensor_states = { + '0': "invalid", + '1': "normal", + '2': "alarmstate", + '3': "alarm", + } + sensor_state_value = data.get('status') + sensor_state_txt = sensor_states.get(sensor_state_value) + mk_status = 0 + if sensor_state_value != '1': + mk_status = 2 + yield mk_status, "Sensor %s, State %s" % (item, sensor_state_txt) + + temp = data.get('temp') + if temp: + yield check_temperature(temp, params, "poseidon_temp_%s" % item.replace(" ", "_")) + else: + yield 3, "No data for Sensor %s found" % item + + +check_info["poseidon_temp"] = { + "parse_function": parse_poseidon_temp, + "check_function": check_poseidon_temp, + "inventory_function": discover(), + "service_description": "Temperatur: %s", + "has_perfdata": True, + "group": "temperature", + "snmp_scan_function": lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith('.1.3.6.1.4.1.21796.3'), + "snmp_info": (".1.3.6.1.4.1.21796.3.3.3.1", ['2', '4', '5']), + "includes": ["temperature.include"], + "default_levels_variable": "poseidon_temp_default_levels", +} diff --git a/tests/unit/checks/generictests/datasets/poseidon_inputs_1.py b/tests/unit/checks/generictests/datasets/poseidon_inputs_1.py new file mode 100644 index 0000000..dcf099d --- /dev/null +++ b/tests/unit/checks/generictests/datasets/poseidon_inputs_1.py @@ -0,0 +1,44 @@ + + +checkname = 'poseidon_inputs' + + +info = [[u'1', u'Bezeichnung Eingang 1', u'1', u'0'], + [u'0', u'Bezeichnung Eingang 2', u'2', u'0'], + [u'0', u'Bezeichnung Eingang 3', u'1', u'1'], + [u'0', u'Bezeichnung Eingang 4', u'1', u'1'], + [u'0', u'Comm Monitor 1', u'0', u'0']] + + +discovery = {'': [(u'Bezeichnung Eingang 1', {}), + (u'Bezeichnung Eingang 2', {}), + (u'Bezeichnung Eingang 3', {}), + (u'Bezeichnung Eingang 4', {}), + (u'Comm Monitor 1', {})]} + + +checks = {'': [(u'Bezeichnung Eingang 1', + 'default', + [(0, u'Bezeichnung Eingang 1: AlarmSetup: activeOff', []), + (0, 'Alarm State: normal', []), + (0, 'Values on', [])]), + (u'Bezeichnung Eingang 2', + 'default', + [(0, u'Bezeichnung Eingang 2: AlarmSetup: activeOn', []), + (0, 'Alarm State: normal', []), + (0, 'Values off', [])]), + (u'Bezeichnung Eingang 3', + 'default', + [(0, u'Bezeichnung Eingang 3: AlarmSetup: activeOff', []), + (2, 'Alarm State: alarm', []), + (0, 'Values off', [])]), + (u'Bezeichnung Eingang 4', + 'default', + [(0, u'Bezeichnung Eingang 4: AlarmSetup: activeOff', []), + (2, 'Alarm State: alarm', []), + (0, 'Values off', [])]), + (u'Comm Monitor 1', + 'default', + [(0, u'Comm Monitor 1: AlarmSetup: inactive', []), + (0, 'Alarm State: normal', []), + (0, 'Values off', [])])]} \ No newline at end of file diff --git a/tests/unit/checks/generictests/datasets/poseidon_temp_1.py b/tests/unit/checks/generictests/datasets/poseidon_temp_1.py new file mode 100644 index 0000000..20a3eea --- /dev/null +++ b/tests/unit/checks/generictests/datasets/poseidon_temp_1.py @@ -0,0 +1,15 @@ + + +checkname = 'poseidon_temp' + + +info = [[u'Bezeichnung Sensor 1', u'1', u'16.8 C']] + + +discovery = {'': [(u'Bezeichnung Sensor 1', {})]} + + +checks = {'': [(u'Bezeichnung Sensor 1', + 'default', + [(0, u'Sensor Bezeichnung Sensor 1, State normal', []), + (0, u'16.8 \xb0C', [('temp', 16.8, None, None, None, None)])])]}
5 years, 9 months
1
0
0
0
Inline begin_group(), it makes it clearer what's going on with the tables.
by Sven Panne
Module: check_mk Branch: master Commit: 998ec997ff0d2e982c60b1d8e630516ec76a0b10 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=998ec997ff0d2e…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Thu Dec 13 09:16:44 2018 +0100 Inline begin_group(), it makes it clearer what's going on with the tables. Change-Id: I51e7f873b3c733c1eea993348b29454dc83363aa --- cmk/gui/werks.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/cmk/gui/werks.py b/cmk/gui/werks.py index d9244f8..e8d96c3 100644 --- a/cmk/gui/werks.py +++ b/cmk/gui/werks.py @@ -314,18 +314,6 @@ def render_werks_table(): werk_table_options["compatibility"] = ["incomp_unack"] current_group, number_of_groups, number_of_werks = False, 0, 0 - - def begin_group(title): - table.begin( - title=title, - limit=None, - searchable=False, - sortable=False, - css="werks", - update_page_head=False) - - werklist = [] - if werk_table_options["grouping"] == "version": werklist = cmk.werks.sort_by_version_and_component(g_werks.values()) else: @@ -341,7 +329,13 @@ def render_werks_table(): if current_group != False: table.end() - begin_group(group) + table.begin( + title=group, + limit=None, + searchable=False, + sortable=False, + css="werks", + update_page_head=False) current_group = group number_of_werks += 1
5 years, 9 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
35
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
23
24
25
26
27
28
29
30
31
32
33
34
35
Results per page:
10
25
50
100
200