[checkmk-commits] Check_MK Git: check_mk: Revert "emc_datadomain_disks emc_datadomain_fs: new checks to monitor disks and filesystems of EMC Datadomain"

Götz Golla gg at mathias-kettner.de
Mon Feb 10 11:06:42 CET 2014


Module: check_mk
Branch: master
Commit: c47924faadca56c80b6bac80a3c905511e98e149
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c47924faadca56c80b6bac80a3c905511e98e149

Author: Götz Golla <gg at mathias-kettner.de>
Date:   Mon Feb 10 11:05:08 2014 +0100

Revert "emc_datadomain_disks emc_datadomain_fs:  new checks to monitor disks and filesystems of EMC Datadomain"
This change removes files accidentelly included in the commit 37cb73d5fa77da033b9b69b03951e4a7f9607736

---

 ChangeLog                   |    2 +-
 agents/check_mk_agent.linux |   43 +++++++++++++++++--------------------------
 checkman/stulz_pump         |    5 +----
 checks/stulz_pump           |   20 ++++++--------------
 4 files changed, 25 insertions(+), 45 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 85d3654..e5a9ce6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,13 +81,13 @@
     * 0699 emc_isilon_iops: New check for Disk Operations per Second (IOPS) in EMC Isilon Storage
     * 0132 New checks fjdarye101_disks fjdarye101_rluns: Fujitsu Storage Systems with 2013 Firmware
     * 0697 check_dns: allow to specify multiple expected answers
-    * 0700 arcserve_backup: new check for status of backups in an Arcserve Backup Server
     * 0580 emc_datadomain_fans, emc_datadomain_nvbat, emc_datadomain_power, emc_datadomain_temps: new hardware checks for EMC Datadomain
     * 0581 emc_datadomain_disks emc_datadomain_fs:  new checks to monitor disks and filesystems of EMC Datadomain
     * 0691 Solaris agent: include lofs in list of monitored filesystem types
     * 0694 wut_webtherm: Support new versions of WUT-Thermometer...
     * 0701 emc_isilon_diskstatus: new check for Status of Disks in EMC Isilon Storage Systems
     * 0135 apc_inputs: New Check for APC Input Contacts
+    * 0700 arcserve_backup: new check for status of backups in an Arcserve Backup Server
     * 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/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 711cf7a..cf22b2e 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -365,32 +365,23 @@ fi
 
 # Status of CUPS printer queues
 if type lpstat > /dev/null 2>&1; then
-    if pgrep cups > /dev/null 2>&1; then
-        echo '<<<cups_queues>>>'
-        CPRINTCONF=/etc/cups/printers.conf
-        if [ -r "$CPRINTCONF" ] ; then
-            LOCAL_PRINTERS=$(grep -E "<(Default)?Printer .*>" $CPRINTCONF | awk '{print $2}' | sed -e 's/>//')
-            lpstat -p | while read LINE
-            do
-                PRINTER=$(echo $LINE | awk '{print $2}')
-                if echo "$LOCAL_PRINTERS" | grep -q "$PRINTER"; then
-                    echo $LINE
-                fi
-            done
-            echo '---'
-            lpstat -o | while read LINE
-            do
-                PRINTER=$(echo $LINE | awk '{print $2}')
-                if echo "$LOCAL_PRINTERS" | grep -q "$PRINTER"; then
-                    echo $LINE
-                fi
-            done
-        else
-            lpstat -p
-            echo '---'
-            lpstat -o | sort
-        fi
-    fi
+   if pgrep cups > /dev/null 2>&1; then
+       echo '<<<cups_queues>>>'
+       WAITMAX="waitmax 3"
+       CPRINTCONF=/etc/cups/printers.conf
+       PRINTERS=$(waitmax 10 lpstat -a | awk '{print $1}')
+       if [ -r "$CPRINTCONF" ] ; then
+          for PQ in $PRINTERS ; do
+             grep -q -x -E "<(Default)?Printer $PQ>" $CPRINTCONF && $WAITMAX lpstat -p $PQ
+          done
+          echo '---'
+          for PQ in $PRINTERS ; do
+             grep -q -x -E "<(Default)?Printer $PQ>" $CPRINTCONF && $WAITMAX lpstat -o $PQ
+          done
+       else
+          $WAITMAX lpstat -p ; echo '---' ; $WAITMAX lpstat -o | sort
+       fi
+   fi
 fi
 
 # Heartbeat monitoring
diff --git a/checkman/stulz_pump b/checkman/stulz_pump
index 0f6ca10..c1435b8 100644
--- a/checkman/stulz_pump
+++ b/checkman/stulz_pump
@@ -4,11 +4,8 @@ catalog: hw/environment
 license: GPL
 distribution: check_mk
 description:
- This plugin checks the status and RPM of pumps of Stulz clima units. It returns
+ This plugin checks the status of pumps of Stulz clima units. Returns
  {OK} if the pump is running and {CRIT} if it is not running.
 
-perfdata:
- The RPM of the pump in percent of the maximum RPM are taken as performance data
-
 inventory:
  The inventory will create exactly one service per pump.
diff --git a/checks/stulz_pump b/checks/stulz_pump
index 3268d3b..e3e6ec2 100644
--- a/checks/stulz_pump
+++ b/checks/stulz_pump
@@ -26,36 +26,28 @@
 
 def inventory_stulz_pump(info):
     inventory = []
-    for pump_id, pump_status in info[0]:
+    for pump_id, pump_status in info:
         pump_id = pump_id.replace('.1', '')
         inventory.append( (pump_id, None) )
     return inventory
 
 def check_stulz_pump(item, _no_params, info):
-    for pump_id, pump_status in info[0]:
+    for pump_id, pump_status in info:
         pump_id = pump_id.replace('.1', '')
         if pump_id == item:
-            pump_rpm = info[1][int(pump_id)-1][0]
-            perfdata = [ ('rpm', pump_rpm+"%", None, None, 0, 100) ]
             if pump_status == '1':
-                state = 0
-                infotext = "Pump is running at %s%%" % pump_rpm
+                return 0, "Pump is running"
             elif pump_status == '0':
-                state = 2
-                infotext = "Pump is not running"
+                return 2, "Pump is not running"
             else:
-                state = 3
-                infotext = "Pump reports unidentified status " + pump_status
-            return state, infotext, perfdata
+                return 3, "Pump reports unidentified status " + pump_status
     return 3, "Pump %s not found" % item
 
 check_info["stulz_pump"] = {
     "check_function"        : check_stulz_pump,
     "inventory_function"    : inventory_stulz_pump,
     "service_description"   : "Pump %s",
-    "has_perfdata"          : True,
     "snmp_scan_function"    : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.29462.10",
-    "snmp_info"             : [( ".1.3.6.1.4.1.29462.10.2.1.1.2.1.4.1.1.5802", [ OID_END, 2] ),
-                               ( ".1.3.6.1.4.1.29462.10.2.1.1.2.1.4.1.1.5821", [2] ),]
+    "snmp_info"             : ( ".1.3.6.1.4.1.29462.10.2.1.1.2.1.4.1.1.5802", [ OID_END, 2] ),
 }
 



More information about the checkmk-commits mailing list