Module: check_mk
Branch: master
Commit: a19011bb5904d804bb1a7b3864d69c8d40c17168
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a19011bb5904d8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 24 11:40:25 2014 +0200
FIX SMS notifications: correctly handling spaces in phone numbers
A user might add a phone number with spaces, because the input is
not validated (formalized). This is a quick fix to prevent sendsms
to send messages to wrong numbers.
---
.werks/1061 | 10 ++++++++++
ChangeLog | 3 ++-
notifications/sms | 2 +-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/1061 b/.werks/1061
new file mode 100644
index 0000000..7da0ce0
--- /dev/null
+++ b/.werks/1061
@@ -0,0 +1,10 @@
+Title: SMS notifications: correctly handling spaces in phone numbers
+Level: 1
+Component: notifications
+Version: 1.2.5i5
+Date: 1406194717
+Class: fix
+
+A user might add a phone number with spaces, because the input is
+not validated (formalized). This is a quick fix to prevent sendsms
+to send messages to wrong numbers.
diff --git a/ChangeLog b/ChangeLog
index 4f05f54..cb4a500 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,8 +38,8 @@
* 1133 qlogic_sanbox_fabric_element: New Check for Fabric Elements in QLogic SANbox Fibre Channel Switches
* 1134 bintec_sensors.fan: New Check for Fan Speed of Bintec Routers
* 1135 bintec_sensors.voltage, bintec_sensors.temp: New Checks for Voltage and Temperature Sensors of Bintec Routers
- * 1136 bintec_brrp_status: New Check for BRRP States on Bintec Routers
* 1048 mem.win: support predictive levels...
+ * 1136 bintec_brrp_status: New Check for BRRP States on Bintec Routers
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
* 0943 FIX: if.include: fixed incorrect traffic percentage values in the check output of if checks...
@@ -94,6 +94,7 @@
Notifications:
* 1042 Rule based notifications: allow matching on host groups...
* 0828 FIX: Mails sent with mail/asciimail plugin now really set the from address
+ * 1061 FIX: SMS notifications: correctly handling spaces in phone numbers...
Reporting & Availability:
* 0991 FIX: Availability: optionally show time stamps as UNIX epoch time...
diff --git a/notifications/sms b/notifications/sms
index 0a1dc82..ba310f2 100755
--- a/notifications/sms
+++ b/notifications/sms
@@ -54,7 +54,7 @@ if os.environ['NOTIFY_WHAT'] == 'SERVICE':
else:
message += "is " + os.environ['NOTIFY_HOSTSTATE']
-empf = os.environ['NOTIFY_CONTACTPAGER']
+empf = os.environ['NOTIFY_CONTACTPAGER'].replace( " ", "")
if 0 == os.system("%s %s '%s'" % (send_path, empf, message[:160])):
sys.exit(0)
else:
Module: check_mk
Branch: master
Commit: 3bf97166bd44ccea17eea7f653726b48f000cb43
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3bf97166bd44cc…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jul 24 11:36:20 2014 +0200
sentry_pdu: New check to monitor plugs of sentry PDUs
---
.werks/183 | 8 ++++
ChangeLog | 3 +-
checkman/sentry_pdu | 18 +++++++++
checks/sentry_pdu | 73 ++++++++++++++++++++++++++++++++++
web/plugins/perfometer/check_mk.py | 13 +++---
web/plugins/wato/check_parameters.py | 3 +-
6 files changed, 111 insertions(+), 7 deletions(-)
diff --git a/.werks/183 b/.werks/183
new file mode 100644
index 0000000..5e76128
--- /dev/null
+++ b/.werks/183
@@ -0,0 +1,8 @@
+Title: sentry_pdu: New check to monitor plugs of sentry PDUs
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1406194542
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 4f05f54..34be56d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,8 +38,9 @@
* 1133 qlogic_sanbox_fabric_element: New Check for Fabric Elements in QLogic SANbox Fibre Channel Switches
* 1134 bintec_sensors.fan: New Check for Fan Speed of Bintec Routers
* 1135 bintec_sensors.voltage, bintec_sensors.temp: New Checks for Voltage and Temperature Sensors of Bintec Routers
- * 1136 bintec_brrp_status: New Check for BRRP States on Bintec Routers
* 1048 mem.win: support predictive levels...
+ * 1136 bintec_brrp_status: New Check for BRRP States on Bintec Routers
+ * 0183 sentry_pdu: New check to monitor plugs of sentry PDUs
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
* 0943 FIX: if.include: fixed incorrect traffic percentage values in the check output of if checks...
diff --git a/checkman/sentry_pdu b/checkman/sentry_pdu
new file mode 100644
index 0000000..018b902
--- /dev/null
+++ b/checkman/sentry_pdu
@@ -0,0 +1,18 @@
+title: Sentry PDU Devices
+agents: snmp
+catalog: hw/other
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the state of the plugs of Sentry PDUs.
+ As default the state of the time from inventory will result in the state {OK},
+ other states are in the state {CRIT}.
+ The required state can be configured to {on} or {off}. Then these plugs are in
+ the state {OK} when they are in the configured state, and {CRIT} otherwise.
+
+item:
+ The ID Number of the plug as given by the device
+
+inventory:
+ One service per plug will be created
+
diff --git a/checks/sentry_pdu b/checks/sentry_pdu
new file mode 100644
index 0000000..63d279c
--- /dev/null
+++ b/checks/sentry_pdu
@@ -0,0 +1,73 @@
+#!/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.
+
+
+def inventory_sentry_pdu(info):
+ for line in info:
+ yield line[0], int(line[1])
+
+def check_sentry_pdu(item, params, info):
+ states = {
+ 0: "off",
+ 1: "on",
+ 2: "offWait",
+ 3: "onWait",
+ 4: "offError",
+ 5: "onError",
+ 6: "noComm",
+ }
+ for name, state, power in info:
+ if item == name:
+ required_state = params
+ # The Wato rule returns eighter on or off
+ if required_state == 'on':
+ required_state = 1
+ elif required_state == 'off':
+ required_state = 0
+ state = int(state)
+ power = int(power)
+ infotext = "State is %s" % states[state]
+ if state != required_state:
+ yield 2, infotext
+ else:
+ yield 0, infotext
+
+ infotext = "Current consumption %s Watt" % power
+ perfdata = [ ('power', power )]
+ yield 0, infotext, perfdata
+ return
+
+ yield 3, 'Phase information not found'
+ return
+
+check_info["sentry_pdu"] = {
+ "check_function" : check_sentry_pdu,
+ "inventory_function" : inventory_sentry_pdu,
+ "service_description" : "Plug %s",
+ "group" : "plugs",
+ "snmp_info" : ( ".1.3.6.1.4.1.1718.3.2.2.1", [ 3, 5, 12 ] ),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.1718.3",
+}
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 74e6ac6..69a44c9 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -381,6 +381,14 @@ perfometers["check_mk-dell_chassis_power"] = perfometer_power
perfometers["check_mk-dell_chassis_powersupplies"] = perfometer_power
perfometers["check_mk-hp-proliant_power"] = perfometer_power
+def perfometer_power_simple(row, check_command, perf_data):
+ watt = int(perf_data[0][1])
+ text = "%s Watt" % watt
+ return text, perfometer_logarithmic(watt, 150, 2, "#60f020")
+
+perfometers["check_mk-ibm_svc_enclosurestats.power"] = perfometer_power_simple
+perfometers["check_mk-sentry_pdu"] = perfometer_power_simple
+
def perfometer_users(row, check_command, perf_data):
state = row["service_state"]
color = "#39f"
@@ -1008,11 +1016,6 @@ def perfometer_check_mk_ibm_svc_cache(row, check_command, perf_data):
perfometers["check_mk-ibm_svc_nodestats.cache"] = perfometer_check_mk_ibm_svc_cache
perfometers["check_mk-ibm_svc_systemstats.cache"] = perfometer_check_mk_ibm_svc_cache
-def perfometer_check_mk_ibm_svc_power(row, check_command, perf_data):
- watt = int(perf_data[0][1])
- text = "%s Watt" % watt
- return text, perfometer_logarithmic(watt, 150, 2, "#60f020")
-perfometers["check_mk-ibm_svc_enclosurestats.power"] = perfometer_check_mk_ibm_svc_power
def perfometer_licenses_percent(row, check_command, perf_data):
licenses = float(perf_data[0][1])
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 33b2a89..73a2ff4 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -3982,7 +3982,8 @@ register_check_parameters(
default_value = "on"
),
TextAscii(
- title = _("Plug Item ID number"),
+ title = _("Plug Item number or name"),
+ help = _("If you need the number or the name depends on the check. Just take a look to the service description. "),
allow_empty = True),
None
)
Module: check_mk
Branch: master
Commit: a25a9cabc67a837366232c901d011247200c7fe4
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a25a9cabc67a83…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Jul 24 11:34:22 2014 +0200
raritan_pdu_plugs: extended man page
---
checkman/raritan_pdu_plugs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/checkman/raritan_pdu_plugs b/checkman/raritan_pdu_plugs
index f7268c2..0afa47e 100644
--- a/checkman/raritan_pdu_plugs
+++ b/checkman/raritan_pdu_plugs
@@ -7,10 +7,10 @@ description:
This check monitors the state of the plugs of the Raritan PX-2000
family of intelligent rack power distribution units (iPDUs).
It has been tested with the model PX2-2180CR.
- As default plugs which are switched {on} are in the state {OK},
+ As default the state of the time from inventory will result in the state {OK},
other states are in the state {CRIT}.
- The required state can be configured to {off}. Then these plugs are in
- the state {OK} when they are switched off, and {CRIT} otherwise.
+ The required state can be configured to {on} or {off}. Then these plugs are in
+ the state {OK} when they are in the configured state, and {CRIT} otherwise.
item:
The ID Number of the plug as given by the device
Module: check_mk
Branch: master
Commit: 59892ed343b596a5b568409f4a50aeb005b1a9ba
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=59892ed343b596…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jul 24 10:43:44 2014 +0200
included check_mk_agent windows msi installer
The new msi install check_mk_agent.msi package contains the 32 and 64 bit version of the check_mk_agent.exe.
Upon install the msi package will determine the os architecture and install the matching agent accordingly.
The installed 32/64 Bit Agent is always named check_mk_agent.exe.
Note: The msi installer always installs into the 32 bit program files folder. This is by design.
---
.werks/1088 | 12 +
ChangeLog | 1 +
Makefile | 6 +-
agents/windows/Makefile | 6 +-
agents/windows/install_agent-64.exe | Bin 159342 -> 159342 bytes
agents/windows/install_agent.exe | Bin 156400 -> 156400 bytes
agents/windows/msibuild/Makefile | 16 +-
agents/windows/msibuild/msi_container.msi | Bin 612864 -> 613376 bytes
.../msibuild/patches/configure_remove_wixl.dif | 622 ++++++++++++++++++++
9 files changed, 652 insertions(+), 11 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=59892ed343…
Module: check_mk
Branch: master
Commit: e6c137f792aaa7a2576009815f07010cdf2b0eef
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e6c137f792aaa7…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Wed Jul 23 23:24:43 2014 +0200
jolokia_metrics.gc, jolokia_metrics.tp: now come with its own pnp templates
---
.werks/640 | 8 ++++
ChangeLog | 3 +-
pnp-templates/check_mk-jolokia_metrics.gc.php | 61 ++++++++++++++++++++++++
pnp-templates/check_mk-jolokia_metrics.tp.php | 63 +++++++++++++++++++++++++
4 files changed, 134 insertions(+), 1 deletion(-)
diff --git a/.werks/640 b/.werks/640
new file mode 100644
index 0000000..5fb4c7b
--- /dev/null
+++ b/.werks/640
@@ -0,0 +1,8 @@
+Title: jolokia_metrics.gc, jolokia_metrics.tp: now come with its own pnp templates
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1406150640
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index c8ea5d9..8781323 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,7 @@
* 1135 bintec_sensors.voltage, bintec_sensors.temp: New Checks for Voltage and Temperature Sensors of Bintec Routers
* 1048 mem.win: support predictive levels...
* 1136 bintec_brrp_status: New Check for BRRP States on Bintec Routers
+ * 0640 jolokia_metrics.gc, jolokia_metrics.tp: now come with its own pnp templates
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
* 0943 FIX: if.include: fixed incorrect traffic percentage values in the check output of if checks...
@@ -67,9 +68,9 @@
* 1083 FIX: ad_replication.bat: does not return data if the server is no DC
* 0638 FIX: windows_updates: agent plugin now always sends section header, even if no update information provided...
* 1084 FIX: ps: now able to handle bigger process groups without constant MKCounterWrapped Exceptions...
- * 0639 FIX: jolokia_metrics: fix for problem when catalina uses the standalone engine
* 1087 FIX: Active checks: Non-ascii check commands now converted into utf-8...
* 1049 FIX: ups_capacity: Fix exception when running on battery...
+ * 0639 FIX: jolokia_metrics: fix for problem when catalina uses the standalone engine
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/pnp-templates/check_mk-jolokia_metrics.gc.php b/pnp-templates/check_mk-jolokia_metrics.gc.php
new file mode 100644
index 0000000..aeb314a
--- /dev/null
+++ b/pnp-templates/check_mk-jolokia_metrics.gc.php
@@ -0,0 +1,61 @@
+<?php
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | 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.
+
+
+$opt[1] = "--vertical-label \"GC Count\" --title \" $servicedesc for $hostname\" ";
+
+$def[1] = "DEF:c=$RRDFILE[1]:$DS[1]:AVERAGE ";
+
+$def[1] .= rrd::comment("$NAME[1]\: \\n");
+$def[1] .= "AREA:c#3bfcdf:\"\" " ;
+$def[1] .= "LINE1:c#00b499:\"GC Count per Minute\" " ;
+$def[1] .= "GPRINT:c:LAST:\"%3.4lg LAST \" ";
+$def[1] .= "GPRINT:c:AVERAGE:\"%3.4lg AVERAGE \" ";
+$def[1] .= "GPRINT:c:MAX:\"%3.4lg MAX \\n\" ";
+
+if ($WARN[1] != "") {
+ $def[1] .= "HRULE:$WARN[1]#FFFF00:\"Warning at $WARN[1]$UNIT[1] \\n\" ";
+}
+if ($CRIT[1] != "") {
+ $def[1] .= "HRULE:$CRIT[1]#FF0000:\"Critical at $CRIT[1]$UNIT[1] \\n\" ";
+}
+
+$opt[2] = "--vertical-label \"GC Time\" --title \" $servicedesc for $hostname\" ";
+
+$def[2] = "DEF:t=$RRDFILE[2]:$DS[2]:AVERAGE ";
+
+$def[2] .= rrd::comment("$NAME[2]\: \\n");
+$def[2] .= "AREA:t#ffc7ac:\"\" " ;
+$def[2] .= "LINE1:t#ff6d25:\"GC Time (ms) per Minute\" " ;
+$def[2] .= "GPRINT:t:LAST:\"%3.0lf$UNIT[2] LAST \" ";
+$def[2] .= "GPRINT:t:AVERAGE:\"%3.2lf$UNIT[2] AVERAGE \" ";
+$def[2] .= "GPRINT:t:MAX:\"%3.2lf$UNIT[2] MAX \\n\" ";
+if ($WARN[2] != "") {
+ $def[2] .= "HRULE:$WARN[2]#FFFF00:\"Warning at $WARN[2]$UNIT[2] \\n\" ";
+}
+if ($CRIT[2] != "") {
+ $def[2] .= "HRULE:$CRIT[2]#FF0000:\"Critical at $CRIT[2]$UNIT[2] \\n\" ";
+}
+?>
diff --git a/pnp-templates/check_mk-jolokia_metrics.tp.php b/pnp-templates/check_mk-jolokia_metrics.tp.php
new file mode 100644
index 0000000..cf53c1a
--- /dev/null
+++ b/pnp-templates/check_mk-jolokia_metrics.tp.php
@@ -0,0 +1,63 @@
+<?php
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | 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.
+
+
+$opt[1] = "--vertical-label \"ThreadPool busy/count\" --title \" $servicedesc for $hostname\" ";
+
+$def[1] = "DEF:b=$RRDFILE[1]:$DS[1]:AVERAGE ";
+$def[1] .= "DEF:c=$RRDFILE[2]:$DS[2]:AVERAGE " ;
+
+
+# BUSY
+$def[1] .= rrd::comment("$NAME[2]\: ");
+$def[1] .= "AREA:c#00ff77:\"\" " ;
+$def[1] .= "LINE1:c#00b454:\"busy\" " ;
+$def[1] .= "GPRINT:c:LAST:\"%3.4lg LAST \" ";
+$def[1] .= "GPRINT:c:AVERAGE:\"%3.4lg AVERAGE \" ";
+$def[1] .= "GPRINT:c:MAX:\"%3.4lg MAX \\n\" ";
+if ($WARN[2] != "") {
+ $def[1] .= "HRULE:$WARN[2]#FFFF00:\" Warning at $WARN[2]$UNIT[2] \" ";
+}
+if ($CRIT[2] != "") {
+ $def[1] .= "HRULE:$CRIT[2]#FF0000:\" Critical at $CRIT[2]$UNIT[2] \" ";
+}
+# MAX
+$def[1] .= "HRULE:$MAX[1]#000000:\" Max at $MAX[1] \\n\" ";
+
+
+# COUNT
+$def[1] .= rrd::comment("$NAME[1]\: ");
+$def[1] .= "LINE1:b#00aae8:\"count\" " ;
+$def[1] .= "GPRINT:b:LAST:\"%3.4lg LAST \" ";
+$def[1] .= "GPRINT:b:AVERAGE:\"%3.4lg AVERAGE \" ";
+$def[1] .= "GPRINT:b:MAX:\"%3.4lg MAX \\n\" ";
+if ($WARN[1] != "") {
+ $def[1] .= "HRULE:$WARN[1]#E5B200:\" Warning at $WARN[1]$UNIT[1] \" ";
+}
+if ($CRIT[1] != "") {
+ $def[1] .= "HRULE:$CRIT[1]#E50066:\" Critical at $CRIT[1]$UNIT[1] \\n\" ";
+}
+
+?>