Module: check_mk
Branch: master
Commit: 949c412f0e0e57dd7e1114d3ef8c750c7d20707a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=949c412f0e0e57…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 18:07:32 2013 +0100
FIX Generating selection id is hopefully now compatible to more systems
The default mechanism to get a selection id is to generate a UUID by reading
the contents of the file /proc/sys/kernel/random/uuid. This might be not
existing on some special systems. So we use the uuid python module as
fallback now.
---
.werks/368 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/lib.py | 9 ++++++++-
3 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/.werks/368 b/.werks/368
new file mode 100644
index 0000000..6232a98
--- /dev/null
+++ b/.werks/368
@@ -0,0 +1,11 @@
+Title: Generating selection id is hopefully now compatible to more systems
+Level: 1
+Component: multisite
+Version: 1.2.5i1
+Date: 1387213529
+Class: fix
+
+The default mechanism to get a selection id is to generate a UUID by reading
+the contents of the file /proc/sys/kernel/random/uuid. This might be not
+existing on some special systems. So we use the uuid python module as
+fallback now.
diff --git a/ChangeLog b/ChangeLog
index 3d34acb..840ead5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,7 @@
* 0327 FIX: Most forms did now work with "Profile Requests" enabled...
* 0333 FIX: Fixed too long page title during performing several actions...
* 0356 FIX: Fixed exception caused by utf8 chars in tooltip text...
+ * 0368 FIX: Generating selection id is hopefully now compatible to more systems...
WATO:
* 0308 Multisite can now set rotation view permissions for NagVis...
diff --git a/web/htdocs/lib.py b/web/htdocs/lib.py
index ca826af..f219dc2 100644
--- a/web/htdocs/lib.py
+++ b/web/htdocs/lib.py
@@ -126,7 +126,14 @@ def savefloat(f):
# Generates a unique id
def gen_id():
- return file('/proc/sys/kernel/random/uuid').read().strip()
+ try:
+ return file('/proc/sys/kernel/random/uuid').read().strip()
+ except IOError:
+ # On platforms where the above file does not exist we try to
+ # use the python uuid module which seems to be a good fallback
+ # for those systems. Well, if got python < 2.5 you are lost for now.
+ import uuid
+ return str(uuid.uuid4())
# Load all files below share/check_mk/web/plugins/WHAT into a
# specified context (global variables). Also honors the
Module: check_mk
Branch: master
Commit: 345875e41f33398f722badb35dc1e80d8876110c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=345875e41f3339…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 16 17:49:23 2013 +0100
FIX postgres_stat_database: make agent compatible with PostgreSQL 8.4.x
The SQL query that was used in the agent plugin <tt>mk_postgres</tt>
was not compatible with PostgreSQL 8.4.x, because there is not column
<tt>conflicts</tt>. This column is not used by the check anyway, so it has
been removed (thanks to Alexander Keller).
---
.werks/342 | 13 +++++++++++++
ChangeLog | 1 +
agents/plugins/mk_postgres | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/342 b/.werks/342
new file mode 100644
index 0000000..e3416cf
--- /dev/null
+++ b/.werks/342
@@ -0,0 +1,13 @@
+Title: postgres_stat_database: make agent compatible with PostgreSQL 8.4.x
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387212475
+Targetversion: future
+
+The SQL query that was used in the agent plugin <tt>mk_postgres</tt>
+was not compatible with PostgreSQL 8.4.x, because there is not column
+<tt>conflicts</tt>. This column is not used by the check anyway, so it has
+been removed (thanks to Alexander Keller).
diff --git a/ChangeLog b/ChangeLog
index 3d34acb..7edd337 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -37,6 +37,7 @@
* 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
* 0366 FIX: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9...
* 0367 FIX: Now using /dev/null instead of closing stdin in linux agent...
+ * 0342 FIX: postgres_stat_database: make agent compatible with PostgreSQL 8.4.x...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/agents/plugins/mk_postgres b/agents/plugins/mk_postgres
index a041a9c..97e1865 100755
--- a/agents/plugins/mk_postgres
+++ b/agents/plugins/mk_postgres
@@ -13,5 +13,5 @@ echo '<<<postgres_sessions>>>'
echo "select current_query = '<IDLE>', count(*) from pg_stat_activity group by (current_query = '<IDLE>');" | su - $USER -c "psql -d postgres -A -t -F' '"
echo '<<<postgres_stat_database:sep(59)>>>'
-echo 'select datid, datname, numbackends, xact_commit, xact_rollback, blks_read, blks_hit, tup_returned, tup_fetched, tup_inserted, tup_updated, tup_deleted, conflicts, pg_database_size(datname) "datsize" from pg_stat_database;' \
+echo 'select datid, datname, numbackends, xact_commit, xact_rollback, blks_read, blks_hit, tup_returned, tup_fetched, tup_inserted, tup_updated, tup_deleted, pg_database_size(datname) "datsize" from pg_stat_database;' \
| su - $USER -c "psql -d postgres -A -F';'" | sed '$d'
Module: check_mk
Branch: master
Commit: 23ef5e873f78e5754929753a5431fa763e12f201
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=23ef5e873f78e5…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 17:46:23 2013 +0100
FIX Now using /dev/null instead of closing stdin in linux agent
Some programs might not be working when stdin is closed. A more portable
approach seems to use /dev/null as stdin.
---
.werks/367 | 11 +++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/367 b/.werks/367
new file mode 100644
index 0000000..9f14404
--- /dev/null
+++ b/.werks/367
@@ -0,0 +1,11 @@
+Title: Now using /dev/null instead of closing stdin in linux agent
+Level: 2
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387212325
+Targetversion: future
+
+Some programs might not be working when stdin is closed. A more portable
+approach seems to use /dev/null as stdin.
diff --git a/ChangeLog b/ChangeLog
index dc20c59..3d34acb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -36,6 +36,7 @@
* 0364 FIX: brocade_mlx*: Several cleanups, fixed bug in brocade_mlx_fan where only the first worst state was shown in output
* 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
* 0366 FIX: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9...
+ * 0367 FIX: Now using /dev/null instead of closing stdin in linux agent...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 33899d5..28453ad 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -53,7 +53,7 @@ if [ "$1" = -d ]
then
set -xv
else
- exec <&- 2>/dev/null
+ exec </dev/null 2>/dev/null
fi
# Runs a command asynchronous by use of a cache file
Module: check_mk
Branch: master
Commit: 387650d14f58c632a7bb54193befc88b40b271d1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=387650d14f58c6…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 17:44:35 2013 +0100
FIX heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9
The paths /var/run/heartbeat/crm/cib_ro or /var/run/crm/cib_ro do not seem
to be existing anymore. Instead testing whether or not crmd is running.
---
.werks/366 | 11 +++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/366 b/.werks/366
new file mode 100644
index 0000000..07e917b
--- /dev/null
+++ b/.werks/366
@@ -0,0 +1,11 @@
+Title: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387212198
+Targetversion: future
+
+The paths /var/run/heartbeat/crm/cib_ro or /var/run/crm/cib_ro do not seem
+to be existing anymore. Instead testing whether or not crmd is running.
diff --git a/ChangeLog b/ChangeLog
index 0784db0..dc20c59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* 0363 FIX: mysql_capacity: Did use wrong calculated warn / crit thresholds...
* 0364 FIX: brocade_mlx*: Several cleanups, fixed bug in brocade_mlx_fan where only the first worst state was shown in output
* 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
+ * 0366 FIX: heartbeat_crm: Agent code is now compatible to pacemaker 1.1.9...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index ff0eb8d..33899d5 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -386,7 +386,7 @@ fi
# Heartbeat monitoring
# Different handling for heartbeat clusters with and without CRM
# for the resource state
-if [ -S /var/run/heartbeat/crm/cib_ro -o -S /var/run/crm/cib_ro ]; then
+if [ -S /var/run/heartbeat/crm/cib_ro -o -S /var/run/crm/cib_ro ] || pgrep crmd > /dev/null 2>&1; then
echo '<<<heartbeat_crm>>>'
crm_mon -1 -r | grep -v ^$ | sed 's/^ //; /^\sResource Group:/,$ s/^\s//; s/^\s/_/g'
fi
rpmnew file after updating package
Message-ID: <52af2c32.ZmHNWuY4kvauVcfD%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 5ce56b00c3e73fb0a04f516c49402b23ec542a20
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5ce56b00c3e73f…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 16 17:36:25 2013 +0100
FIX RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package
These files should not be left there after an RPM update, because they could
be loaded by xinetd. Removing these files now in %post section of RPM package.
---
.werks/365 | 11 +++++++++++
ChangeLog | 1 +
check_mk.spec | 3 +++
3 files changed, 15 insertions(+)
diff --git a/.werks/365 b/.werks/365
new file mode 100644
index 0000000..c6f6465
--- /dev/null
+++ b/.werks/365
@@ -0,0 +1,11 @@
+Title: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387211537
+Targetversion: future
+
+These files should not be left there after an RPM update, because they could
+be loaded by xinetd. Removing these files now in %post section of RPM package.
diff --git a/ChangeLog b/ChangeLog
index d121a2a..faf56cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,7 @@
* 0340 FIX: blade_health: fix check, it was totally broken...
* 0363 FIX: mysql_capacity: Did use wrong calculated warn / crit thresholds...
* 0364 FIX: brocade_mlx*: Several cleanups, fixed bug in brocade_mlx_fan where only the first worst state was shown in output
+ * 0365 FIX: RPMs: Cleaning up xinetd checkmk.rpmnew file after updating package...
Multisite:
* 0302 FIX: Fixed highlight of choosen elements in foldertee/views snapin in Chrome/IE
diff --git a/check_mk.spec b/check_mk.spec
index dc88a9f..72f6f4b 100644
--- a/check_mk.spec
+++ b/check_mk.spec
@@ -245,6 +245,7 @@ fi
%define reload_xinetd if [ -x /etc/init.d/xinetd ] ; then if pgrep -x xinetd >/dev/null ; then echo "Reloading xinetd..." ; /etc/init.d/xinetd reload ; else echo "Starting xinetd..." ; /etc/init.d/xinetd start ; fi ; fi
%define activate_xinetd if which chkconfig >/dev/null 2>&1 ; then echo "Activating startscript of xinetd" ; chkconfig xinetd on ; fi
+%define cleanup_rpmnew if [ -f /etc/xinetd.d/check_mk.rpmnew ] ; then rm /etc/xinetd.d/check_mk.rpmnew ; fi
%pre agent
if [ ! -x /etc/init.d/xinetd ] ; then
@@ -264,6 +265,7 @@ if [ ! -x /etc/init.d/xinetd ] ; then
fi
%post agent
+%cleanup_rpmnew
%activate_xinetd
%reload_xinetd
@@ -291,6 +293,7 @@ if [ ! -x /etc/init.d/xinetd ] ; then
fi
%post caching-agent
+%cleanup_rpmnew
%activate_xinetd
%reload_xinetd
Module: check_mk
Branch: master
Commit: 51ec145e0e992036e43fa0f3a0b203240025af1c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=51ec145e0e9920…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 16 17:32:49 2013 +0100
FIX Avoid rare exception in WATO when deleting a host
When deleting a host in an environment with distributed WATO under
circumstances that are unclear an exception could happen in a function called
<tt>find_host_sites</tt>. This exception is now handled correctly.
---
.werks/341 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 11 ++++++-----
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/.werks/341 b/.werks/341
new file mode 100644
index 0000000..6d35008
--- /dev/null
+++ b/.werks/341
@@ -0,0 +1,12 @@
+Title: Avoid rare exception in WATO when deleting a host
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1387211472
+Targetversion: future
+
+When deleting a host in an environment with distributed WATO under
+circumstances that are unclear an exception could happen in a function called
+<tt>find_host_sites</tt>. This exception is now handled correctly.
diff --git a/ChangeLog b/ChangeLog
index 3ac4b1d..58b5949 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -60,6 +60,7 @@
* 0331 FIX: LDAP diagnostic LOG can now have the $OMD_SITE$ macro configured via WATO...
* 0332 FIX: Own host tag groups without topics resulted in two groups "Host tags" in the rule editor
* 0361 FIX: The page linked by "new rule" can now be bookmarked again
+ * 0341 FIX: Avoid rare exception in WATO when deleting a host...
Notifications:
* 0362 sms: now searching PATH for sendsms and smssend commands...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 77cd9e8..4414320 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8222,11 +8222,12 @@ def global_replication_state():
return "clean"
def find_host_sites(site_ids, folder, hostname):
- host = folder[".hosts"][hostname]
- if "site" in host and host["site"]:
- site_ids.add(host["site"])
- elif folder[".siteid"]:
- site_ids.add(folder[".siteid"])
+ if hostname in folder[".hosts"]:
+ host = folder[".hosts"][hostname]
+ if "site" in host and host["site"]:
+ site_ids.add(host["site"])
+ elif folder[".siteid"]:
+ site_ids.add(folder[".siteid"])
# Scan recursively for references to sites
# in folders and hosts
Module: check_mk
Branch: master
Commit: bfc6de327c012fc5b0a3c13f1db90ca4fe81f533
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bfc6de327c012f…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Dec 16 17:36:18 2013 +0100
hitachi_hnas_cpu: New check for CPU utilization of Hitachi HNAS devices
---
.werks/316 | 8 ++++
ChangeLog | 1 +
checkman/hitachi_hnas_cpu | 43 +++++++++++++++++++
checks/hitachi_hnas_cpu | 59 +++++++++++++++++++++++++++
checks/hitachi_hnas_pnode | 6 +--
checks/hitachi_hnas_vnode | 6 +--
pnp-templates/check_mk-hitachi_hnas_cpu.php | 1 +
web/plugins/perfometer/check_mk.py | 1 +
8 files changed, 119 insertions(+), 6 deletions(-)
diff --git a/.werks/316 b/.werks/316
new file mode 100644
index 0000000..ae5f1f5
--- /dev/null
+++ b/.werks/316
@@ -0,0 +1,8 @@
+Title: hitachi_hnas_cpu: New check for CPU utilization of Hitachi HNAS devices
+Level: 2
+Component: checks
+Version: 1.2.5i1
+Date: 1387211739
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index d121a2a..3ac4b1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
* 0107 stulz_alerts, stulz_powerstate, stulz_temp, stulz_humidity: New Checks for Stulz clima devices
* 0075 raritan_pdu_inlet: new check to monitor inlet sensors of the Raritan PX-2000 PDUs
* 0315 hitachi_hnas_quorumdevice, hitachi_hnas_pnode, hitachi_hnas_vnode: New checks for Hitachi HNAS devices
+ * 0316 hitachi_hnas_cpu: New check for CPU utilization of Hitachi HNAS devices
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
diff --git a/checkman/hitachi_hnas_cpu b/checkman/hitachi_hnas_cpu
new file mode 100644
index 0000000..9920f83
--- /dev/null
+++ b/checkman/hitachi_hnas_cpu
@@ -0,0 +1,43 @@
+title: Hitachi HNAS: CPU Utilization of PNodes
+agents: snmp
+catalog: hw/network/brocade
+license: GPL
+distribution: check_mk
+description:
+ Checks the Module CPU Utilization of the physical Nodes (PNodes) of
+ Hitachi HNAS storage systems.
+
+ {WARN} or {CRIT} is returned, if the usage is above
+ given thresholds. {OK} is returned otherwise.
+
+item:
+ The ID of the PNode.
+
+examples:
+ # set default levels to 70 and 80 percent:
+ hitachi_hnas_cpu_default_levels = { "levels": (70.0, 80.0) }
+
+ # Check CPU Utilization of PNode with ID 1 on a HNAS called my-hnas with default levels
+ checks += [
+ ("my-hnas", "hitachi_hnas_cpu", '1', hitachi_hnas_cpu_default_levels)
+ ]
+
+ # or use individual levels for warn and crit
+ checks += [
+ ("my-hnas", "hitachi_hnas_cpu", '1', {'levels': (75.0, 85.0)})
+ ]
+
+perfdata:
+ One value cpu_util is returned which represents the CPU Utilization (in percent)
+ together with warn and crit levels.
+
+inventory:
+ Finds one item per PNode
+
+[parameters]
+parameters (dict): with the element
+{"levels"}: (float, float): levels of CPU utilization for {WARN} and {CRIT} in percent
+
+[configuration]
+hitachi_hnas_cpu_default_levels(dict): The standard levels for {WARN} and
+ {CRIT}, preset to { "levels": (80.0, 90.0) }
diff --git a/checks/hitachi_hnas_cpu b/checks/hitachi_hnas_cpu
new file mode 100644
index 0000000..c1c74f7
--- /dev/null
+++ b/checks/hitachi_hnas_cpu
@@ -0,0 +1,59 @@
+#!/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.
+
+hitachi_hnas_cpu_default_levels = { "levels" : (80.0, 90.0) }
+
+def inventory_hitachi_hnas_cpu(info):
+ inventory = []
+ for id, util in info:
+ inventory.append( (id, hitachi_hnas_cpu_default_levels) )
+ return inventory
+
+def check_hitachi_hnas_cpu(item, params, info):
+ warn, crit = params["levels"]
+ rc = 0
+
+ for id, util in info:
+ if id == item:
+ util=float(util)
+ if util > warn:
+ rc = 1
+ if util > crit:
+ rc = 2
+ perfdata = [ ('cpu_util', str(util) + '%', warn, crit, 0, 100) ]
+ return rc, "CPU utilization is %s%%" % util, perfdata
+
+ return 3, "No CPU utilization found"
+
+check_info["hitachi_hnas_cpu"] = {
+ "check_function" : check_hitachi_hnas_cpu,
+ "inventory_function" : inventory_hitachi_hnas_cpu,
+ "service_description" : "CPU utilization PNode %s",
+ "has_perfdata" : True,
+ "snmp_info" : (".1.3.6.1.4.1.11096.6.1.1.6.1.2.1", [1, 3]), # ID, Utilization
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.11096.6"),
+ "group" : "cpu_utilization_multiitem",
+}
diff --git a/checks/hitachi_hnas_pnode b/checks/hitachi_hnas_pnode
index 62ca333..1b57478 100644
--- a/checks/hitachi_hnas_pnode
+++ b/checks/hitachi_hnas_pnode
@@ -24,7 +24,7 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-def combine_item(id, name):
+def hitachi_hnas_pnode_combine_item(id, name):
combined = str(id)
if name != "":
combined += " " + name
@@ -33,7 +33,7 @@ def combine_item(id, name):
def inventory_hitachi_hnas_pnode(info):
inventory = []
for id, name, status in info:
- inventory.append( (combine_item(id, name), None) )
+ inventory.append( (hitachi_hnas_pnode_combine_item(id, name), None) )
return inventory
def check_hitachi_hnas_pnode(item, _no_params, info):
@@ -47,7 +47,7 @@ def check_hitachi_hnas_pnode(item, _no_params, info):
)
for id, name, status in info:
- if combine_item(id, name) == item:
+ if hitachi_hnas_pnode_combine_item(id, name) == item:
status = int(status)
if status == 0 or status >= len(statusmap):
return 3, "PNode reports unidentified status %s" % status
diff --git a/checks/hitachi_hnas_vnode b/checks/hitachi_hnas_vnode
index 3b8bc1f..36912da 100644
--- a/checks/hitachi_hnas_vnode
+++ b/checks/hitachi_hnas_vnode
@@ -24,7 +24,7 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-def combine_item(id, name):
+def hitachi_hnas_vnode_combine_item(id, name):
combined = str(id)
if name != "":
combined += " " + name
@@ -33,7 +33,7 @@ def combine_item(id, name):
def inventory_hitachi_hnas_vnode(info):
inventory = []
for id, name, status, is_admin, hosted_by in info:
- inventory.append( (combine_item(id, name), None) )
+ inventory.append( (hitachi_hnas_vnode_combine_item(id, name), None) )
return inventory
def check_hitachi_hnas_vnode(item, _no_params, info):
@@ -44,7 +44,7 @@ def check_hitachi_hnas_vnode(item, _no_params, info):
)
for id, name, status, is_admin, hosted_by in info:
- if combine_item(id, name) == item:
+ if hitachi_hnas_vnode_combine_item(id, name) == item:
status = int(status)
nodetype = ""
if status == 0 or status >= len(statusmap):
diff --git a/pnp-templates/check_mk-hitachi_hnas_cpu.php b/pnp-templates/check_mk-hitachi_hnas_cpu.php
new file mode 120000
index 0000000..104023f
--- /dev/null
+++ b/pnp-templates/check_mk-hitachi_hnas_cpu.php
@@ -0,0 +1 @@
+check_mk-hr_cpu.php
\ No newline at end of file
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 1a21a18..2abf9db 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -429,6 +429,7 @@ perfometers["check_mk-netapp_cpu"] = perfometer_cpu_utilization
perfometers["check_mk-cisco_cpu"] = perfometer_cpu_utilization
perfometers["check_mk-juniper_cpu"] = perfometer_cpu_utilization
perfometers["check_mk-brocade_mlx.module_cpu"] = perfometer_cpu_utilization
+perfometers["check_mk-hitachi_hnas_cpu"] = perfometer_cpu_utilization
def perfometer_ps_perf(row, check_command, perf_data):
perf_dict = dict([(p[0], float(p[1])) for p in perf_data])
Module: check_mk
Branch: master
Commit: eed452adfac3ec3af8caf9f3629abdd4b9338560
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eed452adfac3ec…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Dec 16 17:13:20 2013 +0100
Prepare against invalid output from local -a
---
modules/notify.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/notify.py b/modules/notify.py
index c845081..e0b98ae 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -535,7 +535,7 @@ def notify_via_email(context, write_into_spoolfile):
# Our resultion in future: use /usr/sbin/sendmail directly.
# Our resultion in the present: look with locale -a for an existing UTF encoding
# and use that.
- for encoding in os.popen("locale -a"):
+ for encoding in os.popen("locale -a 2>/dev/null"):
l = encoding.lower()
if "utf8" in l or "utf-8" in l or "utf.8" in l:
encoding = encoding.strip()