Module: check_mk
Branch: master
Commit: 6085889cfb0fcd1278e302464e720a43ea21140c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6085889cfb0fcd…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 9 12:57:22 2015 +0100
Minor Code and docu cleanup
---
checkman/3ware_disks | 6 ++++--
checkman/df | 17 +++++++++--------
checkman/wut_webtherm | 2 +-
web/plugins/views/painters.py | 2 +-
4 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/checkman/3ware_disks b/checkman/3ware_disks
index b84646c..d375b6e 100644
--- a/checkman/3ware_disks
+++ b/checkman/3ware_disks
@@ -4,8 +4,10 @@ catalog: os/storage
license: GPL
distribution: check_mk
description:
- This check monitors the state of disks of an 3ware ATA RAID Controller. The Linux agent sends the neccessary data,
- if the command line utility {tw_cli} is found in the shells search path. The usual way is to install it into {/usr/local/bin} or {/usr/bin}.
+ This check monitors the state of disks of an 3ware ATA RAID Controller. The
+ Linux agent sends the neccessary data, if the command line utility {tw_cli}
+ is found in the shells search path. The usual way is to install it into
+ {/usr/local/bin} or {/usr/bin}.
The utility {tw_cli} can be downloaded from {http://3ware.com/support/downloadpage.asp}.
diff --git a/checkman/df b/checkman/df
index c1209fe..e449d6e 100644
--- a/checkman/df
+++ b/checkman/df
@@ -8,14 +8,15 @@ description:
is checked against a warning and a critical level, which
can be specified in numerous ways.
- Beware: on Linux and UNIX systems the filesystem might reserve a certain amount for
- root (typical is 5%). This checks considers that reserved space as used. This is
- consistent with the percentage-column in the output of {df} on most distributions.
- So your filesystem might be at 100% in a situation where root still has 5% free
- space available. On some distributions, {df} seems to use the user allocatable space
- instead of the total filesystem size as base for the percentage calculation, this might
- result in differences between the percentage values shown by that {df} version and
- the value shown in Check_MK. From our point of view, the calculation of Check_MK is
+ Beware: on Linux and UNIX systems the filesystem might reserve a certain
+ amount for root (typical is 5%). This checks considers that reserved space
+ as used. This is consistent with the percentage-column in the output of {df}
+ on most distributions. So your filesystem might be at 100% in a situation
+ where root still has 5% free space available. On some distributions, {df}
+ seems to use the user allocatable space instead of the total filesystem size
+ as base for the percentage calculation, this might result in differences
+ between the percentage values shown by that {df} version and the value
+ shown in Check_MK. From our point of view, the calculation of Check_MK is
more accurate.
{Trends:} This checks supports filesystem {trends}. This means that the {df} check
diff --git a/checkman/wut_webtherm b/checkman/wut_webtherm
index e8bc469..c802ab9 100644
--- a/checkman/wut_webtherm
+++ b/checkman/wut_webtherm
@@ -8,7 +8,7 @@ description:
to a WuT (Wiesemann & Theis) Web-Thermograph.
item:
- The item is the number of the sensor as string - usuall {"1"}.
+ The item is the number of the sensor as string - usually {"1"}.
perfdata:
One variable: the current temperature in degrees celsius.
diff --git a/web/plugins/views/painters.py b/web/plugins/views/painters.py
index 5ac1c23..76cf45d 100644
--- a/web/plugins/views/painters.py
+++ b/web/plugins/views/painters.py
@@ -276,7 +276,7 @@ def paint_site_icon(row):
return None, ""
multisite_painters["sitename_plain"] = {
- "title" : _("Site id"),
+ "title" : _("Site ID"),
"short" : _("Site"),
"columns" : ["site"],
"paint" : lambda row: (None, row["site"]),
Module: check_mk
Branch: master
Commit: 3020f99c0d452a879f6f3c8a8420d53033288e36
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3020f99c0d452a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 9 12:46:37 2015 +0100
#1838 emc_datadomain_mtree: New check for EMC Datadomain MTrees
Thanks to Hubert Bösl!
---
.werks/1838 | 10 ++++++
ChangeLog | 1 +
checkman/emc_datadomain_mtree | 23 ++++++++++++++
checks/emc_datadomain_mtree | 68 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 102 insertions(+)
diff --git a/.werks/1838 b/.werks/1838
new file mode 100644
index 0000000..0b2f5b6
--- /dev/null
+++ b/.werks/1838
@@ -0,0 +1,10 @@
+Title: emc_datadomain_mtree: New check for EMC Datadomain MTrees
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1420803970
+Class: feature
+
+Thanks to Hubert Bösl!
+
diff --git a/ChangeLog b/ChangeLog
index 19c6102..9f4eae1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,7 @@
NOTE: Please refer to the migration notes!
* 1831 diskstat: detect multipath devices and handle them instead of the physical paths...
* 1462 netscaler_ha: new check to monitor the HA state of Citrix Netscaler appliances
+ * 1838 emc_datadomain_mtree: New check for EMC Datadomain MTrees...
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checkman/emc_datadomain_mtree b/checkman/emc_datadomain_mtree
new file mode 100644
index 0000000..75712e9
--- /dev/null
+++ b/checkman/emc_datadomain_mtree
@@ -0,0 +1,23 @@
+title: EMC Datadomain: MTree Usage
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Reports the Precompiled MTree usage in GB of the EMC Datadomain
+ Deduplication Storage Systems. The state of the check is determined
+ from the state reported by the device as follows:
+ The check is {OK} when the System reports {3} (readWrite), {4} (replicationDestination)
+ {5} (retentionLockEnabled), {6} (retentionLockDisabled). The check is {WARN}
+ when the MTree reports a state of {1} (readOnly).
+ The check is {CRIT} when the Mtree reports a state of {1} (deleted).
+
+item:
+ Name of the Mtree
+
+perfdata:
+ The Precompiled size of the MTree Data in Bytes
+
+inventory:
+ Automatically configures one check for every cwMTreesensor found on the
+ device
diff --git a/checks/emc_datadomain_mtree b/checks/emc_datadomain_mtree
new file mode 100644
index 0000000..55eab49
--- /dev/null
+++ b/checks/emc_datadomain_mtree
@@ -0,0 +1,68 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 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.
+
+
+def inventory_emc_datadomain_mtree(info):
+ for line in info:
+ yield line[0], None
+
+
+def check_emc_datadomain_mtree(item, _no_params, info):
+ state_table = {
+ "0": ("unknown", 3),
+ "1": ("deleted", 2),
+ "2": ("read-only", 1),
+ "3": ("read-write", 0),
+ "4": ("replication destination", 0),
+ "5": ("retention lock enabled", 0),
+ "6": ("retention lock disabled", 0),
+ }
+ for line in info:
+ if item == line[0]:
+ dev_name = line[0]
+ dev_precomp = line[1]
+ dev_state = line[2]
+ dev_state_str, dev_state_rc = state_table.get(dev_state, ("invalid code %s" % dev_state, 3))
+ precompiled = int(float(dev_precomp) * 1024 * 1024 * 1024)
+ perfdata = [('precompiled', precompiled)]
+ infotext = "Status: %s, Precomiled: %s" % (dev_state_str, get_bytes_human_readable(precompiled))
+ return dev_state_rc, infotext, perfdata
+
+
+check_info["emc_datadomain_mtree"] = {
+ "check_function" : check_emc_datadomain_mtree,
+ "inventory_function" : inventory_emc_datadomain_mtree,
+ "service_description" : "MTree %s",
+ "has_perfdata" : True,
+ "snmp_info" : (".1.3.6.1.4.1.19746.1.15.2.1.1",
+ [
+ 2, # MtreeListName
+ 3, # MtreeListPreComGi
+ 4, # MtreeListStatus
+ ]
+ ),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.1.0").startswith("Data Domain OS")
+}
Module: check_mk
Branch: master
Commit: 7e07d4b6c003ce426b6091a55d6e3412e0d01093
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7e07d4b6c003ce…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 9 12:07:52 2015 +0100
#1804 FIX Fixed prechecked checkboxes in view actions after first action submit
When e.g. acknowleding a problem for the first time, the checkboxes "fixed" and "notify"
are prechecked. When acknowledging a problem and opening the form again afterwards, the
checkboxes were not prechecked anymore. This has been fixed now.
---
.werks/1804 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/htmllib.py | 4 ++--
web/htdocs/views.py | 2 +-
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/1804 b/.werks/1804
new file mode 100644
index 0000000..27ac7c6
--- /dev/null
+++ b/.werks/1804
@@ -0,0 +1,12 @@
+Title: Fixed prechecked checkboxes in view actions after first action submit
+Level: 1
+Component: multisite
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1420801587
+
+When e.g. acknowleding a problem for the first time, the checkboxes "fixed" and "notify"
+are prechecked. When acknowledging a problem and opening the form again afterwards, the
+checkboxes were not prechecked anymore. This has been fixed now.
diff --git a/ChangeLog b/ChangeLog
index 05a4063..19c6102 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,6 +68,7 @@
* 1796 FIX: Fix filtering in Multisite View BI Boxes...
* 1802 FIX: Links in messages like "successfully sent X commands" are now working again...
* 1803 FIX: Fixed exception in Check_MK prediction page...
+ * 1804 FIX: Fixed prechecked checkboxes in view actions after first action submit...
WATO:
* 1760 Added search form to manual checks page
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index f147269..88e91a9 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -287,11 +287,11 @@ class html:
self.global_vars += varnames
# [('varname1', value1), ('varname2', value2) ]
- def makeuri(self, addvars, remove_prefix = None, filename=None):
+ def makeuri(self, addvars, remove_prefix=None, filename=None, delvars=None):
new_vars = [ nv[0] for nv in addvars ]
vars = [ (v, self.var(v))
for v in self.vars
- if v[0] != "_" and v not in new_vars ]
+ if v[0] != "_" and v not in new_vars and (not delvars or v not in delvars) ]
if remove_prefix != None:
vars = [ i for i in vars if not i[0].startswith(remove_prefix) ]
vars = vars + addvars
diff --git a/web/htdocs/views.py b/web/htdocs/views.py
index 6aa1c7f..628ba15 100644
--- a/web/htdocs/views.py
+++ b/web/htdocs/views.py
@@ -1182,7 +1182,7 @@ def render_view(view, rows, datasource, group_painters, painters,
if html.do_actions() and html.transaction_valid(): # submit button pressed, no reload
try:
# Create URI with all actions variables removed
- backurl = html.makeuri([])
+ backurl = html.makeuri([], delvars=['filled_in', 'actions'])
has_done_actions = do_actions(view, datasource["infos"][0], rows, backurl)
except MKUserError, e:
html.show_error(e.message)
Module: check_mk
Branch: master
Commit: 877c875186586e03f366aa2a66cc934a41460cc7
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=877c875186586e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 9 11:37:34 2015 +0100
Updated bug entries #1058
---
.bugs/1058 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.bugs/1058 b/.bugs/1058
index 14ccf10..599b422 100644
--- a/.bugs/1058
+++ b/.bugs/1058
@@ -1,4 +1,4 @@
-Title: hen RBN are enabled and site is empty, nagios can not be started
+Title: When RBN are enabled and site is empty, nagios can not be started
Component: core
State: open
Date: 2015-01-09 11:36:22
Module: check_mk
Branch: master
Commit: 878ecf1e36fbcbb167366f1978b487c69dd13f5b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=878ecf1e36fbcb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 9 11:37:26 2015 +0100
Updated bug entries #1058
---
.bugs/1058 | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/.bugs/1058 b/.bugs/1058
new file mode 100644
index 0000000..14ccf10
--- /dev/null
+++ b/.bugs/1058
@@ -0,0 +1,10 @@
+Title: hen RBN are enabled and site is empty, nagios can not be started
+Component: core
+State: open
+Date: 2015-01-09 11:36:22
+Targetversion: 1.2.5i1
+Class: bug
+
+When creating an empty site while the rule based notifications are enabled,
+then starting the site with e.g. cmk -R, nagios reports a config error
+because the contact group check-mk-notify can not be found.
Module: check_mk
Branch: master
Commit: 5aec7bef386538eb539fa93121c3f9e603556e19
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5aec7bef386538…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jan 9 10:47:35 2015 +0100
#1462 netscaler_ha: new check to monitor the HA state of Citrix Netscaler appliances
---
.werks/1462 | 9 +++++
ChangeLog | 1 +
checkman/netscaler_ha | 20 ++++++++++
checks/netscaler_ha | 104 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 134 insertions(+)
diff --git a/.werks/1462 b/.werks/1462
new file mode 100644
index 0000000..09e4e99
--- /dev/null
+++ b/.werks/1462
@@ -0,0 +1,9 @@
+Title: netscaler_ha: new check to monitor the HA state of Citrix Netscaler appliances
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1420796806
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 9ec4077..05a4063 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@
* 1820 mem.linux: new dedicated check for Linux memory management...
NOTE: Please refer to the migration notes!
* 1831 diskstat: detect multipath devices and handle them instead of the physical paths...
+ * 1462 netscaler_ha: new check to monitor the HA state of Citrix Netscaler appliances
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checkman/netscaler_ha b/checkman/netscaler_ha
new file mode 100644
index 0000000..c9ea923
--- /dev/null
+++ b/checkman/netscaler_ha
@@ -0,0 +1,20 @@
+title: Citrix Netscaler CPU Utilization
+agents: snmp
+catalog: app/netscaler
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the high availability status of Citrix Netscaler
+ Loadbalacing Appliances operating in a cluster setup. It uses snmp and the
+ NS-ROOT-MIB to access the {haPeerState}, {haCurStatus} and {haCurState}
+ OIDs from the nsHighAvailabilityGroup.
+
+ The check is in the state OK when the system is not setup for ha, or
+ {haCurState} is up/funtional. It is in the state WARN when the system is
+ manually configured not to participate in a HA cluster, or initializing to
+ become a cluster member, or when {haCurState} is {monitorFAIL} or {monitorOK},
+ because these two states are not documented in the MIB. It is critical in
+ other states {haCurState} can be.
+
+inventory:
+ One service per host will be created.
diff --git a/checks/netscaler_ha b/checks/netscaler_ha
new file mode 100644
index 0000000..927cba4
--- /dev/null
+++ b/checks/netscaler_ha
@@ -0,0 +1,104 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 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.
+#
+# Example Output:
+# .1.3.6.1.4.1.5951.4.1.1.23.3.0 1
+# .1.3.6.1.4.1.5951.4.1.1.23.23.0 1
+# .1.3.6.1.4.1.5951.4.1.1.23.24.0 3
+
+netscaler_ha_cur_states = {
+ 0: ("unknown", 3),
+ 1: ("initializing", 1), # Indicates that the node is in the process of becoming part of the high
+ # availability configuration.
+ 2: ("down", 2), # undocumented
+ 3: ("functional", 0), # Indicates that the node is accessible and can function as either
+ # a primary or secondary node.
+ 4: ("some HA monitored interfaces failed", 2), # Indicates that one of the high availability monitored
+ # interfaces has failed because of a card or link failure.
+ # This state triggers a failover.
+ 5: ("monitorFail", 1), # undocumented
+ 6: ("monitorOK", 1), # undocumented
+ 7: ("all HA monitored interfaces failed", 2), # Indicates that all the interfaces of the node are
+ # unusable because the interfaces on which high
+ # availability monitoring is enabled are not connected
+ # or are manually disabled. This state triggers a failover.
+ 8: ("configured to listening mode (dumb)", 1), # Indicates that the node is in listening mode. It does not
+ # participate in high availability transitions or transfer
+ # configuration from the peer node. This is a configured
+ # value, not a statistic.
+ 9: ("HA status manually disabled", 1), # Indicates that the high availability status of the node has been
+ # manually disabled. Synchronization and propagation cannot take
+ # place between the peer nodes.
+ 10: ("SSL card failed", 2), # Indicates that the SSL card has failed. This state triggers a failover.
+ 11: ("route monitor has failed", 2), # Indicates that the route monitor has failed. This state triggers
+ # a failover.
+}
+
+netscaler_ha_peer_mode = {
+ 0: ("standalone", 0),
+ 1: ("primary", 0),
+ 2: ("secomdary", 0),
+ 3: ("unknown", 1),
+}
+
+def inventory_netscaler_ha(info):
+ if info:
+ return [ (None, None) ]
+
+def check_netscaler_ha(_no_item, _no_params, info):
+ if info:
+ state = 0
+ peer_state, cur_status, cur_state = map(int, info[0])
+ if cur_status == 0:
+ infotext = "System not setup for HA"
+ else:
+ infotext = "Mode: %s, State: %s" % ( netscaler_ha_peer_mode.get(peer_state)[0],
+ netscaler_ha_cur_states.get(cur_state)[0],
+ )
+ # severity: 2, 1, 3, 0, the worst one wins
+ if netscaler_ha_cur_states.get(cur_state)[1] == 2 or \
+ netscaler_ha_cur_states.get(cur_state)[1] == 2:
+ state = 2
+ elif netscaler_ha_cur_states.get(cur_state)[1] == 1 or \
+ netscaler_ha_cur_states.get(cur_state)[1] == 1:
+ state = 1
+ elif netscaler_ha_cur_states.get(cur_state)[1] == 3 or \
+ netscaler_ha_cur_states.get(cur_state)[1] == 3:
+ state = 3
+
+ return state, infotext
+
+check_info["netscaler_ha"] = {
+ "check_function" : check_netscaler_ha,
+ "inventory_function" : inventory_netscaler_ha,
+ "service_description" : "HA Node Status",
+ "snmp_info" : (".1.3.6.1.4.1.5951.4.1.1.23", [ # nsHighAvailabilityGroup
+ 3, # haPeerState
+ 23, # haCurStatus
+ 24, # haCurState
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.5951.1"),
+}