Module: check_mk
Branch: master
Commit: 120af204bc0e40a48739cb233a98f87e1e057ab5
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=120af204bc0e40…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Dec 22 12:31:27 2014 +0100
#1460 df_netscaler: new check to monitor filesystem usage on Citrix Netscaler devices
---
.werks/1460 | 9 +++++++
ChangeLog | 3 ++-
checkman/df_netscaler | 26 +++++++++++++++++++
checks/df_netscaler | 67 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 104 insertions(+), 1 deletion(-)
diff --git a/.werks/1460 b/.werks/1460
new file mode 100644
index 0000000..779ebfb
--- /dev/null
+++ b/.werks/1460
@@ -0,0 +1,9 @@
+Title: df_netscaler: new check to monitor filesystem usage on Citrix Netscaler devices
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1419247854
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index d68dd15..8c0ae11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,13 +10,14 @@
* 1207 services: Check can now be configured with additional names for matching...
* 1786 casa_cpu_mem, casa_cpu_temp, casa_cpu_util, casa_fan, casa_power: support more devices, also C100G
* 1787 docsis_channels_upstream, docsis_channels_downstream: now also support CASA 100G
- * 1459 netscaler_cpu: new check to monitor the CPUs of Citrix Netscaler Appliances
* 1519 etherbox.temp: Now supports lower levels, output configurable to Celsius, Fahrenheit or Kelvin...
NOTE: Please refer to the migration notes!
* 1520 hwg_temp: Now uses new temperature ruleset, allows lower levels and alternate output units....
NOTE: Please refer to the migration notes!
* 1521 carel_sensors: Now uses new Temperature WATO-Rule...
NOTE: Please refer to the migration notes!
+ * 1459 netscaler_cpu: new check to monitor the CPUs of Citrix Netscaler Appliances
+ * 1460 df_netscaler: new check to monitor filesystem usage on Citrix Netscaler devices
* 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/df_netscaler b/checkman/df_netscaler
new file mode 100644
index 0000000..7925d2e
--- /dev/null
+++ b/checkman/df_netscaler
@@ -0,0 +1,26 @@
+title: Citrix Netscaler: Used Space in Filesystems
+agents: snmp
+catalog: app/netscaler
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the filesystem usage on Citrix Netscaler appliances.
+ It uses the {NS-ROOT-MIB} to access the filesystem data.
+
+ The check makes use of the general check framework of the {df} check. Please
+ refer to the man page of the {df} check for the detailed description of
+ the check and its numerous features.
+
+inventory:
+ All filesystems found will be inventorized except mount points listed
+ in {inventory_df_exclude_mountpoints} and filesystems with zero size.
+
+item:
+ The mount point of the filesystem on the netscaler device.
+
+perfdata:
+ See the man page of the {df} check
+
+[parameters]
+parameters (dict): See the man page of the {df} check
+
diff --git a/checks/df_netscaler b/checks/df_netscaler
new file mode 100644
index 0000000..14b3d5b
--- /dev/null
+++ b/checks/df_netscaler
@@ -0,0 +1,67 @@
+#!/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.41.8.1.1.4.47.118.97.114 "/var"
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.1.6.47.102.108.97.115.104 "/flash"
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.2.4.47.118.97.114 96133
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.2.6.47.102.108.97.115.104 7976
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.3.4.47.118.97.114 87418
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.3.6.47.102.108.97.115.104 7256
+
+factory_settings["filesystem_default_levels"] = {
+ "levels" : (90.0, 95.0)
+}
+
+def inventory_df_netscaler(info):
+ mplist = []
+ for mp, size_mb, avail_mb in info:
+ if int(size_mb) > 0 and mp not in inventory_df_exclude_mountpoints:
+ mplist.append(mp)
+ return df_inventory(mplist)
+
+def check_df_netscaler(item, params, info):
+ fslist = []
+ for mp, size_mb, avail_mb in info:
+ if "patterns" in params or item == mp:
+ fslist.append((mp, int(size_mb), int(avail_mb)))
+ return df_check_filesystem_list(item, params, fslist)
+
+check_info["df_netscaler"] = {
+ "check_function" : check_df_netscaler,
+ "inventory_function" : inventory_df_netscaler,
+ "default_levels_variable" : "filesystem_default_levels",
+ "service_description" : "Filesystem %s",
+ "has_perfdata" : True,
+ "group" : "filesystem",
+ "includes" : [ "df.include" ],
+ "snmp_info" : (".1.3.6.1.4.1.5951.4.1.1.41.8.1", [
+ 1, # sysHealthDiskName
+ 2, # sysHealthDiskSize
+ 3, # sysHealthDiskAvail
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.5951.1"),
+}
Module: check_mk
Branch: master
Commit: 7ed82163bfe99ee0ee9fc9e22ab0075b89b17516
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ed82163bfe99e…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Mon Dec 22 11:38:39 2014 +0100
etherbox.temp, hwg_temp: Updated Manpage
---
checkman/etherbox.temp | 16 ++++++++++++----
checkman/hwg_temp | 15 +++++++++++++--
2 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/checkman/etherbox.temp b/checkman/etherbox.temp
index e8e47a5..0657738 100644
--- a/checkman/etherbox.temp
+++ b/checkman/etherbox.temp
@@ -18,9 +18,17 @@ inventory:
The inventory creates a service for each temperature sensor found
[parameters]
-warning (int): temperature in degrees at which the check goes warning
-critical (int): level for critical temperature
+This checks parameters are a dictionary with the
+following (optional) keys:
- Please note that the sensor can be configured in Degree, Fahrenheit
- and Kelvin.
+ {"levels"}: A tuple (warn, crit) containing the upper levels. No defaults.
+ {"levels_lower"}: A tuple (warn, crit) containing the lower levels. No defaults.
+
+ {"output_unit"}: "c", "f" or "k", the check will output the temperature in the
+specified unit. If this is not set, output is in degrees Celsius.
+
+ {"input_unit"}: "c, "f" or "k". By default, the check interprets the sensor value
+according to the unit sent by the device. This key allows to override that. Tread
+lightly, as this may lead to a misinterpreted temperature. Should only be used if
+the device reports its unit incorrectly.
diff --git a/checkman/hwg_temp b/checkman/hwg_temp
index 3ae1bb1..baccf9a 100644
--- a/checkman/hwg_temp
+++ b/checkman/hwg_temp
@@ -17,6 +17,17 @@ inventory:
All available temperature sensors are automatically inventorized.
[parameters]
-warn(int): Warning level for the temperature.
-crit(int): Critical level for the temperature.
+This checks parameters are a dictionary with the
+following (optional) keys:
+ {"levels"}: A tuple (warn, crit) containing the upper levels. Default: (30, 35)
+
+ {"levels_lower"}: A tuple (warn, crit) containing the lower levels. No defaults.
+
+ {"output_unit"}: "c", "f" or "k", the check will output the temperature in the
+specified unit. If this is not set, output is in degrees Celsius.
+
+ {"input_unit"}: "c, "f" or "k". By default, the check interprets the sensor value
+according to the unit sent by the device. This key allows to override that. Tread
+lightly, as this may lead to a misinterpreted temperature. Should only be used if
+the device reports its unit incorrectly.
Module: check_mk
Branch: master
Commit: f9e55fcec883767a0766133bc814c285f1934d9d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f9e55fcec88376…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Dec 19 15:20:30 2014 +0100
#1800 FIX Fixed umlauts and HTML tags in exception texts
Previous versions allowed HTML codes to be used in texts of exceptions to give the
error messages some kind of markup. This was removed to prevent XSS attacks. Now
we changed the code to only allow special markup tags like <tt>, <b>, <i>, <br>.
So if you saw these tags in error messages in previous version, they should be
fixed now.
Additionally, when you used the Web GUI localized, for example in German language,
you might have had problems with umlauts in error messages. This has been fixed
and cleaned up.
---
.werks/1800 | 20 ++++++++++
ChangeLog | 1 +
web/htdocs/html_mod_python.py | 6 ++-
web/htdocs/htmllib.py | 59 ++++++++++++++--------------
web/htdocs/index.py | 85 ++++++++++++++---------------------------
web/htdocs/lib.py | 40 ++++++++++++-------
6 files changed, 108 insertions(+), 103 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=f9e55fcec8…
Module: check_mk
Branch: master
Commit: 82e2b98536eb80b7732d7e9e06b1d27e596dadef
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=82e2b98536eb80…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Dec 19 14:43:27 2014 +0100
Removed unused files
---
checkman/esx_vsphere_objects_count | 12 ----------
checks/esx_vsphere_objects_count | 44 ------------------------------------
2 files changed, 56 deletions(-)
diff --git a/checkman/esx_vsphere_objects_count b/checkman/esx_vsphere_objects_count
deleted file mode 100644
index af90935..0000000
--- a/checkman/esx_vsphere_objects_count
+++ /dev/null
@@ -1,12 +0,0 @@
-title: VMWare ESX: Count of VMs on a Host or a vCenter
-agents: vsphere
-catalog: os/misc
-license: GPL
-distribution: check_mk
-description:
- This Check only Output the number of monitored VMs on a Hostsystem or a vCenter.
- (Dependig if the special Agents run against a vCenter or a Hostsystem)
-
-inventory:
- One service will be created
-
diff --git a/checks/esx_vsphere_objects_count b/checks/esx_vsphere_objects_count
deleted file mode 100644
index 49cfb38..0000000
--- a/checks/esx_vsphere_objects_count
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/python
-# -*- encoding: utf-8; py-indent-offset: 4 -*-
-# +------------------------------------------------------------------+
-# | ____ _ _ __ __ _ __ |
-# | / ___| |__ ___ ___| | __ | \/ | |/ / |
-# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
-# | | |___| | | | __/ (__| < | | | | . \ |
-# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
-# | |
-# | Copyright Mathias Kettner 2013 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 from agent:
-# <<<esx_vsphere_objects_count>>>
-# Virtualmachines 254
-
-def inventory_esx_vsphere_objects_count(info):
- return [(None, None)]
-
-def check_esx_vsphere_objects_count(item, _no_params, info):
- perfdata = [ ("vms", int(info[0][1]) ) ]
- return 0, "%s Virtual Machines on this device" % info[0][1], perfdata
-
-check_info["esx_vsphere_objects_count"] = {
- "check_function" : check_esx_vsphere_objects_count,
- "inventory_function" : inventory_esx_vsphere_objects_count,
- "service_description" : "Objects Count",
- "has_perfdata" : True,
-}
-
Module: check_mk
Branch: master
Commit: ca9d27910a1f55c844ca05e467a17474fe6ce1df
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ca9d27910a1f55…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 19 13:53:23 2014 +0100
#1794 FIX Fix exception in WATO service list in case of vanished checks
---
.werks/1794 | 10 ++++++++++
ChangeLog | 1 +
modules/automation.py | 4 ++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/1794 b/.werks/1794
new file mode 100644
index 0000000..a941afd
--- /dev/null
+++ b/.werks/1794
@@ -0,0 +1,10 @@
+Title: Fix exception in WATO service list in case of vanished checks
+Level: 2
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1418993584
+
+
diff --git a/ChangeLog b/ChangeLog
index 59fc696..2bb4103 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -59,6 +59,7 @@
* 1765 FIX: Fixed bug when generating nagvis backends while having sites with livestatus proxy configured...
* 1789 FIX: Fix preview of passive checks in WATO list of services
* 1790 FIX: Fix WATO parameters page for passive checks...
+ * 1794 FIX: Fix exception in WATO service list in case of vanished checks
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host notications
diff --git a/modules/automation.py b/modules/automation.py
index 3e8da31..354708e 100644
--- a/modules/automation.py
+++ b/modules/automation.py
@@ -297,8 +297,8 @@ def automation_try_inventory_node(hostname, leave_no_tcp=False, with_snmp_scan=F
# Check if already in autochecks (but not found anymore)
for ct, item, params in read_autochecks_of(hostname):
- if hn == hostname and (ct, item) not in found:
- found[(ct, item)] = ( 'vanished', repr(params) ) # This is not the real paramstring!
+ if (ct, item) not in found:
+ found[(ct, item)] = ('vanished', repr(params) ) # This is not the real paramstring!
# Find manual checks
existing = get_check_table(hostname)
Module: check_mk
Branch: master
Commit: 5e2e93bbc17f73a802291d0ef1ff7214df168e69
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5e2e93bbc17f73…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 19 12:11:09 2014 +0100
Fix internal UTF-8 problem in html.attrencode
---
web/htdocs/html_mod_python.py | 2 +-
web/htdocs/htmllib.py | 9 +++++----
web/htdocs/index.py | 4 ++--
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/web/htdocs/html_mod_python.py b/web/htdocs/html_mod_python.py
index 1d9dc24..99bc8bd 100644
--- a/web/htdocs/html_mod_python.py
+++ b/web/htdocs/html_mod_python.py
@@ -145,7 +145,7 @@ class html_mod_python(htmllib.html):
def log(self, msg):
if type(msg) != str:
msg = repr(msg)
- self.req.log_error(msg, apache.APLOG_WARNING)
+ self.req.log_error(msg, apache.APLOG_ERR)
def http_redirect(self, url):
self.set_http_header('Location', url)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 61bb742..36e6cec 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -1275,15 +1275,16 @@ class html:
# From here: Former not class functions
- # This function returns a str object, never unicode!
# Encode HTML attributes: replace " with ", also replace
- # < and >. This code is slow.
+ # < and >. This code is slow. Works on str and unicode without
+ # changing the type. Also works on things that can be converted
+ # with %s.
def attrencode(self, value):
ty = type(value)
if ty == int:
return str(value)
- elif ty not in [str, unicode]:
- value = str(value)
+ elif ty not in [str, unicode]: # also possible: type Exception!
+ value = "%s" % value # Note: this allows Unicode. value might not have type str now
return value.replace('"', """).replace("<", "<").replace(">", ">")
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index 3dd259a..8150be5 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -272,7 +272,7 @@ def handler(req, fields = None, profiling = True):
html.header(_("Configuration Error"))
html.show_error(unicode(html.attrencode(e)))
html.footer()
- apache.log_error(_("Configuration error: %s") % (e,), apache.APLOG_ERR)
+ html.log(_("Configuration error: %s") % (e,))
except MKGeneralException, e:
if plain_error:
@@ -281,7 +281,7 @@ def handler(req, fields = None, profiling = True):
html.header(_("Error"))
html.show_error(unicode(html.attrencode(e)))
html.footer()
- apache.log_error(_("Error: %s") % (e,), apache.APLOG_ERR)
+ html.log(_("Error: %s") % (e,))
except livestatus.MKLivestatusNotFoundError, e:
if plain_error: