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
December 2018
----- 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
Moved remaining top level modules from cmk to cmk.utils
by Lars Michelsen
Module: check_mk Branch: master Commit: f741ab37a8788eb926e73918a7581d9598edefa1 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f741ab37a8788e…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Dec 17 13:58:31 2018 +0100 Moved remaining top level modules from cmk to cmk.utils cmk/daemon.py -> cmk/utils/daemon.py cmk/debug.py -> cmk/utils/debug.py cmk/i18n.py -> cmk/utils/i18n.py cmk/password_store.py -> cmk/utils/password_store.py cmk/regex.py -> cmk/utils/regex.py cmk/plugin_loader.py -> cmk/utils/plugin_loader.py cmk/plugin_registry.py -> cmk/utils/plugin_registry.py cmk/defines.py -> cmk/utils/defines.py cmk/exceptions.py -> cmk/utils/exceptions.py cmk/log.py -> cmk/utils/log.py cmk/render.py -> cmk/utils/render.py cmk/store.py -> cmk/utils/store.py cmk/paths.py -> cmk/utils/paths.py Change-Id: I4886a4d223b3cf58780d0797fa60a9e2af2060db --- .werks/6057 | 26 ++-- active_checks/check_bi_aggr | 4 +- active_checks/check_cpu_peaks | 2 +- active_checks/check_mail | 4 +- active_checks/check_mail_loop | 4 +- active_checks/check_mailboxes | 16 +-- active_checks/check_sql | 4 +- agents/special/agent_3par | 4 +- agents/special/agent_aws | 6 +- agents/special/agent_azure | 4 +- agents/special/agent_bi | 4 +- agents/special/agent_kubernetes | 4 +- bin/check_mk | 14 +-- bin/mkbackup | 8 +- bin/mkbench | 2 +- checks/logwatch | 13 +- checks/ps.include | 2 +- cmk/__init__.py | 8 +- cmk/ec/actions.py | 7 +- cmk/ec/defaults.py | 16 +-- cmk/ec/export.py | 16 +-- cmk/ec/history.py | 8 +- cmk/ec/main.py | 43 +++---- cmk/ec/settings.py | 6 +- cmk/ec/snmp.py | 4 +- cmk/gui/availability.py | 12 +- cmk/gui/background_job.py | 16 +-- cmk/gui/backup.py | 4 +- cmk/gui/bi.py | 6 +- cmk/gui/config.py | 20 +-- cmk/gui/cron.py | 6 +- cmk/gui/exceptions.py | 2 +- cmk/gui/gui_background_job.py | 19 +-- cmk/gui/htmllib.py | 26 ++-- cmk/gui/i18n.py | 10 +- cmk/gui/inventory.py | 24 ++-- cmk/gui/key_mgmt.py | 6 +- cmk/gui/log.py | 12 +- cmk/gui/login.py | 6 +- cmk/gui/metrics.py | 12 +- cmk/gui/mkeventd.py | 18 +-- cmk/gui/modules.py | 4 +- cmk/gui/multitar.py | 4 +- cmk/gui/notifications.py | 6 +- cmk/gui/notify.py | 2 +- cmk/gui/pagetypes.py | 2 +- cmk/gui/permissions.py | 6 +- cmk/gui/plugins/config/__init__.py | 2 +- cmk/gui/plugins/cron/__init__.py | 2 +- cmk/gui/plugins/dashboard/__init__.py | 2 +- cmk/gui/plugins/dashboard/utils.py | 4 +- cmk/gui/plugins/main_modules/__init__.py | 2 +- cmk/gui/plugins/metrics/__init__.py | 2 +- cmk/gui/plugins/metrics/check_mk.py | 52 ++++---- cmk/gui/plugins/metrics/utils.py | 6 +- cmk/gui/plugins/sidebar/__init__.py | 2 +- cmk/gui/plugins/sidebar/bookmarks.py | 2 +- cmk/gui/plugins/sidebar/custom_links.py | 4 +- cmk/gui/plugins/sidebar/quicksearch.py | 4 +- cmk/gui/plugins/sidebar/utils.py | 4 +- cmk/gui/plugins/sidebar/wiki.py | 4 +- cmk/gui/plugins/userdb/__init__.py | 2 +- cmk/gui/plugins/userdb/hook_auth.py | 6 +- cmk/gui/plugins/userdb/htpasswd.py | 8 +- cmk/gui/plugins/userdb/ldap_connector.py | 14 +-- cmk/gui/plugins/userdb/utils.py | 6 +- cmk/gui/plugins/views/__init__.py | 2 +- cmk/gui/plugins/views/availability.py | 4 +- cmk/gui/plugins/views/bi.py | 2 +- cmk/gui/plugins/views/icons/__init__.py | 6 +- cmk/gui/plugins/views/icons/builtin.py | 8 +- cmk/gui/plugins/views/inventory.py | 10 +- cmk/gui/plugins/views/mkeventd.py | 2 +- cmk/gui/plugins/views/painters.py | 36 +++--- cmk/gui/plugins/views/perfometers/__init__.py | 2 +- cmk/gui/plugins/views/perfometers/check_mk.py | 12 +- cmk/gui/plugins/views/utils.py | 14 +-- cmk/gui/plugins/visuals/__init__.py | 2 +- cmk/gui/plugins/visuals/inventory.py | 2 +- cmk/gui/plugins/wato/__init__.py | 2 +- cmk/gui/plugins/wato/ac_tests.py | 11 +- cmk/gui/plugins/wato/backup_domains.py | 10 +- cmk/gui/plugins/wato/bi.py | 2 +- cmk/gui/plugins/wato/check_mk_configuration.py | 13 +- cmk/gui/plugins/wato/check_parameters/__init__.py | 2 +- cmk/gui/plugins/wato/check_parameters/unsorted.py | 2 +- cmk/gui/plugins/wato/globals_notification.py | 4 +- cmk/gui/plugins/wato/inventory.py | 6 +- cmk/gui/plugins/wato/omd_configuration.py | 27 ++-- cmk/gui/plugins/wato/utils/__init__.py | 4 +- cmk/gui/plugins/wato/utils/main_menu.py | 4 +- cmk/gui/plugins/watolib/__init__.py | 2 +- cmk/gui/plugins/watolib/utils.py | 10 +- cmk/gui/plugins/webapi/__init__.py | 2 +- cmk/gui/plugins/webapi/utils.py | 4 +- cmk/gui/prediction.py | 2 +- cmk/gui/sidebar.py | 2 +- cmk/gui/userdb.py | 34 ++--- cmk/gui/utils.py | 6 +- cmk/gui/valuespec.py | 25 ++-- cmk/gui/views.py | 2 +- cmk/gui/visuals.py | 2 +- cmk/gui/wato/__init__.py | 10 +- cmk/gui/wato/mkeventd.py | 17 +-- cmk/gui/wato/pages/activate_changes.py | 2 +- cmk/gui/wato/pages/analyze_configuration.py | 6 +- cmk/gui/wato/pages/audit_log.py | 2 +- cmk/gui/wato/pages/backup.py | 4 +- cmk/gui/wato/pages/bulk_discovery.py | 2 +- cmk/gui/wato/pages/bulk_import.py | 4 +- cmk/gui/wato/pages/custom_attributes.py | 2 +- cmk/gui/wato/pages/download_agents.py | 16 +-- cmk/gui/wato/pages/groups.py | 4 +- cmk/gui/wato/pages/host_rename.py | 4 +- cmk/gui/wato/pages/icons.py | 14 +-- cmk/gui/wato/pages/notifications.py | 4 +- cmk/gui/wato/pages/object_parameters.py | 3 +- cmk/gui/wato/pages/read_only.py | 2 +- cmk/gui/wato/pages/roles.py | 2 +- cmk/gui/wato/pages/rulesets.py | 2 +- cmk/gui/wato/pages/services.py | 6 +- cmk/gui/wato/pages/timeperiods.py | 4 +- cmk/gui/wato/pages/users.py | 2 +- cmk/gui/watolib.py | 140 +++++++++++---------- cmk/gui/werks.py | 9 +- cmk/notification_plugins/utils.py | 4 +- cmk/{ => utils}/daemon.py | 10 +- cmk/{ => utils}/debug.py | 0 cmk/{ => utils}/defines.py | 2 +- cmk/{ => utils}/exceptions.py | 2 +- cmk/{ => utils}/i18n.py | 0 cmk/{ => utils}/log.py | 0 cmk/utils/man_pages.py | 18 +-- cmk/{ => utils}/password_store.py | 10 +- cmk/{ => utils}/paths.py | 0 cmk/{ => utils}/plugin_loader.py | 0 cmk/{ => utils}/plugin_registry.py | 0 cmk/utils/prediction.py | 16 +-- cmk/utils/profile.py | 8 +- cmk/{ => utils}/regex.py | 4 +- cmk/{ => utils}/render.py | 2 +- cmk/{ => utils}/store.py | 8 +- cmk/utils/structured_data.py | 4 +- cmk/utils/translations.py | 2 +- cmk/utils/werks.py | 10 +- cmk_base/agent_simulator.py | 4 +- cmk_base/autochecks.py | 16 +-- cmk_base/automations/__init__.py | 12 +- cmk_base/automations/check_mk.py | 120 +++++++++--------- cmk_base/backup.py | 20 +-- cmk_base/caching.py | 2 +- cmk_base/check_api.py | 16 +-- cmk_base/check_table.py | 4 +- cmk_base/checking.py | 25 ++-- cmk_base/classic_snmp.py | 2 +- cmk_base/compress_history.py | 9 +- cmk_base/config.py | 52 ++++---- cmk_base/console.py | 4 +- cmk_base/core.py | 34 ++--- cmk_base/core_config.py | 14 +-- cmk_base/core_nagios.py | 42 +++---- cmk_base/crash_reporting.py | 12 +- cmk_base/data_sources/__init__.py | 8 +- cmk_base/data_sources/abstract.py | 20 +-- cmk_base/data_sources/host_sections.py | 4 +- cmk_base/data_sources/ipmi.py | 4 +- cmk_base/data_sources/piggyback.py | 2 +- cmk_base/data_sources/programs.py | 8 +- cmk_base/data_sources/snmp.py | 2 +- cmk_base/data_sources/tcp.py | 8 +- cmk_base/decorator.py | 7 +- cmk_base/discovery.py | 43 +++---- cmk_base/donate.py | 6 +- cmk_base/dump_host.py | 4 +- cmk_base/events.py | 28 +++-- cmk_base/exceptions.py | 2 +- cmk_base/inventory.py | 31 ++--- cmk_base/inventory_plugins.py | 14 ++- cmk_base/ip_lookup.py | 26 ++-- cmk_base/item_state.py | 26 ++-- cmk_base/localize.py | 26 ++-- cmk_base/modes/__init__.py | 4 +- cmk_base/modes/check_mk.py | 111 ++++++++-------- cmk_base/nagios_utils.py | 4 +- cmk_base/notify.py | 41 +++--- cmk_base/packaging.py | 91 +++++++------- cmk_base/parent_scan.py | 11 +- cmk_base/piggyback.py | 18 +-- cmk_base/prediction.py | 10 +- cmk_base/snmp.py | 34 ++--- cmk_base/snmp_scan.py | 2 +- cmk_base/utils.py | 2 +- doc/treasures/wato_hook_cleanup_folders.py | 10 +- doc/treasures/wato_remove_nonsite_folders.py | 9 +- doc/treasures/wiki_painter.py | 7 +- inventory/export_software_csv | 7 +- omd/packages/maintenance/diskspace | 2 +- omd/packages/omd/omdlib/main.py | 2 +- tests/conftest.py | 20 +-- tests/integration/cmk/ec/test_mkeventd_status.py | 6 +- tests/integration/cmk/test_omd_version.py | 2 +- tests/integration/cmk/{ => utils}/test_paths.py | 16 +-- .../integration/cmk/{ => utils}/test_site_werks.py | 0 tests/integration/cmk_base/test_data_sources.py | 6 +- tests/integration/cmk_base/test_mgmt_board.py | 6 +- .../cmk_base/test_services_prediction.py | 2 +- tests/static/Makefile | 1 + tests/testlib/__init__.py | 4 +- tests/unit/cmk/ec/test_perfcounters.py | 4 +- tests/unit/cmk/ec/test_rule_matching.py | 4 +- .../cmk/gui/plugins/views/test_availability.py | 12 +- tests/unit/cmk/gui/test_background_job.py | 6 +- tests/unit/cmk/gui/test_sidebar.py | 2 +- tests/unit/cmk/notifications/test_utils.py | 2 +- tests/unit/cmk/test_debug.py | 20 --- tests/unit/cmk/test_log.py | 59 --------- .../structured_data/test_structured_data.py | 4 +- .../structured_data/tree_test_data/tree_inv | 0 .../tree_test_data/tree_new_addresses | 0 .../tree_new_addresses_arrays_memory | 0 .../structured_data/tree_test_data/tree_new_arrays | 0 .../structured_data/tree_test_data/tree_new_heute | 0 .../tree_test_data/tree_new_interfaces | 0 .../tree_new_large_ora_tablespaces_fixed_len | 0 .../tree_new_large_ora_tablespaces_variable_len | 0 .../structured_data/tree_test_data/tree_new_memory | 0 .../tree_test_data/tree_old_addresses | 0 .../tree_old_addresses_arrays_memory | 0 .../structured_data/tree_test_data/tree_old_arrays | 0 .../structured_data/tree_test_data/tree_old_heute | 0 .../tree_test_data/tree_old_interfaces | 0 .../tree_test_data/tree_old_large_ora_tablespaces | 0 .../structured_data/tree_test_data/tree_old_memory | 0 .../structured_data/tree_test_data/tree_status | 0 tests/unit/cmk/{ => utils}/test_cpu_tracking.py | 0 tests/unit/cmk/{ => utils}/test_crash_reporting.py | 0 tests/unit/cmk/{ => utils}/test_daemon.py | 6 +- tests/unit/cmk/utils/test_debug.py | 20 +++ tests/unit/cmk/utils/test_log.py | 59 +++++++++ tests/unit/cmk/{ => utils}/test_man_pages.py | 4 +- tests/unit/cmk/{ => utils}/test_plugin_registry.py | 5 +- .../cmk/{ => utils}/test_prediction_commons.py | 0 tests/unit/cmk/{ => utils}/test_render.py | 4 +- tests/unit/cmk/{ => utils}/test_schedule.py | 0 tests/unit/cmk/{ => utils}/test_store.py | 12 +- tests/unit/cmk/{ => utils}/test_werks.py | 0 tests/unit/cmk_base/test_core_config.py | 2 +- tests/unit/cmk_base/test_rulesets.py | 2 +- web/app/index.wsgi | 6 +- 249 files changed, 1295 insertions(+), 1244 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=f741ab37a8…
5 years, 6 months
1
0
0
0
6992 FIX check_bi_aggr: Fixed usage of the password store
by Simon Betz
Module: check_mk Branch: master Commit: 97fa1db3d0370483b0ede9b6b06c04aaacceb970 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=97fa1db3d03704…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Tue Dec 18 10:12:28 2018 +0100 6992 FIX check_bi_aggr: Fixed usage of the password store Change-Id: I2f8d54d04feb6df57e193dc3c051c30ab70a513c --- .werks/6992 | 13 +++++++++++++ checks/check_bi_aggr | 23 +++++++++++++++-------- cmk/gui/plugins/views/icons/builtin.py | 6 ++++-- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/.werks/6992 b/.werks/6992 new file mode 100644 index 0000000..2c57300 --- /dev/null +++ b/.werks/6992 @@ -0,0 +1,13 @@ +Title: check_bi_aggr: Fixed usage of the password store +Level: 1 +Component: checks +Class: fix +Compatible: compat +Edition: cre +State: unknown +Version: 1.6.0i1 +Date: 1545054871 + +If a password from the password store was used in the active check plugin +{{check_bi_aggr}} the following syntax error was shown in the output of the +check plugin: {{sh: 1: Syntax error: "(" unexpected}} and the state was CRIT. diff --git a/checks/check_bi_aggr b/checks/check_bi_aggr index 759335b..b0a4492 100644 --- a/checks/check_bi_aggr +++ b/checks/check_bi_aggr @@ -27,24 +27,31 @@ def check_bi_aggr_arguments(params): base_url, aggr_name, username, secret, opt_params = params - args = ' -b %s -a %s -u %s %s' % (quote_shell_string(base_url), quote_shell_string(aggr_name), - quote_shell_string(username), - passwordstore_get_cmdline(" -s %s", secret)) + args = [ + '-b', + base_url, + '-a', + aggr_name, + '-u', + username, + '-s', + passwordstore_get_cmdline("%s", secret), + ] if "auth_mode" in opt_params: - args += ' -m %s' % quote_shell_string(opt_params['auth_mode']) + args += ['-m', opt_params['auth_mode']] if "timeout" in opt_params: - args += ' -t %d' % opt_params['timeout'] + args += ['-t', opt_params['timeout']] if opt_params.get("in_downtime"): - args += ' --in-downtime %s' % opt_params['in_downtime'] + args += ['--in-downtime', opt_params['in_downtime']] if opt_params.get("acknowledged"): - args += ' --acknowledged %s' % opt_params['acknowledged'] + args += ['--acknowledged', opt_params['acknowledged']] if opt_params.get("track_downtimes"): - args += ' -r -n $HOSTNAME$' + args += ['-r', '-n', 'HOSTNAME$'] return args diff --git a/cmk/gui/plugins/views/icons/builtin.py b/cmk/gui/plugins/views/icons/builtin.py index 1b3e58d..6f52f18 100644 --- a/cmk/gui/plugins/views/icons/builtin.py +++ b/cmk/gui/plugins/views/icons/builtin.py @@ -858,16 +858,18 @@ multisite_icons_and_actions['stars'] = { def paint_icon_check_bi_aggr(what, row, tags, host_custom_vars): + # service_check_command looks like: + # u"check_mk_active-bi_aggr!... '-b' '
http://localhost/$HOSTNAME$
' ... '-a' 'Host foobar' ..." if what == "service" and row.get("service_check_command", "").startswith("check_mk_active-bi_aggr!"): args = row['service_check_command'] - start = args.find('-b \'') + 4 + start = args.find('-b\' \'') + 5 end = args.find('\' ', start) base_url = args[start:end].rstrip('/') base_url = base_url.replace('$HOSTADDRESS$', row['host_address']) base_url = base_url.replace('$HOSTNAME$', row['host_name']) - start = args.find('-a \'') + 4 + start = args.find('-a\' \'') + 5 end = args.find('\' ', start) aggr_name = args[start:end]
5 years, 6 months
1
0
0
0
CMK-1387: Proof of concept for dockerized builds:
by Alex Zurhake
Module: check_mk Branch: master Commit: 4c8783c67497b48f0663bc402757520d7d50fad7 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c8783c67497b4…
Author: Alex Zurhake <az(a)mathias-kettner.de> Date: Mon Dec 17 13:19:30 2018 +0100 CMK-1387: Proof of concept for dockerized builds: - Jenkinsfiles: buildscripts/scripts/*.jenkins - Docker: buildscripts/infrastucture Change-Id: I71dcddf5ddc8c01862c380c2d732ab5fd78d394b --- .../infrastructure/build-nodes/centos-6/Dockerfile | 55 +++++++++ .../build-nodes/ubuntu-18.04/Dockerfile | 74 +++++++++++++ buildscripts/infrastructure/docker-compose.yaml | 39 +++++++ buildscripts/infrastructure/jenkins/Dockerfile | 123 +++++++++++++++++++++ buildscripts/scripts/incremental-build.jenkins | 33 ++++++ buildscripts/scripts/nightly-build.jenkins | 42 +++++++ 6 files changed, 366 insertions(+) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=4c8783c674…
5 years, 6 months
1
0
0
0
refactor alcatel_fans check
by Florian Kromer
Module: check_mk Branch: master Commit: ffd366b184c11cb607bda96d13cca03fb139ed65 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ffd366b184c11c…
Author: Florian Kromer <fk(a)mathias-kettner.de> Date: Wed Dec 5 12:40:55 2018 +0100 refactor alcatel_fans check CMK-1188 Change-Id: I5a838979a57dd02e1143770b938f8bfd7f509304 --- checks/alcatel.include | 20 ++++++++++++++++++++ checks/alcatel_fans | 28 +++++----------------------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/checks/alcatel.include b/checks/alcatel.include index ded1309..fe19844 100644 --- a/checks/alcatel.include +++ b/checks/alcatel.include @@ -56,6 +56,26 @@ def check_alcatel_cpu(_no_item, params, info): return status, "total: %.1f%%" % cpu_perc + levelstext, perfdata +def inventory_alcatel_fans(info): + for nr, _value in enumerate(info, 1): + yield nr, None + + +def check_alcatel_fans(item, _no_params, info): + fan_states = { + 0: "has no status", + 1: "not running", + 2: "running", + } + for nr, value in enumerate(info): + if nr + 1 == item: + fan_state = int(value[0]) + state = 0 + if fan_state != 2: + state = 2 + return state, "Fan " + fan_states[fan_state] + + def inventory_alcatel_power(info): for line in info: oid_end, _, device_type, power_type = line diff --git a/checks/alcatel_fans b/checks/alcatel_fans index b74ca1a..d16c059 100644 --- a/checks/alcatel_fans +++ b/checks/alcatel_fans @@ -24,31 +24,13 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. - -def inventory_alcatel_fans(info): - for nr, _value in enumerate(info, 1): - yield nr, None - - -def check_alcatel_fans(item, _no_params, info): - fan_states = { - 0: "has no status", - 1: "not running", - 2: "running", - } - for nr, value in enumerate(info): - if nr + 1 == item: - fan_state = int(value[0]) - state = 0 - if fan_state != 2: - state = 2 - return state, "Fan " + fan_states[fan_state] - - check_info["alcatel_fans"] = { "check_function": check_alcatel_fans, "inventory_function": inventory_alcatel_fans, "service_description": "Fan %s", - "snmp_scan_function": lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.6486.800"), - "snmp_info": (".1.3.6.1.4.1.6486.800.1.1.1.3.1.1.11.1", [2]), + "snmp_scan_function": alcatel_networking_products_scan_function, + "snmp_info": ( + ".1.3.6.1.4.1.6486.800.1.1.1.3.1.1.11.1", # MIB object "alaChasEntPhysFanEntry" + [2]), # MIB object "alaChasEntPhysFanStatus" + "includes": ["alcatel.include"], }
5 years, 6 months
1
0
0
0
Don't rebuild constant dictionaries over and over again.
by Sven Panne
Module: check_mk Branch: master Commit: db37bb0e8c8261d95fd60ee23eb636bee974f000 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=db37bb0e8c8261…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Fri Dec 14 14:51:02 2018 +0100 Don't rebuild constant dictionaries over and over again. Remember: A dictionary literal is actually a bunch of code, evaluating all keys and values! Change-Id: I8c437d4b4c47e660c31a9af80859abf3a1791b98 --- cmk/gui/werks.py | 77 ++++++++++++----------------- cmk/utils/werks.py | 141 ++++++++++++++++++++++++++++++----------------------- 2 files changed, 112 insertions(+), 106 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=db37bb0e8c…
5 years, 6 months
1
0
0
0
Filter first, then sort...
by Sven Panne
Module: check_mk Branch: master Commit: 6ab68c0336c1976e401f1aca0082b11fa234f5c0 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ab68c0336c197…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Mon Dec 17 17:17:25 2018 +0100 Filter first, then sort... Change-Id: Idb5b06bde681ca76eb28c2144f9e9a86f2abd867 --- cmk/gui/werks.py | 71 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/cmk/gui/werks.py b/cmk/gui/werks.py index 118ab08..93f2ecd 100644 --- a/cmk/gui/werks.py +++ b/cmk/gui/werks.py @@ -336,44 +336,45 @@ def render_werks_table(): current_group, number_of_groups, number_of_werks = False, 0, 0 sorter, grouper = _SORT_AND_GROUP[werk_table_options["grouping"]] - werklist = sorter(g_werks.values()) + werklist = sorter(werk # + for werk in g_werks.values() + if werk_matches_options(werk, werk_table_options)) translator = cmk.utils.werks.WerkTranslator() for werk in werklist: - if werk_matches_options(werk, werk_table_options): - group = grouper(werk) - if group != current_group: - if number_of_groups >= werk_table_options["group_limit"]: - break - number_of_groups += 1 - - if current_group != False: - table.end() - table.begin( - title=group, - limit=None, - searchable=False, - sortable=False, - css="werks", - update_page_head=False) - current_group = group - - number_of_werks += 1 - - table.row() - table.cell(_("ID"), render_werk_id(werk, with_link=True), css="number narrow") - table.cell(_("Version"), werk["version"], css="number narrow") - table.cell(_("Date"), render_werk_date(werk), css="number narrow") - table.cell( - _("Class"), translator.class_of(werk), css="werkclass werkclass%s" % werk["class"]) - table.cell( - _("Level"), translator.level_of(werk), css="werklevel werklevel%d" % werk["level"]) - table.cell( - _("Compatibility"), - translator.compatibility_of(werk), - css="werkcomp werkcomp%s" % werk["compatible"]) - table.cell(_("Component"), translator.component_of(werk), css="nowrap") - table.cell(_("Title"), render_werk_title(werk)) + group = grouper(werk) + if group != current_group: + if number_of_groups >= werk_table_options["group_limit"]: + break + number_of_groups += 1 + + if current_group != False: + table.end() + table.begin( + title=group, + limit=None, + searchable=False, + sortable=False, + css="werks", + update_page_head=False) + current_group = group + + number_of_werks += 1 + + table.row() + table.cell(_("ID"), render_werk_id(werk, with_link=True), css="number narrow") + table.cell(_("Version"), werk["version"], css="number narrow") + table.cell(_("Date"), render_werk_date(werk), css="number narrow") + table.cell( + _("Class"), translator.class_of(werk), css="werkclass werkclass%s" % werk["class"]) + table.cell( + _("Level"), translator.level_of(werk), css="werklevel werklevel%d" % werk["level"]) + table.cell( + _("Compatibility"), + translator.compatibility_of(werk), + css="werkcomp werkcomp%s" % werk["compatible"]) + table.cell(_("Component"), translator.component_of(werk), css="nowrap") + table.cell(_("Title"), render_werk_title(werk)) if current_group != False: table.end()
5 years, 6 months
1
0
0
0
6948 Azure: Monitor virtual network gateways
by Moritz Kiemer
Module: check_mk Branch: master Commit: 18353a5084291b5bce0755eae55baa6b3662228a URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=18353a5084291b…
Author: Moritz Kiemer <mo(a)mathias-kettner.de> Date: Fri Dec 14 14:37:06 2018 +0100 6948 Azure: Monitor virtual network gateways Add a new check to monitor Microsoft Azures virtual network gateways. Monitored metrics are the number of Point-to-site connections as well as the Point-to-site and Site-to-site bandwidths. You can configure levels for these metrics useíng the rule "Azure VNet Gateway". CMK-1409 Change-Id: I3ad606aefbd67be7d6dd58791d9c9a8e85939f39 --- .werks/6948 | 13 +++++ agents/special/agent_azure | 21 ++++---- checkman/azure_virtualnetworkgateways | 18 +++++++ checks/azure.include | 2 + checks/azure_virtualnetworkgateways | 54 +++++++++++++++++++ cmk/gui/plugins/metrics/check_mk.py | 12 +++++ cmk/gui/plugins/wato/check_parameters/azure.py | 63 ++++++++++++++++++++++ .../datasets/azure_virtualnetworkgateways.py | 29 ++++++++++ tests/unit/cmk/gui/test_watolib.py | 2 + 9 files changed, 205 insertions(+), 9 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=18353a5084…
5 years, 6 months
1
0
0
0
refactor alcatel_cpu check
by Florian Kromer
Module: check_mk Branch: master Commit: 2fd015505e104efc53da7117583245aa98532af9 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2fd015505e104e…
Author: Florian Kromer <fk(a)mathias-kettner.de> Date: Wed Dec 5 12:40:55 2018 +0100 refactor alcatel_cpu check CMK-1188 Change-Id: Ib2911c1f30f06edc4da1c79a6e75f4a8fdbaa7d0 --- checks/alcatel.include | 21 +++++++++++++++++++++ checks/alcatel_cpu | 30 ++++++------------------------ 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/checks/alcatel.include b/checks/alcatel.include index fdf4d2c..ded1309 100644 --- a/checks/alcatel.include +++ b/checks/alcatel.include @@ -24,6 +24,8 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. +alcatel_cpu_default_levels = (90.0, 95.0) + factory_settings['alcatel_temp'] = { "levels": (45, 50), } @@ -35,6 +37,25 @@ def alcatel_networking_products_scan_function(oid): return oid(sys_object_id).startswith(alcatel_ind_1_base_mib) +def inventory_alcatel_cpu(info): + return [(None, "alcatel_cpu_default_levels")] + + +def check_alcatel_cpu(_no_item, params, info): + cpu_perc = int(info[0][0]) + warn, crit = params + status = 0 + levelstext = "" + if cpu_perc >= crit: + status = 2 + elif cpu_perc >= warn: + status = 1 + if status: + levelstext = " (warn/crit at %.1f%%/%.1f%%)" % (warn, crit) + perfdata = [("util", cpu_perc, warn, crit, 0, 100)] + return status, "total: %.1f%%" % cpu_perc + levelstext, perfdata + + def inventory_alcatel_power(info): for line in info: oid_end, _, device_type, power_type = line diff --git a/checks/alcatel_cpu b/checks/alcatel_cpu index 6d5a357..aa1833d 100644 --- a/checks/alcatel_cpu +++ b/checks/alcatel_cpu @@ -24,33 +24,15 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -alcatel_cpu_default_levels = (90.0, 95.0) - - -def inventory_alcatel_cpu(info): - return [(None, "alcatel_cpu_default_levels")] - - -def check_alcatel_cpu(_no_item, params, info): - cpu_perc = int(info[0][0]) - warn, crit = params - state = 0 - levelstext = "" - if cpu_perc >= crit: - state = 2 - elif cpu_perc >= warn: - state = 1 - if state: - levelstext = " (warn/crit at %.1f%%/%.1f%%)" % (warn, crit) - perfdata = [("util", cpu_perc, warn, crit, 0, 100)] - return state, "total: %.1f%%" % cpu_perc + levelstext, perfdata - - check_info["alcatel_cpu"] = { "check_function": check_alcatel_cpu, "inventory_function": inventory_alcatel_cpu, "service_description": "CPU utilization", "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.6486.800"), - "snmp_info": (".1.3.6.1.4.1.6486.800.1.2.1.16.1.1.1", [13]), + "snmp_scan_function": alcatel_networking_products_scan_function, + "snmp_info": ( # MIB module "ALCATEL-IND1-HEALTH-MIB" + ".1.3.6.1.4.1.6486.800.1.2.1.16.1.1.1", # MIB object "healthDeviceInfo" + [13] # MIB object "healthDeviceCpuLatest" + ), + "includes": ["alcatel.include"], }
5 years, 6 months
1
0
0
0
DCD: Host attributes to set can now be configured per connection
by Lars Michelsen
Module: check_mk Branch: master Commit: 4e99a63e3a86987ed56affc8a77bbe7c121bd096 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4e99a63e3a8698…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Thu Dec 13 10:56:44 2018 +0100 DCD: Host attributes to set can now be configured per connection The piggyback connector based connections can now be configured to set custom host attributes. CMK-1421 Change-Id: I4317ac161c6508b3b13ca9dc15ebe207b14dd065 --- cmk/gui/watolib.py | 3 +++ tests/unit/cmk/gui/test_watolib.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmk/gui/watolib.py b/cmk/gui/watolib.py index 44f6d23..6c35474 100644 --- a/cmk/gui/watolib.py +++ b/cmk/gui/watolib.py @@ -3408,6 +3408,9 @@ class ValueSpecAttribute(Attribute): Attribute.__init__(self, name) self._valuespec = vs + def valuespec(self): + return self._valuespec + def title(self): return self._valuespec.title() diff --git a/tests/unit/cmk/gui/test_watolib.py b/tests/unit/cmk/gui/test_watolib.py index 2528956..813fdef 100644 --- a/tests/unit/cmk/gui/test_watolib.py +++ b/tests/unit/cmk/gui/test_watolib.py @@ -1,4 +1,4 @@ -import pytest +import pytest # type: ignore # Triggers plugin loading of plugins.wato which registers all the plugins import cmk.gui.wato # pylint: disable=unused-import
5 years, 6 months
1
0
0
0
Verify werk fields.
by Sven Panne
Module: check_mk Branch: master Commit: 79563a4e6b41c969af25a7c725c6a13a53cb546e URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=79563a4e6b41c9…
Author: Sven Panne <sp(a)mathias-kettner.de> Date: Fri Dec 14 14:02:28 2018 +0100 Verify werk fields. Change-Id: Ia0a1b725ddbb68be19bc7440d1a4d90a594d2215 --- cmk/utils/werks.py | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/cmk/utils/werks.py b/cmk/utils/werks.py index 9025336..a5a650c 100644 --- a/cmk/utils/werks.py +++ b/cmk/utils/werks.py @@ -129,9 +129,31 @@ def load_raw_files(werks_dir): return werks +_REQUIRED_WERK_FIELDS = { + "class", + "component", + "date", + "level", + "title", + "version", +} + +_OPTIONAL_WERK_FIELDS = { + "compatible", + "edition", + # TODO: What's this? Can we simply nuke the fields below from all werks? + "state", + "targetversion", +} + +_ALLOWED_WERK_FIELDS = _REQUIRED_WERK_FIELDS | _OPTIONAL_WERK_FIELDS + + def _load_werk(path): werk = { "body": [], + "compatible": "compat", + "edition": "cre", } in_header = True with path.open(encoding="utf-8") as fp: @@ -145,13 +167,17 @@ def _load_werk(path): value = int(text.strip()) except ValueError: value = text.strip() - werk[key.lower()] = value + field = key.lower() + if field not in _ALLOWED_WERK_FIELDS: + raise MKGeneralException("unknown werk field %s" % key) + werk[field] = value else: werk["body"].append(line) - werk.setdefault("compatible", "compat") - werk.setdefault("edition", "cre") - + missing_fields = _REQUIRED_WERK_FIELDS - set(werk.keys()) + if missing_fields: + raise MKGeneralException("missing fields: %s" % ",".join(missing_fields)) + # TODO: Check if all fields have an allowed value, see .werks/config. return werk
5 years, 6 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
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