Module: check_mk
Branch: master
Commit: 48583b397f622707e663d3991e117367a02841a5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=48583b397f6227…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 25 15:48:18 2011 +0100
Updated bug entries
---
.bugs/111 | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.bugs/111 b/.bugs/111
index 117e19c..fa23cc2 100644
--- a/.bugs/111
+++ b/.bugs/111
@@ -1,11 +1,15 @@
Title: View editor does not save tool tips (in group header)
Component: multisite
+State: done
+Class: bug
+Date: 2011-01-27 17:02:58
Benefit: 2
-State: open
Cost: 1
-Date: 2011-01-27 17:02:58
-Class: bug
+Fun: 0
When you add tooltips to a group column in the view editor,
the tooltip is not saved. This might appear at normal columns
also, but is not tested.
+
+2011-02-25 15:48:13: changed state open -> done
+The tooltips work now in group headers
Module: check_mk
Branch: master
Commit: 91b8d5925e0d04b7c1caf60515c8f47e2d765050
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91b8d5925e0d04…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 25 15:47:02 2011 +0100
Multisite: Tooltips work in group headers now
---
ChangeLog | 1 +
web/htdocs/views.py | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4b37776..38a100e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,7 @@
* FIX: Customlinks snapin persists folding states again
* FIX: PNP timerange painter option field takes selected value as default now
* FIX: Fixed perfometer styling in single dataset layouts
+ * FIX: Tooltips work in group headers now
WATO:
* FIX: fix problem with vanishing services on Windows. Affected were services
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 88f30e7..e8c9498 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -868,10 +868,11 @@ def create_view():
for n in range(1, 500):
pname = html.var("group_%d" % n)
viewname = html.var("group_link_%d" % n)
+ tooltip = html.var("group_tooltip_%d" % n)
if pname:
if viewname not in html.available_views:
viewname = None
- group_painternames.append((pname, viewname))
+ group_painternames.append((pname, viewname, tooltip))
painternames = []
# User can set more than max_display_columns. We cannot easily know
@@ -1902,7 +1903,7 @@ def prepare_paint(p, row):
content = link_to_view(content, row, linkview)
# Tooltip
- if tooltip:
+ if content != '' and tooltip:
cla, txt = multisite_painters[tooltip]["paint"](row)
tooltiptext = htmllib.strip_tags(txt)
content = '<span title="%s">%s</span>' % (tooltiptext, content)
@@ -1957,12 +1958,12 @@ def register_events(row):
# two rows are in the same group or not
def group_value(row, group_painters):
group = []
- for p, l in group_painters:
- groupvalfunc = p.get("groupby")
+ for p in group_painters:
+ groupvalfunc = p[0].get("groupby")
if groupvalfunc:
group.append(groupvalfunc(row))
else:
- for c in p["columns"]:
+ for c in p[0]["columns"]:
group.append(row[c])
return group
Module: check_mk
Branch: master
Commit: 99d47425d8e7c539bc77d12721d144a91ea5726d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=99d47425d8e7c5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Feb 25 14:54:16 2011 +0100
Updated bug entries
---
.bugs/150 | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.bugs/150 b/.bugs/150
index e0d0cff..86ecc51 100644
--- a/.bugs/150
+++ b/.bugs/150
@@ -1,13 +1,17 @@
Title: Display options show wrong value at start
Component: multisite
+State: done
+Class: bug
+Date: 2011-02-18 09:44:34
Benefit: 1
-State: open
Cost: 1
-Date: 2011-02-18 09:44:34
-Class: bug
+Fun: 0
When you enter a view where the display options for the PNP timerange
had been set to 4 hours (which is persistet), then the graphs are
showing 4 hours. Good. But when you open the tab "Display Options",
the dropdown is preset to 25h (which is the default), rather then
to 4h (which is the current setting).
+
+2011-02-25 14:54:12: changed state open -> done
+Fixed. Using get_painter_option function now to retrieve the configured value
Module: check_mk
Branch: master
Commit: 95685c15ec475016d2761741ec2357f1abd258b3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=95685c15ec4750…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 25 15:17:36 2011 +0100
h3c_lanswitch_cpu: add PNP graph and RRA cfg
---
README.writing_checks | 19 +++++++---
checkman/.f12 | 2 +-
checks/h3c_lanswitch_cpu | 2 +-
pnp-rraconf/check_mk-h3c_lanswitch_cpu.rra.cfg | 1 +
pnp-templates/check_mk-h3c_lanswitch_cpu.php | 44 ++++++++++++++++++++++++
5 files changed, 60 insertions(+), 8 deletions(-)
diff --git a/README.writing_checks b/README.writing_checks
index 6620511..0e22d34 100644
--- a/README.writing_checks
+++ b/README.writing_checks
@@ -12,12 +12,15 @@ Naming
Product specific checks must be prefixed with a product abbreviation, for
example "steelhead_status" for a Steelhead appliance of Riverbed.
-
* SNMP based checks: if the check makes use of a standardized MIB which
is or might be implemented by more than one vendor, then the check should
not be named after the vendor but after the MIB. An example are the
hr_* checks.
+* The service description of different check types that essentially
+ do the same must be identical (e.g. if/if64/ifoperstatus). Reason:
+ this makes rules in main.mk simpler for the user!
+
Coding style
@@ -52,10 +55,6 @@ Coding style
not hold for variables, that are used by several checks
(e.g. filesystem_levels is used by df, hr_fs, df_netapp, ...)
-* The service description of different check types that essentially
- do the same must be identical (e.g. if/if64/ifoperstatus). Reason:
- this makes rules in main.mk simpler for the user!
-
* If a check does not use check parameter, then the inventory function
must return None as parameter and the check function must name
the parameter argument _no_params.
@@ -125,7 +124,15 @@ Performance data:
* Only set perfdata flag when the check really produces performance data
output.
-* All performance data checks need to provide a pnp template
+* Each check that outputs performance data *must* have a dedicated PNP
+ graph definition in pnp-templates. If the check has warning and critical
+ levels then the graph must display those levels as yellow and red
+ lines.
+
+* Each check that outputs performance data must also have an RRA definition
+ the specifies which of MAX, MIN and AVERAGE is needed to display the
+ graph in its current (and maybe future) forms. Those are in pnp-rraconf.
+ Use a symlink here.
* pnp rra configuration
diff --git a/checkman/.f12 b/checkman/.f12
index 8bbbb7b..5a6d995 100644
--- a/checkman/.f12
+++ b/checkman/.f12
@@ -1 +1 @@
-cp * /usr/share/doc/check_mk/checks/
+sudo cp * /omd/versions/default/share/doc/check_mk/checks/
diff --git a/checks/h3c_lanswitch_cpu b/checks/h3c_lanswitch_cpu
index fdadc26..b720a22 100644
--- a/checks/h3c_lanswitch_cpu
+++ b/checks/h3c_lanswitch_cpu
@@ -86,7 +86,7 @@ def check_h3c_lanswitch_cpu(item, params, info):
-check_info["h3c_lanswitch_cpu"] = (check_h3c_lanswitch_cpu, "CPU Load %s", 1, inventory_h3c_lanswitch_cpu )
+check_info["h3c_lanswitch_cpu"] = (check_h3c_lanswitch_cpu, "CPU Utilization %s", 1, inventory_h3c_lanswitch_cpu )
snmp_info["h3c_lanswitch_cpu"] = \
( "1.3.6.1.4.1.43.45.1.6.1.1.1", [
diff --git a/pnp-rraconf/check_mk-h3c_lanswitch_cpu.rra.cfg b/pnp-rraconf/check_mk-h3c_lanswitch_cpu.rra.cfg
new file mode 120000
index 0000000..19dbf77
--- /dev/null
+++ b/pnp-rraconf/check_mk-h3c_lanswitch_cpu.rra.cfg
@@ -0,0 +1 @@
+max.rra.cfg
\ No newline at end of file
diff --git a/pnp-templates/check_mk-h3c_lanswitch_cpu.php b/pnp-templates/check_mk-h3c_lanswitch_cpu.php
new file mode 100644
index 0000000..a6e2dd0
--- /dev/null
+++ b/pnp-templates/check_mk-h3c_lanswitch_cpu.php
@@ -0,0 +1,44 @@
+<?php
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2010 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+$desc = str_replace("_", " ", $servicedesc);
+
+$opt[1] = "--vertical-label 'CPU utilization %' -l0 -u 100 --title \"CPU Utilization $hostname $desc\" ";
+#
+$def[1] = "DEF:util=$RRDFILE[1]:$DS[1]:MAX ".
+ "CDEF:ok=util,$WARN[1],MIN ".
+ "CDEF:warn=util,$CRIT[1],MIN ".
+ "AREA:util#c0f020 ".
+ "AREA:warn#90f020 ".
+ "AREA:ok#60f020:\"Utilization\:\" ".
+ "LINE:util#40a018 ".
+ "GPRINT:util:LAST:\"%.0lf%%,\" ".
+ "GPRINT:util:MIN:\"min\: %.0lf%%,\" ".
+ "GPRINT:util:MAX:\"max\: %.0lf%%\" ".
+ "HRULE:$WARN[1]#ffe000:\"Warning at $WARN[1]%\" ".
+ "HRULE:$CRIT[1]#ff0000:\"Critical at $CRIT[1]%\\n\" ".
+ "";
+
+?>