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
September 2014
----- 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
5 participants
195 discussions
Start a n
N
ew thread
Check_MK Git: check_mk: new incomplete checks and agent plugin for db2 monitoring
by Andreas Boesl
Module: check_mk Branch: master Commit: bbfeb82852eeb2b50b71ac7a8c5632e8d76f0b79 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbfeb82852eeb2…
Author: Andreas Boesl <ab(a)mathias-kettner.de> Date: Tue Sep 30 16:34:08 2014 +0200 new incomplete checks and agent plugin for db2 monitoring --- .../incomplete_checks/db2/db2_bp_hitratios | 67 ++++++ doc/treasures/incomplete_checks/db2/db2_counters | 97 +++++++++ doc/treasures/incomplete_checks/db2/db2_logsizes | 101 +++++++++ doc/treasures/incomplete_checks/db2/db2_sessions | 69 ++++++ .../incomplete_checks/db2/db2_tablespaces | 226 ++++++++++++++++++++ doc/treasures/incomplete_checks/db2/db2_versions | 50 +++++ doc/treasures/incomplete_checks/db2/mk_db2 | 60 ++++++ 7 files changed, 670 insertions(+) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=bbfeb82852…
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: Multisite visuals: fixed some i18n issues
by Andreas Boesl
Module: check_mk Branch: master Commit: 214991ee51fe749d52cc33e7fe7a0537fe7b8d88 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=214991ee51fe74…
Author: Andreas Boesl <ab(a)mathias-kettner.de> Date: Tue Sep 30 16:24:52 2014 +0200 Multisite visuals: fixed some i18n issues --- web/htdocs/dashboard.py | 6 +++--- web/htdocs/views.py | 4 ++-- web/htdocs/visuals.py | 38 +++++++++++++++++--------------------- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py index d29e416..ad67e77 100644 --- a/web/htdocs/dashboard.py +++ b/web/htdocs/dashboard.py @@ -608,7 +608,7 @@ def page_edit_dashboards(): # '----------------------------------------------------------------------' def page_create_dashboard(): - visuals.page_create_visual('dashboards', allow_global = True) + visuals.page_create_visual('dashboards', _("Dashboard"), allow_global = True) #. # .--Dashb. Config-------------------------------------------------------. @@ -654,7 +654,7 @@ def page_edit_dashboard(): ], ) - visuals.page_edit_visual('dashboards', dashboards, + visuals.page_edit_visual('dashboards', _("Dashboard"), dashboards, create_handler = create_dashboard, custom_field_handler = custom_field_handler ) @@ -701,7 +701,7 @@ def page_create_view_dashlet(): if create: # Create a new view by choosing the context type and then the datasource - visuals.page_create_visual('views', allow_global = False, + visuals.page_create_visual('views', _("View"), allow_global = False, next_url = 'create_view_dashlet_ds.py?mode=create&context_type=%s' + '&name=%s' % html.urlencode(name)) diff --git a/web/htdocs/views.py b/web/htdocs/views.py index e3717ed..b6578e7 100644 --- a/web/htdocs/views.py +++ b/web/htdocs/views.py @@ -317,7 +317,7 @@ def page_edit_views(): # '----------------------------------------------------------------------' def page_create_view(): - visuals.page_create_visual('views', allow_global = False, + visuals.page_create_visual('views', _("View"), allow_global = False, next_url = 'create_view_ds.py?mode=create&context_type=%s') # Seconds step: Select the data source @@ -400,7 +400,7 @@ def page_create_view_ds(next_url = 'edit_view.py?context_type=%s&datasource=%s') def page_edit_view(): load_views() - visuals.page_edit_visual('views', multisite_views, + visuals.page_edit_visual('views', _("View"), multisite_views, custom_field_handler = render_view_config, load_handler = transform_view_to_valuespec, create_handler = create_view_config, diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py index e1b65b9..30ebab1 100644 --- a/web/htdocs/visuals.py +++ b/web/htdocs/visuals.py @@ -342,7 +342,7 @@ def page_list(what, title, visuals, custom_columns = []): # | Realizes the steps before getting to the editor (context type) | # '----------------------------------------------------------------------' -def page_create_visual(what, allow_global = False, next_url = None): +def page_create_visual(what, title, allow_global = False, next_url = None): what_s = what[:-1] def cmp_context_titles(a, b): @@ -356,17 +356,15 @@ def page_create_visual(what, allow_global = False, next_url = None): vs_type = DropdownChoice( title = _('Context Type'), choices = context_choices, - help = _('The context of a %s controls the type of objects to be shown. It ' + help = _('The context of a visual controls the type of objects to be shown. It ' 'also sets wether single or multiple objects are displayed. The context ' - 'type of a %s can not be changed anymore.') % (what_s, what_s), + 'type of a visual can not be changed anymore.'), ) - html.header(_('Create %s') % what_s.title(), stylesheets=["pages"]) + html.header(_('Create %s') % title, stylesheets=["pages"]) html.begin_context_buttons() back_url = html.var("back", "") - if back_url: - html.context_button(_("Back"), back_url, "back") - html.context_button(_("All %s") % what.title(), "edit_%s.py" % what, what_s) + html.context_button(_("Back"), back_url or "edit_%s.py" % what, "back") html.end_context_buttons() if html.var('save') and html.check_transaction(): @@ -412,11 +410,11 @@ def page_create_visual(what, allow_global = False, next_url = None): # | Edit global settings of the visual | # '----------------------------------------------------------------------' -def page_edit_visual(what, all_visuals, custom_field_handler = None, create_handler = None, try_handler = None, +def page_edit_visual(what, title, all_visuals, custom_field_handler = None, create_handler = None, try_handler = None, load_handler = None): what_s = what[:-1] if not config.may("general.edit_" + what): - raise MKAuthException(_("You are not allowed to edit %s.") % what) + raise MKAuthException(_("You are not allowed to edit %s.") % title) visual = {} @@ -430,7 +428,7 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None, create_hand mode = 'clone' visual = copy.deepcopy(all_visuals.get((cloneuser, visualname), None)) if not visual: - raise MKUserError('cloneuser', _('The %s does not exist.') % what_s) + raise MKUserError('cloneuser', _('The %s does not exist.') % title) # Make sure, name is unique if cloneuser == config.user_id: # Clone own visual @@ -466,18 +464,16 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None, create_hand visual['context_type'] = context_type if mode == 'clone': - title = _('Clone %s') % what_s.title() + title = _('Clone %s') % title elif mode == 'create': - title = _('Create %s') % what_s.title() + title = _('Create %s') % title else: - title = _('Edit %s') % what_s.title() + title = _('Edit %s') % title html.header(title, stylesheets=["pages", "views", "status", "bi"]) html.begin_context_buttons() back_url = html.var("back", "") - if back_url: - html.context_button(_("Back"), back_url, "back") - html.context_button(_("All %s") % what.title(), "edit_%s.py" % what, what_s) + html.context_button(_("Back"), back_url or "edit_%s.py" % what, "back") html.end_context_buttons() vs_general = Dictionary( @@ -512,7 +508,7 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None, create_hand ('linktitle', TextUnicode( title = _('Button Text') + '<sup>*</sup>', help = _('If you define a text here, then it will be used in ' - 'context buttons linking to the %s instead of the regular title.') % what_s, + 'context buttons linking to the %s instead of the regular title.') % title, size = 26)), ('icon', IconSelector( title = _('Button Icon'), @@ -520,10 +516,10 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None, create_hand ('visibility', ListChoice( title = _('Visibility'), choices = (config.may("general.publish_" + what) and [ - ('public', _('Make this %s available for all users') % what_s), + ('public', _('Make this %s available for all users') % title), ] or []) + - [ ('hidden', _('Hide this %s from the sidebar') % what_s), - ('hidebutton', _('Do not show a context button to this %s') % what_s) + [ ('hidden', _('Hide this %s from the sidebar') % title), + ('hidebutton', _('Do not show a context button to this %s') % title) ], )), ], @@ -575,7 +571,7 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None, create_hand save(what, all_visuals) html.immediate_browser_redirect(1, back) - html.message(_('Your %s has been saved.') % what_s) + html.message(_('Your %s has been saved.') % title) html.reload_sidebar() html.footer() return
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: #1411 New builting views for the history of scheduled downtimes
by Mathias Kettner
Module: check_mk Branch: master Commit: 794103fd8b46ddfc85e61d94642f7b0caed263c5 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=794103fd8b46dd…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Sep 30 16:05:40 2014 +0200 #1411 New builting views for the history of scheduled downtimes --- .werks/1411 | 9 +++++ ChangeLog | 1 + web/plugins/views/builtin.py | 91 ++++++++++++++++++++++++++++++++++++++++++ web/plugins/views/filters.py | 1 + 4 files changed, 102 insertions(+) diff --git a/.werks/1411 b/.werks/1411 new file mode 100644 index 0000000..0046823 --- /dev/null +++ b/.werks/1411 @@ -0,0 +1,9 @@ +Title: New builting views for the history of scheduled downtimes +Level: 2 +Component: multisite +Compatible: compat +Version: 1.2.5i6 +Date: 1412085926 +Class: feature + + diff --git a/ChangeLog b/ChangeLog index 4b077df..6a560da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -108,6 +108,7 @@ * 1398 Allow to spread times of next check when rescheduling... * 1405 Checkbox for settings downtimes on the hosts of the selected services... * 1410 Output log text of scheduled downtime log entries... + * 1411 New builting views for the history of scheduled downtimes * 1067 FIX: Fixed login problem in LDAP connector when no user filter specified... * 1094 FIX: sidebar snaping 'Tree of folders': fixed exception * 1154 FIX: Availability: Fixed unwanted redirect to edit annotation page after editing availability options... diff --git a/web/plugins/views/builtin.py b/web/plugins/views/builtin.py index 1d5d26e..1dd6022 100644 --- a/web/plugins/views/builtin.py +++ b/web/plugins/views/builtin.py @@ -390,6 +390,39 @@ multisite_builtin_views.update({ 'sorters': [('downtime_what', False), ('downtime_start_time', False)], 'title': _('Downtimes')}, + +'downtime_history': {'browser_reload': 0, + 'column_headers': 'pergroup', + 'datasource': 'log_events', + 'description': _('All historic scheduled downtimes of hosts and services'), + 'group_painters': [], + 'hard_filters': [ 'log_type' ], + 'hard_filtervars': [('logtime_from_range', '86400'), + ('logtime_from', '60'), + ('log_type', 'SERVICE DOWNTIME ALERT'), + ], + 'hidden': False, + 'hide_filters': [], + 'icon' : 'downtime', + 'layout': 'table', + 'linktitle': _('Host Dt-History'), + 'mustsearch': False, + 'num_columns': 1, + 'painters': [('log_icon', None), + ('log_time', None), + ('host', 'host_dt_hist'), + ('service_description', 'svc_dt_hist'), + ('log_state_type', None), + ('log_plugin_output', None), + ], + 'play_sounds': False, + 'public': True, + 'show_filters': ['logtime', ], + 'sorters': [('log_time', True), ('log_lineno', True)], + 'title': _('History of scheduled downtimes'), + 'topic': _('Other'), +}, + 'api_downtimes': {'column_headers': 'pergroup', 'datasource': 'downtimes', 'description': _('All host- and service-downtimes (including ids)'), @@ -1856,6 +1889,35 @@ multisite_builtin_views.update({ 'show_filters': ['logtime', 'log_state'], 'sorters': [('log_time', True), ('log_lineno', True)], 'title': _('Events of host')}, + +'host_dt_hist': {'browser_reload': 0, + 'column_headers': 'pergroup', + 'datasource': 'log_events', + 'description': _('All historic scheduled downtimes of a certain host'), + 'group_painters': [], + 'hard_filters': [ 'log_type' ], + 'hard_filtervars': [('logtime_from_range', '86400'), + ('logtime_from', '60'), + ('log_type', 'HOST DOWNTIME ALERT'), + ], + 'hidden': True, + 'hide_filters': ['site', 'host' ], + 'icon' : 'downtime', + 'layout': 'table', + 'linktitle': _('Host Dt-History'), + 'mustsearch': False, + 'num_columns': 1, + 'painters': [('log_icon', None), + ('log_time', None), + ('log_state_type', None), + ('log_plugin_output', None), + ], + 'play_sounds': False, + 'public': True, + 'show_filters': ['logtime', ], + 'sorters': [('log_time', True), ('log_lineno', True)], + 'title': _('Historic downtimes of host')}, + 'svcevents': {'browser_reload': 0, 'column_headers': 'pergroup', 'datasource': 'log_events', @@ -1885,6 +1947,35 @@ multisite_builtin_views.update({ 'show_filters': ['logtime', 'log_state'], 'sorters': [('log_time', True), ('log_lineno', True)], 'title': _('Events of service')}, + +'svc_dt_hist': {'browser_reload': 0, + 'column_headers': 'pergroup', + 'datasource': 'log_events', + 'description': _('All historic scheduled downtimes of a certain service'), + 'group_painters': [], + 'hard_filters': [ 'log_type' ], + 'hard_filtervars': [('logtime_from_range', '86400'), + ('logtime_from', '60'), + ('log_type', '(HOST|SERVICE) DOWNTIME ALERT'), + ], + 'hidden': True, + 'hide_filters': ['site', 'host', 'service'], + 'icon' : 'downtime', + 'layout': 'table', + 'linktitle': _('Downtime-History'), + 'mustsearch': False, + 'num_columns': 1, + 'painters': [('log_icon', None), + ('log_time', None), + ('log_state_type', None), + ('log_plugin_output', None), + ], + 'play_sounds': False, + 'public': True, + 'show_filters': ['logtime', ], + 'sorters': [('log_time', True), ('log_lineno', True)], + 'title': _('Historic downtimes of service')}, + 'hostsvcevents': {'browser_reload': 0, 'column_headers': 'pergroup', 'datasource': 'log_events', diff --git a/web/plugins/views/filters.py b/web/plugins/views/filters.py index d764df4..32c5387 100644 --- a/web/plugins/views/filters.py +++ b/web/plugins/views/filters.py @@ -703,6 +703,7 @@ class FilterLogClass(Filter): declare_filter(255, FilterLogClass()) declare_filter(202, FilterText("log_plugin_output", _("Log: plugin output"), "log", "log_plugin_output", "log_plugin_output", "~~")) +declare_filter(203, FilterText("log_type", _("Log: message type"), "log", "log_type", "log_type", "~~")) declare_filter(260, FilterText("log_contact_name", _("Log: contact name"), "log", "log_contact_name", "log_contact_name", "="), _("Exact match, used for linking"))
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: Merge brancl 'master' of ssh://mathias-kettner.de/ check_mk
by Mathias Kettner
Module: check_mk Branch: master Commit: 505ebca17dd93aec1526e349be2c136e147dd414 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=505ebca17dd93a…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Sep 30 16:05:44 2014 +0200 Merge brancl 'master' of ssh://mathias-kettner.de/check_mk ---
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: juniper_screenos_temp: Now uses temperature.include
by Konstantin Büttner
Module: check_mk Branch: master Commit: 655b3f666af1ae5d2862f2b3acd16f4a220f951c URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=655b3f666af1ae…
Author: Konstantin Büttner <kb(a)mathias-kettner.de> Date: Tue Sep 30 15:55:07 2014 +0200 juniper_screenos_temp: Now uses temperature.include --- checks/juniper_screenos_temp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/checks/juniper_screenos_temp b/checks/juniper_screenos_temp index 1b6c644..37fc05e 100644 --- a/checks/juniper_screenos_temp +++ b/checks/juniper_screenos_temp @@ -37,20 +37,8 @@ def check_juniper_screenos_temp(item, params, info): if name.endswith("Temperature"): name = name.rsplit(None, 1)[0] if name == item: - temp = int(temp) - warn, crit = params - perfdata = [( "temp", temp, warn, crit )] - infotxt = "Temperature is %s °C" % temp - if temp >= crit: - status = 2 - elif temp >= warn: - status = 1 - else: - status = 0 - if status: - infotext += " (levels at %d °C/%d °C)" % (warn, crit) - return status, infotxt, perfdata - return (3, "Sensor not found in SNMP data") + return check_temperature(int(temp), params) + check_info["juniper_screenos_temp"] = { "check_function" : check_juniper_screenos_temp, @@ -62,7 +50,6 @@ check_info["juniper_screenos_temp"] = { "snmp_info" : (".1.3.6.1.4.1.3224.21.4.1",[ 4, # Name 3, # Temperatur - ]) - - + ]), + "includes" : [ "temperature.include" ], }
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: innovaphone_temp: Fixed parenthesis mismatch
by Konstantin Büttner
Module: check_mk Branch: master Commit: 0c78d243cf2047fc44b05eff940c58e77f92423a URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0c78d243cf2047…
Author: Konstantin Büttner <kb(a)mathias-kettner.de> Date: Tue Sep 30 15:22:32 2014 +0200 innovaphone_temp: Fixed parenthesis mismatch --- checks/innovaphone_temp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checks/innovaphone_temp b/checks/innovaphone_temp index 57ef671..463a6f3 100644 --- a/checks/innovaphone_temp +++ b/checks/innovaphone_temp @@ -24,13 +24,13 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -innovaphone_temp_default_levels = ( 45, 50 ) +innovaphone_temp_default_levels = (45, 50) def inventory_innovaphone_temp(info): return [ (None, "innovaphone_temp_default_levels") ] def check_innovaphone_temp(_no_item, params, info): - return check_temperature(int(info[0][1])), params) + return check_temperature(int(info[0][1]), params) check_info["innovaphone_temp"] = { "check_function" : check_innovaphone_temp,
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: #1410 Output log text of scheduled downtime log entries
by Mathias Kettner
Module: check_mk Branch: master Commit: 5ab523198c453d824c02f53d7038b757f9fced58 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ab523198c453d…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Sep 30 14:47:34 2014 +0200 #1410 Output log text of scheduled downtime log entries Multisite now shows the text that is attached to a scheduled downtime start/stop in the monitoring logfile when showing the history of a host or service. Alas, Nagios does not log anything useful in those entries. The Check_MK Micro Core logs the downtime comment, which is by that way now visible in the historic views of Multisite. --- .werks/1410 | 12 ++++++++++++ ChangeLog | 1 + livestatus/src/LogEntry.cc | 10 +++++----- web/plugins/views/painters.py | 5 ++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.werks/1410 b/.werks/1410 new file mode 100644 index 0000000..2577941 --- /dev/null +++ b/.werks/1410 @@ -0,0 +1,12 @@ +Title: Output log text of scheduled downtime log entries +Level: 1 +Component: multisite +Compatible: compat +Version: 1.2.5i6 +Date: 1412081129 +Class: feature + +Multisite now shows the text that is attached to a scheduled downtime start/stop in the +monitoring logfile when showing the history of a host or service. Alas, Nagios does not +log anything useful in those entries. The Check_MK Micro Core logs the downtime comment, +which is by that way now visible in the historic views of Multisite. diff --git a/ChangeLog b/ChangeLog index 27bb664..4b077df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -107,6 +107,7 @@ * 1392 WATO Folder filter: show only the paths a user is allowed to see * 1398 Allow to spread times of next check when rescheduling... * 1405 Checkbox for settings downtimes on the hosts of the selected services... + * 1410 Output log text of scheduled downtime log entries... * 1067 FIX: Fixed login problem in LDAP connector when no user filter specified... * 1094 FIX: sidebar snaping 'Tree of folders': fixed exception * 1154 FIX: Availability: Fixed unwanted redirect to edit annotation page after editing availability options... diff --git a/livestatus/src/LogEntry.cc b/livestatus/src/LogEntry.cc index 0c0b7cc..f996309 100644 --- a/livestatus/src/LogEntry.cc +++ b/livestatus/src/LogEntry.cc @@ -153,7 +153,7 @@ inline bool LogEntry::handleStatusEntry() _host_name = next_token(&scan, ';'); _state_type = next_token(&scan, ';'); - _comment = next_token(&scan, ';') + 1; + _comment = next_token(&scan, ';'); return true; } else if (!strncmp(_text, "HOST FLAPPING ALERT: ", 21)) @@ -166,7 +166,7 @@ inline bool LogEntry::handleStatusEntry() _host_name = next_token(&scan, ';'); _state_type = next_token(&scan, ';'); - _comment = next_token(&scan, ';') + 1; + _comment = next_token(&scan, ';'); return true; } @@ -175,7 +175,7 @@ inline bool LogEntry::handleStatusEntry() || !strncmp(_text, "CURRENT SERVICE STATE: ", 23) || !strncmp(_text, "SERVICE ALERT: ", 15)) { - if (_text[0] == 'S'){ + if (_text[0] == 'S') { _logclass = LOGCLASS_ALERT; _type = ALERT_SERVICE; } @@ -210,7 +210,7 @@ inline bool LogEntry::handleStatusEntry() _host_name = next_token(&scan, ';'); _svc_desc = next_token(&scan, ';'); _state_type = next_token(&scan, ';'); - _comment = next_token(&scan, ';') + 1; + _comment = next_token(&scan, ';'); return true; } else if (!strncmp(_text, "SERVICE FLAPPING ALERT: ", 24)) @@ -224,7 +224,7 @@ inline bool LogEntry::handleStatusEntry() _host_name = next_token(&scan, ';'); _svc_desc = next_token(&scan, ';'); _state_type = next_token(&scan, ';'); - _comment = next_token(&scan, ';') + 1; + _comment = next_token(&scan, ';'); return true; } diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py index 1cd0f17..dd0daa5 100644 --- a/web/plugins/views/painters.py +++ b/web/plugins/views/painters.py @@ -1705,8 +1705,11 @@ multisite_painters["log_message"] = { def paint_log_plugin_output(row): output = row["log_plugin_output"] + comment = row["log_comment"] if output: return "", format_plugin_output(output, row) + elif comment: + return "", comment else: log_type = row["log_type"] lst = row["log_state_type"] @@ -1729,7 +1732,7 @@ def paint_log_plugin_output(row): multisite_painters["log_plugin_output"] = { "title" : _("Log: output of check plugin"), "short" : _("Check output"), - "columns" : ["log_plugin_output", "log_type", "log_state_type" ], + "columns" : ["log_plugin_output", "log_type", "log_state_type", "log_comment" ], "paint" : paint_log_plugin_output, }
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: Fix UNKNOWN - invalid output from check in automation
by Mathias Kettner
Module: check_mk Branch: master Commit: eafb080031dcbda1021f56422ce250661ad2855b URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eafb080031dcbd…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Sep 30 14:17:57 2014 +0200 Fix UNKNOWN - invalid output from check in automation --- modules/automation.py | 4 +++- modules/check_mk_base.py | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/automation.py b/modules/automation.py index d2822d6..6dffd46 100644 --- a/modules/automation.py +++ b/modules/automation.py @@ -388,10 +388,12 @@ def automation_try_inventory_node(hostname, leave_no_tcp=False, with_snmp_scan=F params = compute_check_parameters(hostname, ct, item, params) try: - result = convert_check_result(check_function(item, params, info)) + result = convert_check_result(check_function(item, params, info), check_uses_snmp(ct)) except MKCounterWrapped, e: result = (None, "WAITING - Counter based check, cannot be done offline") except Exception, e: + if opt_debug: + raise result = (3, "UNKNOWN - invalid output from agent or error in check implementation") if len(result) == 2: result = (result[0], result[1], []) diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py index 8ebd08e..da5a01f 100644 --- a/modules/check_mk_base.py +++ b/modules/check_mk_base.py @@ -1247,11 +1247,9 @@ def do_all_checks_on_host(hostname, ipaddress, only_check_types = None): try: dont_submit = False - is_snmp = check_info[checkname].get("snmp_info") or \ - ( infotype in check_info and check_info[infotype].get("snmp_info")) # Call the actual check function - result = convert_check_result(check_function(item, params, info), is_snmp) + result = convert_check_result(check_function(item, params, info), check_uses_snmp(checkname)) # handle check implementations that do not yet support the
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: innovaphone.include: Minor code cleanup; ibm_svc_enclosurestats, innovaphone_temp: Reworked to use include function
by Konstantin Büttner
Module: check_mk Branch: master Commit: d978847ba62acdb6bb19523a2c7952f812b19780 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d978847ba62acd…
Author: Konstantin Büttner <kb(a)mathias-kettner.de> Date: Tue Sep 30 12:27:21 2014 +0200 innovaphone.include: Minor code cleanup; ibm_svc_enclosurestats, innovaphone_temp: Reworked to use include function --- checks/ibm_svc_enclosurestats | 20 ++++---------------- checks/innovaphone.include | 14 +++++++------- checks/innovaphone_temp | 4 ++-- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/checks/ibm_svc_enclosurestats b/checks/ibm_svc_enclosurestats index 169065d..ffd29c0 100644 --- a/checks/ibm_svc_enclosurestats +++ b/checks/ibm_svc_enclosurestats @@ -52,35 +52,23 @@ ibm_svc_enclosurestats_temperature_default_levels = (35, 40) def inventory_ibm_svc_enclosurestats_temp(info): - inventory = [] for enclosure_id, stat_name, stat_current, stat_peak, stat_peak_time in info: if stat_name == "temp_c": - inventory.append( (enclosure_id, "ibm_svc_enclosurestats_temperature_default_levels") ) - return inventory + yield enclosure_id, "ibm_svc_enclosurestats_temperature_default_levels" def check_ibm_svc_enclosurestats_temp(item, params, info): - warn, crit = params - perfdata = [] - status = 0 - for enclosure_id, stat_name, stat_current, stat_peak, stat_peak_time in info: if enclosure_id == item and stat_name == "temp_c": - stat_current = int(stat_current) - if stat_current > crit: - status = 2 - elif stat_current > warn: - status = 1 - perfdata = [ ('temp', str(stat_current)+"C", warn, crit) ] - return status, "Enclosure %s temperature is %s°C" % (enclosure_id, stat_current), perfdata + return check_temperature(int(stat_current), params) - return 3, "Temperature for enclosure %s not found in agent output" % item check_info["ibm_svc_enclosurestats.temp"] = { "check_function" : check_ibm_svc_enclosurestats_temp, "inventory_function" : inventory_ibm_svc_enclosurestats_temp, "service_description" : "Temperature Enclosure %s", "has_perfdata" : True, - "group" : "hw_temperature", + "group" : "room_temperature", + "includes" : [ "temperature.include" ], } #. diff --git a/checks/innovaphone.include b/checks/innovaphone.include index 56cdf32..03beb2b 100644 --- a/checks/innovaphone.include +++ b/checks/innovaphone.include @@ -24,15 +24,15 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -def check_innovaphone( params, info, unit="%", msg=False ): +def check_innovaphone(params, info, unit="%", msg=False): warn, crit = params - current = saveint(info[0][1]) - message = "Current: %d%s" % ( current, unit ) + current = int(info[0][1]) + message = "Current: %d%s" % (current, unit) if msg: - message += " "+msg - perf = [ ("usage", current, warn, crit, 0, 100 ) ] - if current > crit: + message += " " + msg + perf = [ ("usage", current, warn, crit, 0, 100) ] + if current >= crit: return 2, message, perf - if current > warn: + if current >= warn: return 1, message, perf return 0, message, perf diff --git a/checks/innovaphone_temp b/checks/innovaphone_temp index d9cd868..57ef671 100644 --- a/checks/innovaphone_temp +++ b/checks/innovaphone_temp @@ -30,7 +30,7 @@ def inventory_innovaphone_temp(info): return [ (None, "innovaphone_temp_default_levels") ] def check_innovaphone_temp(_no_item, params, info): - return check_innovaphone(params, info, "°C") + return check_temperature(int(info[0][1])), params) check_info["innovaphone_temp"] = { "check_function" : check_innovaphone_temp, @@ -38,6 +38,6 @@ check_info["innovaphone_temp"] = { "service_description" : "Temperature", "has_perfdata" : True, "group" : "hw_single_temperature", - "include" : ["innovaphone.include"] + "include" : [ "temperature.include" ], }
9 years, 11 months
1
0
0
0
Check_MK Git: check_mk: innovaphone_channels: Minor code cleanup
by Mathias Kettner
Module: check_mk Branch: master Commit: 309d59513c980431339cdc891ce43e2a53f60ba8 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=309d59513c9804…
Author: Mathias Kettner <mk(a)mathias-kettner.de> Date: Tue Sep 30 12:01:43 2014 +0200 innovaphone_channels: Minor code cleanup --- checks/innovaphone_channels | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/checks/innovaphone_channels b/checks/innovaphone_channels index 532829f..c123b2b 100644 --- a/checks/innovaphone_channels +++ b/checks/innovaphone_channels @@ -24,7 +24,7 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -innovaphone_channels_default_levels = ( 75.0, 80.0 ) +innovaphone_channels_default_levels = (75.0, 80.0) def inventory_innovaphone_channels(info): return [ (x[0], 'innovaphone_channels_default_levels') for x in info \ @@ -35,11 +35,11 @@ def check_innovaphone_channels(item, params, info): if line[0] == item: link, physical = line[1:3] if link != 'Up' or physical != 'Up': - return 2, "Link: %s, Physical: %s" % ( link, physical ) + return 2, "Link: %s, Physical: %s" % (link, physical) idle, total = map(float, line[3:]) - perc_used = (idle/total) * 100 + perc_used = (idle / total) * 100 perc_free = 100 - perc_used - message = "(Used: %.0f, Free: %.0f, Total: %.0f)" % ( total - idle, idle, total ) + message = "(used: %.0f, free: %.0f, total: %.0f)" % (total - idle, idle, total) return check_innovaphone(params, [[None,perc_free]], '%', message ) return 3, "No Channel information found"
9 years, 11 months
1
0
0
0
← Newer
1
2
3
4
...
20
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Results per page:
10
25
50
100
200