Module: check_mk
Branch: master
Commit: cff9d866636c5e555e10e137bec995796161797c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cff9d866636c5e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Apr 8 12:20:55 2014 +0200
Linux multipath check can now use the alias instead of the UUID as item
If you have set useful aliasses for you Linux multipath devices then you can
now have Check_MK use these instead of the UUIDs for the service description.
This makes alerting, BI aggregates and other stuff easier. The configuration
is via a new rule set <i>Linux Multipath Inventory</i>. If you are now using
WATO then please refer to the check's man page for details.
---
.werks/757 | 12 ++++++++++++
ChangeLog | 1 +
checkman/multipath | 13 ++++++++++++-
checks/multipath | 18 ++++++++++++++++--
web/plugins/wato/check_parameters.py | 19 +++++++++++++++++++
5 files changed, 60 insertions(+), 3 deletions(-)
diff --git a/.werks/757 b/.werks/757
new file mode 100644
index 0000000..5bc19d1
--- /dev/null
+++ b/.werks/757
@@ -0,0 +1,12 @@
+Title: Linux multipath check can now use the alias instead of the UUID as item
+Level: 2
+Component: checks
+Version: 1.2.5i3
+Date: 1396952369
+Class: feature
+
+If you have set useful aliasses for you Linux multipath devices then you can
+now have Check_MK use these instead of the UUIDs for the service description.
+This makes alerting, BI aggregates and other stuff easier. The configuration
+is via a new rule set <i>Linux Multipath Inventory</i>. If you are now using
+WATO then please refer to the check's man page for details.
diff --git a/ChangeLog b/ChangeLog
index 05ade8e..91d1403 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
NOTE: Please refer to the migration notes!
* 0802 ibm_svc_nodestats.iops, ibm_svc_systemstats.iops: new checks for IO operations/sec on IBM SVC / V7000 devices
* 0602 cmciii.humidity: new check for Rittals CMC III humidity sensors
+ * 0757 Linux multipath check can now use the alias instead of the UUID as item...
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
diff --git a/checkman/multipath b/checkman/multipath
index 0543f80..7b4a13d 100644
--- a/checkman/multipath
+++ b/checkman/multipath
@@ -24,9 +24,20 @@ item:
alias as item.
inventory:
- One check for each multipath device is created.
+ One check for each multipath device is created. Via {iventory_multipath_rules}
+ you can specify wether an alias should be used as item instead of the UUID.
+
+examples:
+ # Use the alias as item if one is being set
+ inventory_multipath_rules = [
+ ( {'use_alias': True}, [], ALL_HOSTS ),
+ ]
+
[parameters]
numpaths(int): The only parameter is the number of expected paths. This is not
a tuple but a simple integer value.
+[configuration]
+inventory_multipath_rules(ruleset): A dictionary ruleset with currently the only possible
+ key being {use_alias}. See section inventory for details.
diff --git a/checks/multipath b/checks/multipath
index 6457f69..5247647 100644
--- a/checks/multipath
+++ b/checks/multipath
@@ -24,6 +24,8 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+# Configuration for using alias instead of UUID
+inventory_multipath_rules = []
# Output from multipath -l has the following format:
@@ -252,11 +254,17 @@ def parse_multipath_output(info, only_uuid = None):
# Get list of UUIDs of all multipath devices
# Length of UUID is 360a9800043346937686f456f59386741
def inventory_multipath(info):
+ settings = host_extra_conf_merged(g_hostname, inventory_multipath_rules)
+
inventory = []
parsed = parse_multipath_output(info)
for uuid, info in parsed.items():
# take current number of paths as target value
- inventory.append( (uuid, " ".join(info['luns']), info['numpaths']) )
+ if "alias" in info and settings.get("use_alias"):
+ item = info["alias"]
+ else:
+ item = uuid
+ inventory.append( (item, info['numpaths']) )
return inventory
# item is UUID (e.g. '360a9800043346937686f456f59386741') or alias (e.g. 'mpath0')
@@ -269,9 +277,15 @@ def check_multipath(item, target_numpaths, info):
return (3, "no map with uuid/alias %s" % item)
mmap = parsed.values()[0]
+ # If the item is the alias, then show the UUID in the plugin output.
+ # If the item is the UUID, then vice versa.
alias = mmap.get('alias')
- if alias:
+ uuid = mmap.get('uuid')
+
+ if item == uuid and alias:
aliasinfo = "(%s) " % alias
+ elif item == alias and uuid:
+ aliasinfo = "(%s) " % uuid
else:
aliasinfo = ""
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 2d2c845..3b6d28f 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3437,6 +3437,25 @@ register_check_parameters(
"first"
)
+register_rule(
+ "checkparams/" + subgroup_storage,
+ varname = "inventory_multipath_rules",
+ title = _("Linux Multipath Inventory"),
+ valuespec = Dictionary(
+ elements = [
+ ("use_alias", Checkbox(
+ title = _("Use the multipath alias as service name, if one is set"),
+ label = _("use alias"),
+ help = _("If a multipath device has an alias then you can use that for specifying "
+ "the device instead of the UUID. The alias will then be part of the service "
+ "description. The UUID will be output in the pluging outpout."))
+ ),
+ ],
+ help = _('This rule controls the inventory of Multipath devices on Linux.'),
+ ),
+ match = 'dict',
+)
+
register_check_parameters(
subgroup_storage,
"multipath_count",
Module: check_mk
Branch: master
Commit: 126e1422af3f6615ab251e638e7245567a0a83f8
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=126e1422af3f66…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Apr 8 11:02:02 2014 +0200
FIX oracle_tablespaces: fixed bug when using dynamic filesystem levels
The check did not process the dynamic levels correctly.
If there was a rule with dynamic filesystem levels, e.g.
<ul>
<li>1 TB - 5%/2% free</li>
<li>500 GB - 6%/3% free</li>
<li>200 GB - 10%/4% free</li>
<li>500 MB - 20%/15% free</li>
</ul>
and the filesystems size was 700GB, the levels of the 500 MB rule were actually used.
---
.werks/789 | 18 ++++++++++++++++++
ChangeLog | 1 +
checks/oracle_tablespaces | 5 ++---
3 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/.werks/789 b/.werks/789
new file mode 100644
index 0000000..fda3da3
--- /dev/null
+++ b/.werks/789
@@ -0,0 +1,18 @@
+Title: oracle_tablespaces: fixed bug when using dynamic filesystem levels
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1396947332
+
+The check did not process the dynamic levels correctly.
+If there was a rule with dynamic filesystem levels, e.g.
+<ul>
+<li>1 TB - 5%/2% free</li>
+<li>500 GB - 6%/3% free</li>
+<li>200 GB - 10%/4% free</li>
+<li>500 MB - 20%/15% free</li>
+</ul>
+and the filesystems size was 700GB, the levels of the 500 MB rule were actually used.
+
diff --git a/ChangeLog b/ChangeLog
index c2abeee..05ade8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* 0787 FIX: df: fixed problems on some filesystem checks when legacy check parameters where used...
* 0803 FIX: agent_ibmsvc: raw data for System Info Check and License Check now in correct format...
* 0788 FIX: oracle_tablespaces: now able to bear None values as warn/crit levels...
+ * 0789 FIX: oracle_tablespaces: fixed bug when using dynamic filesystem levels...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled by filter)
diff --git a/checks/oracle_tablespaces b/checks/oracle_tablespaces
index 7ed2eec..ca850cf 100644
--- a/checks/oracle_tablespaces
+++ b/checks/oracle_tablespaces
@@ -102,12 +102,11 @@ def get_tablespace_levels_in_bytes(size_bytes, params):
else:
# A list of levels. Choose the correct one depending on the
# size of the current tablespace
- found = False
for to_size, this_levels in params.get("levels"):
if size_bytes > to_size:
warn, crit = this_levels
- found = True
- if not found:
+ break
+ else:
return (None, None)
if magic:
Module: check_mk
Branch: master
Commit: e820d79af2bc40cb806b3a479d67089524646346
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e820d79af2bc40…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Apr 4 15:09:54 2014 +0200
FIX Availability: fixed memory leak in table statehist
The cleanup procedure of the livestatus table statehist missed some items..
This has been fixed.
---
ChangeLog | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 73459b4..c2abeee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,8 +19,8 @@
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
- * 0803 FIX: agent_ibmsvc: raw data for System Info Check and License Check now in correct format...
* 0787 FIX: df: fixed problems on some filesystem checks when legacy check parameters where used...
+ * 0803 FIX: agent_ibmsvc: raw data for System Info Check and License Check now in correct format...
* 0788 FIX: oracle_tablespaces: now able to bear None values as warn/crit levels...
Multisite:
Module: check_mk
Branch: master
Commit: e8a79db20d1fce7a3abea3ee07922fb43c5c5527
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e8a79db20d1fce…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Tue Apr 8 10:46:52 2014 +0200
FIX oracle_tablespaces: now able to bear None values as warn/crit levels
The levels in the oracle_tablespaces parameters could be set to None
if dynamic levels were used, but the filesystem was not within the limits
of the dynamic levels.
This caused an invalid check output.
---
.werks/788 | 11 +++++++++++
ChangeLog | 1 +
checks/oracle_tablespaces | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/788 b/.werks/788
new file mode 100644
index 0000000..f692950
--- /dev/null
+++ b/.werks/788
@@ -0,0 +1,11 @@
+Title: oracle_tablespaces: now able to bear None values as warn/crit levels
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1396946661
+Class: fix
+
+The levels in the oracle_tablespaces parameters could be set to None
+if dynamic levels were used, but the filesystem was not within the limits
+of the dynamic levels.
+This caused an invalid check output.
diff --git a/ChangeLog b/ChangeLog
index 6f647db..ac71639 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed detection
* 0787 FIX: df: fixed problems on some filesystem checks when legacy check parameters where used...
+ * 0788 FIX: oracle_tablespaces: now able to bear None values as warn/crit levels...
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled by filter)
diff --git a/checks/oracle_tablespaces b/checks/oracle_tablespaces
index a8c01c6..7ed2eec 100644
--- a/checks/oracle_tablespaces
+++ b/checks/oracle_tablespaces
@@ -257,7 +257,7 @@ def check_oracle_tablespaces(item, params, info):
else:
status = max(1, status)
- perfdata = [ ("size", current_size, max_size - warn, max_size - crit),
+ perfdata = [ ("size", current_size, max_size - (warn or 0), max_size - (crit or 0)),
("used", used),
("max_size", max_size) ]
Module: check_mk
Branch: master
Commit: b74d6fb6df0a81e73c6403b2b736f85f52de7a38
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b74d6fb6df0a81…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Apr 8 10:09:15 2014 +0200
Allow availability of multisite BI aggregates at once
Views containing multisite BI aggregates now also have the button <i>Availability</i> at
the top of the view. Multisite BI aggregates can thus be displayed in one availability
table - just as for hosts and services.
---
.werks/756 | 10 ++
ChangeLog | 3 +
web/htdocs/bi.py | 9 +-
web/htdocs/check_mk.css | 38 -------
web/htdocs/pages.css | 35 ++++++
web/htdocs/views.py | 20 +++-
web/plugins/pages/shipped.py | 1 -
web/plugins/views/availability.py | 215 +++++++++++++++++++++++++------------
web/plugins/views/bi.py | 4 +-
9 files changed, 220 insertions(+), 115 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=b74d6fb6df…