Module: check_mk
Branch: master
Commit: 9f884235710859eeb52879985e540819456b558b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9f884235710859…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 29 14:06:11 2013 +0100
FIX winperf_processor mem.win: Handling no/empty agent responses correctly now
When a host where these checks were running on was checked, both checks went in
an UNKNOWN state and created an invalid plugin output. Now the check handles this
situation with a nicer error message.
---
.werks/290 | 10 ++++++++++
ChangeLog | 3 ++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/.werks/290 b/.werks/290
new file mode 100644
index 0000000..13fcd6d
--- /dev/null
+++ b/.werks/290
@@ -0,0 +1,10 @@
+Title: winperf_processor mem.win: Handling no/empty agent responses correctly now
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1385730268
+Class: fix
+
+When a host where these checks were running on was checked, both checks went in
+an UNKNOWN state and created an invalid plugin output. Now the check handles this
+situation with a nicer error message.
diff --git a/ChangeLog b/ChangeLog
index 4926984..d72ef48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,14 +26,15 @@
* 0099 apc_mod_pdu_modules: New check for APC Modular Power Distribution Unit
* 0072 cmciii_pu_access cmciii_pu_canbus cmciii_pu_io cmciii_pu_temp: New checks for the Rittal CMC-III PU Unit
* 0100 juniper_cpu: New check for CPU utilization on Juniper switches
- * 0101 liebert_chiller_status: New check for Liebert Chiller devices
* 0236 windows_agent: each script can now be configured to run sync / async...
+ * 0101 liebert_chiller_status: New check for Liebert Chiller devices
* 0024 FIX: cisco_wlc: removed check configuration parameter ap_model...
* 0003 FIX: ps: Remove exceeding [ and ] in service description when using process inventory...
* 0037 FIX: checkman browser (cmk -m) was not working properly in network subtree...
* 0283 FIX: Interface Checks: ignore invalid error counts while interface is down...
* 0081 FIX: Fixed corruption in SNMP walks created with cmk --snmpwalk...
* 0286 FIX: esx_vsphrere_counters.ramdisk: Better handling for non existant ramdisks...
+ * 0290 FIX: winperf_processor mem.win: Handling no/empty agent responses correctly now...
Multisite:
* 0001 New filters for selecting several host/service-groups at once...
Module: check_mk
Branch: master
Commit: f0893f2c64b74eb02248122f9a8b940ae0fad403
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f0893f2c64b74e…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Nov 29 12:48:30 2013 +0100
brocade_mlx: updating manpages according to werk 0083
---
checkman/brocade_mlx.module_mem | 4 +++-
checkman/brocade_mlx.temperature | 25 +++++++++++++------------
2 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/checkman/brocade_mlx.module_mem b/checkman/brocade_mlx.module_mem
index bca713b..bf20e69 100644
--- a/checkman/brocade_mlx.module_mem
+++ b/checkman/brocade_mlx.module_mem
@@ -38,7 +38,9 @@ inventory:
[parameters]
parameters (dict): with the element
-{"levels"}: (float, float): levels of memory usage for {WARN} and {CRIT} in percent
+{"levels"}: (int or float, int or float): Levels of memory usage for {WARN} and {CRIT}.
+ If a value is given as float, it is interpreted as percentage.
+ If a value is given as int, it is interpreted as an absolute value in megabytes.
[configuration]
brocade_mlx_mem_default_levels(dict): The standard levels for {WARN} and
diff --git a/checkman/brocade_mlx.temperature b/checkman/brocade_mlx.temperature
index 113e389..3f89697 100644
--- a/checkman/brocade_mlx.temperature
+++ b/checkman/brocade_mlx.temperature
@@ -4,39 +4,40 @@ catalog: hw/network/brocade
license: GPL
distribution: check_mk
description:
- Checks the temperature sensors in Brocade NetIron MLX switching / routing
- devices.
+ Checks the temperature sensors of one module in Brocade NetIron MLX switching /
+ routing devices.
- {WARN} or {CRIT} is returned, if the temperature is above given thresholds.
+ {WARN} or {CRIT} is returned, if at least one of the temperatures is above given
+ thresholds.
{OK} is returned otherwise.
item:
- The description of the temperature sensor as provided by SNMP.
+ The description of the module as provided by SNMP.
examples:
# set default levels to 30°C and 40°C:
brocade_mlx_temperature_default_levels = (30, 40)
- # Check a sensor with description Switch Fabric module 0, sensor 1 temperature
- # on a box called my-mlx-device with default levels
+ # Check sensors of Switch Fabric module 0 on a box called my-mlx-device with
+ # default levels
checks += [
- ("my-mlx-device", "brocade_mlx.temperature", 'Switch Fabric module 0, sensor 1 temperature', brocade_mlx_temperature_default_levels)
+ ("my-mlx-device", "brocade_mlx.temperature", 'Switch Fabric module 0', brocade_mlx_temperature_default_levels)
]
# or use individual levels for warn and crit
checks += [
- ("my-mlx-device", "brocade_mlx.temperature", 'Switch Fabric module 0, sensor 1 temperature', (40, 50)
+ ("my-mlx-device", "brocade_mlx.temperature", 'Switch Fabric module 0', (40, 50)
]
perfdata:
- one value is returned: The temperature in °C, together with warn and crit levels
+ one value per sensor is returned: The temperature in °C, together with warn and crit levels
inventory:
- Finds one item per temperature sensor
+ Finds one item per module
[parameters]
-warn(int): {WARN} state is triggered, if the temperature is higher than this.
-crit(int): {CRIT} state is triggered, if the temperature is higher than this.
+warn(int): {WARN} state is triggered, if at least one temperature is higher than this.
+crit(int): {CRIT} state is triggered, if at least one temperature is higher than this.
[configuration]
brocade_mlx_temperature_default_levels(int, int): The standard levels for {WARN}
Module: check_mk
Branch: master
Commit: 2778a525fe1d1f063c458831dbbe64c59ad25447
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2778a525fe1d1f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 29 12:38:39 2013 +0100
df: Solaris agent now also supports samfs
---
.werks/8 | 8 ++++++++
ChangeLog | 1 +
agents/check_mk_agent.solaris | 2 +-
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.werks/8 b/.werks/8
new file mode 100644
index 0000000..7b307ac
--- /dev/null
+++ b/.werks/8
@@ -0,0 +1,8 @@
+Title: df: Solaris agent now also supports samfs
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1385725089
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index cf3af12..660f019 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,7 @@
* 0236 windows_agent: each script can now be configured to run sync / async...
* 0101 liebert_chiller_status: New check for Liebert Chiller devices
* 0083 brocade_mlx: Temperature sensors of one module now in one common check...
+ * 0008 df: Solaris agent now also supports samfs
* 0024 FIX: cisco_wlc: removed check configuration parameter ap_model...
* 0003 FIX: ps: Remove exceeding [ and ] in service description when using process inventory...
* 0037 FIX: checkman browser (cmk -m) was not working properly in network subtree...
diff --git a/agents/check_mk_agent.solaris b/agents/check_mk_agent.solaris
index 58cd083..4244213 100755
--- a/agents/check_mk_agent.solaris
+++ b/agents/check_mk_agent.solaris
@@ -67,7 +67,7 @@ fi
# Filesystem usage for UFS and VXFS
echo '<<<df>>>'
-for fs in ufs vxfs
+for fs in ufs vxfs samfs
do
df -l -k -F $fs 2>/dev/null | sed 1d | \
while read Filesystem kbytes used avail capacity Mountedon
Module: check_mk
Branch: master
Commit: 67d2c878ac7b411bb702f1d9b2ecb1b85467d479
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=67d2c878ac7b41…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Fri Nov 29 12:22:01 2013 +0100
brocade_mlx: Temperature sensors of one module now in one common check
Up to now, in Brocade MLX devices, each temperature sensor got an own check.
Now the temperature sensors of one module are grouped together in one
common check and one common PNP graph. Should improve readability.
---
.werks/83 | 10 ++++
ChangeLog | 3 +-
checks/brocade_mlx | 54 ++++++++++++++------
pnp-templates/check_mk-brocade_mlx.temperature.php | 47 ++++++++++++++++-
4 files changed, 97 insertions(+), 17 deletions(-)
diff --git a/.werks/83 b/.werks/83
new file mode 100644
index 0000000..8bac6a0
--- /dev/null
+++ b/.werks/83
@@ -0,0 +1,10 @@
+Title: brocade_mlx: Temperature sensors of one module now in one common check
+Level: 1
+Component: checks
+Version: 1.2.3i7
+Date: 1385723866
+Class: feature
+
+Up to now, in Brocade MLX devices, each temperature sensor got an own check.
+Now the temperature sensors of one module are grouped together in one
+common check and one common PNP graph. Should improve readability.
diff --git a/ChangeLog b/ChangeLog
index 4926984..cf3af12 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,8 +26,9 @@
* 0099 apc_mod_pdu_modules: New check for APC Modular Power Distribution Unit
* 0072 cmciii_pu_access cmciii_pu_canbus cmciii_pu_io cmciii_pu_temp: New checks for the Rittal CMC-III PU Unit
* 0100 juniper_cpu: New check for CPU utilization on Juniper switches
- * 0101 liebert_chiller_status: New check for Liebert Chiller devices
* 0236 windows_agent: each script can now be configured to run sync / async...
+ * 0101 liebert_chiller_status: New check for Liebert Chiller devices
+ * 0083 brocade_mlx: Temperature sensors of one module now in one common check...
* 0024 FIX: cisco_wlc: removed check configuration parameter ap_model...
* 0003 FIX: ps: Remove exceeding [ and ] in service description when using process inventory...
* 0037 FIX: checkman browser (cmk -m) was not working properly in network subtree...
diff --git a/checks/brocade_mlx b/checks/brocade_mlx
index 025c73d..104d1bc 100644
--- a/checks/brocade_mlx
+++ b/checks/brocade_mlx
@@ -30,7 +30,8 @@ brocade_mlx_info = [ ('.1.3.6.1.4.1.1991.1.1.1.2.1.1', [ 1, 2, 3 ]), # power sup
# modules (id, descr, overall status, MemoryTotal, MemoryAvailable)
('.1.3.6.1.4.1.1991.1.1.2.11.1.1.5', [ OID_END, "" ]),
# modules (Rest of OId starting with module ID, CpuUtilPercent)
- ('.1.3.6.1.4.1.1991.1.1.2.13.1.1', [ 3, 4 ]), # temperature sensors (descr, temperature)
+ ('.1.3.6.1.4.1.1991.1.1.2.13.1.1', [ 3, OID_END, 4 ]),
+ # temperature sensors (descr, sensor ID, temperature)
]
def brocade_mlx_scan(oid):
@@ -278,35 +279,58 @@ check_info["brocade_mlx.module_cpu"] = {
brocade_mlx_temperature_default_levels = (50, 60)
+def compose_item(name):
+ name = re.sub(" *temperature", "", name)
+ name = re.sub(", sensor [0-9]+", "", name)
+ return name
+
def inventory_brocade_mlx_temp(info):
inventory = []
- for temp_descr, temp_value in info[4]:
- inventory.append( (temp_descr, "brocade_mlx_temperature_default_levels") )
+ import pprint; pprint.pprint(info[4])
+ for temp_descr, temp_id, temp_value in info[4]:
+ temp_descr = compose_item(temp_descr)
+ if ((temp_descr, "brocade_mlx_temperature_default_levels") not in inventory):
+ inventory.append( (temp_descr, "brocade_mlx_temperature_default_levels") )
return inventory
def check_brocade_mlx_temp(item, params, info):
warn, crit = params
- for temp_descr, temp_value in info[4]:
- # Info from the MIB: "Each unit is 0.5 degrees Celcius."
- temp_value = int(saveint(temp_value) / 2)
- if temp_descr == item:
+ status = 0
+ message = ""
+ perfdata = []
- status = 0
- if temp_value > warn:
+ for temp_descr, temp_id, temp_value in info[4]:
+ # Info from the MIB: "Each unit is 0.5 degrees Celcius."
+ temp_value = int(temp_value) / 2
+ current_item = compose_item(temp_descr)
+ if current_item == item:
+ # OID_END needs to be used for sensor id because especially
+ # Active management modules may have more temperature sensors
+ # with the same description
+ temp_id = re.sub("[0-9]+\.", "", temp_id)
+ #print "%s : %s : %s" % (temp_descr, temp_id, temp_value);
+
+ if (message != ""):
+ message += ", "
+ message += "Sensor %s: %s°C" % (temp_id, temp_value)
+ if temp_value > warn and status < 1:
status = 1
- if temp_value > crit:
+ message += "(!)"
+ if temp_value > crit and status < 2:
status = 2
+ message += "(!!)"
- perfdata = [ ('temperature', str(temp_value) + 'C', warn, crit, '', '') ]
-
- return status, "Temperature is %s°C" % temp_value, perfdata
+ perfdata.append( ('sensor%s' % temp_id, str(temp_value) + 'C', warn, crit, '', '') )
- return 3, "temp supply %s not found" % item
+ if (message == ""):
+ return 3, "Temperature sensors for %s not found" % item
+ else:
+ return status, message, perfdata
check_info["brocade_mlx.temperature"] = {
"check_function" : check_brocade_mlx_temp,
"inventory_function" : inventory_brocade_mlx_temp,
- "service_description" : "%s",
+ "service_description" : "Temperature %s",
"snmp_info" : brocade_mlx_info,
"snmp_scan_function" : brocade_mlx_scan,
"has_perfdata" : True,
diff --git a/pnp-templates/check_mk-brocade_mlx.temperature.php b/pnp-templates/check_mk-brocade_mlx.temperature.php
deleted file mode 120000
index fd89bc4..0000000
--- a/pnp-templates/check_mk-brocade_mlx.temperature.php
+++ /dev/null
@@ -1 +0,0 @@
-check_mk-dell_powerconnect_temp.php
\ No newline at end of file
diff --git a/pnp-templates/check_mk-brocade_mlx.temperature.php b/pnp-templates/check_mk-brocade_mlx.temperature.php
new file mode 100644
index 0000000..eb9cfbd
--- /dev/null
+++ b/pnp-templates/check_mk-brocade_mlx.temperature.php
@@ -0,0 +1,46 @@
+<?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 $UNIT[1] --slope-mode -l0 -u 45 --title \"" . $this->MACRO['DISP_HOSTNAME'] . ' / ' . $this->MACRO['DISP_SERVICEDESC'] . "\" -w 600";
+
+$line_colors = array( "5f7a2f", "2f8077", "2f5580", "662f80", "802f71", "802f36", "804b2f", "80762f");
+$def[1] = "";
+
+foreach ($NAME as $i => $n) {
+ $def[1] .= "DEF:$n=$RRDFILE[$i]:$DS[1]:AVERAGE ";
+}
+foreach ($NAME as $i => $n) {
+ $ii = $i % 8;
+ $def[1] .= "LINE:$n#$line_colors[$ii]:\"$n\" ";
+ $def[1] .= "GPRINT:$n:LAST:\"Cur\: %.0lf C \" ";
+ $def[1] .= "GPRINT:$n:AVERAGE:\"Avg\: %.0lf C \" ";
+ $def[1] .= "GPRINT:$n:MIN:\"Min\: %.0lf C \" ";
+ $def[1] .= "GPRINT:$n:MAX:\"Max\: %.0lf C \\n\" ";
+}
+
+$def[1] .= "HRULE:$WARN[1]#ffe000:\"Warning at $WARN[1] C\" ";
+$def[1] .= "HRULE:$CRIT[1]#ff0000:\"Critical at $CRIT[1] C \\n\" ";
+
+?>
Module: check_mk
Branch: master
Commit: b76e1b9031bac538fbe2ebf33408e80e75bed374
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b76e1b9031bac5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Nov 29 12:04:51 2013 +0100
Aufgeräumnt
---
doc/drafts/LIESMICH.inventur | 58 ------------------------------------------
1 file changed, 58 deletions(-)
diff --git a/doc/drafts/LIESMICH.inventur b/doc/drafts/LIESMICH.inventur
deleted file mode 100644
index 7981f1a..0000000
--- a/doc/drafts/LIESMICH.inventur
+++ /dev/null
@@ -1,58 +0,0 @@
-SERVER-INVENTURISIERUNG
------------------------
-
-(aus der Antwort aus einer Email)
-
-in der Tat haben wir über das Thema diskutiert und ich habe mir auch
-einige Gedanken dazu gemacht. Die Ideen aus dem LIESMICH.interval sind
-nicht zuletzt deswegen entstanden.
-
-Das Konzept, dass mir vorschwebt, ist allerdings nicht, einfach Check_MK
-als Transportmechnismus für ein bestehenden Inventurisierungsskript zu
-nehmen, sondern die vorhandenen Mittel auszureizen. Das Beispiel, das Sie
-mir gemailt haben, zeigt den Grund: der aktuelle Agent sendet bereits heute
-einen Großteil der Daten. Wenn man z.B. unter Linux noch ergänzt:
-
-/proc/cpuinfo
-rpm -qa
-lspci
-dmidecode
-
-Dann hat man fast alles, was was man braucht. Die Idee ist wie beim Monitoring
-mit Check_MK, dass der Agent die Daten nicht vorauswertet - also z.B. nicht
-selbst in der Ausgabe von lspci nach einer Soundkarte sucht - sondern dass
-man das im zentralen Check_MK macht. Das ist effizienter, flexibler, leichter
-änderbar und sorgt vor allem für einen viel einfacheren Agenten.
-
-Was man also tun müsste wäre:
-
-* Agenten um eine Handvoll Plugins erweitern, dabei eventuelle Langläufer
-mit größeren Intervall abfedern. Im obigen Beispiel ist das evtl. noch
-nicht mal notwendig.
-
-* Inventur-basierte Parser für die vorhandenen und neuen relevanten Sektionen
-schreiben. Die extrahieren dann Daten und gliedern sie in einen strukturierten
-Baum ein. Der Baum wird pro Host in eine Daten geschrieben.
-
-* Die Check_MK Kommandozeile um Befehle zur Inventur erweitern.
-
-* Auch im WATO eine Bedienung der Inventur ermöglichen - z.B.
-direktes antriggern. Evtl. ist die Inventur aber einfach als aktiver
-Check realisiert. Damit könnte man die Nagios-Funktionen direkt nutzen
-(z.B. Reschedule).
-
-* In der Multisite-GUI Seiten, mit denen das schön angezeigt werden
-kann. Evtl. verwendet man die Tabellenfunktionen, die es aktuell schon
-gibt. Dadurch könnte man alles nutzen, wie Filter/Suchfunktionen, Sortierung,
-Gruppierung, Freie Spaltenauswahl, Export in JSON, etc. und könnte die
-Daten auch sofort mit Monitoringdaten verknüpfen. Evtl. dann noch ein
-Webservice für einen XML-Export.
-
-* Das ganze im Rahmen des verteilten Monitorings auch umsetzen, also Zugriff
-über Multisite auf Inventurdaten, die auf einem anderen Host liegen -
-oder Synchronisation der Daten.
-
-* Und - am schwierigsten - einen guten Begriff für das ganze finden. Denn
-Check_MK verwendet den Begriff "Inventur" bereits für das automatische
-Einrichten von Services....
-