Module: check_mk
Branch: master
Commit: 47a7a4bf59387ee67e2af11a5acda9ad53c09800
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=47a7a4bf59387e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 6 08:52:07 2010 +0100
cisco_power: Fixed wrong inventory of not present devices
---
ChangeLog | 1 +
LIESMICH.zutun | 10 ++++++++++
checks/cisco_power | 10 +++++++++-
3 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f59d391..8b5309a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,7 @@
* cisco_power: Not using power source as threshold anymore. Improved output
* cisco_fan: Does not inventorize 'notPresent' sensors anymore. Improved
output
* cisco_power: Not using power source as threshold anymore. Improved output
+ * cisco_power: Excluding 'notPresent' devices from inventory now
* cisco_temp_perf: Do not crash if device does not send current temperature
* tcp_conn_stats: new check for monitoring number of current TCP connections
* blade_*: Added snmp scan functions for better automatic inventory
diff --git a/LIESMICH.zutun b/LIESMICH.zutun
index 15b8fa6..d13a88b 100644
--- a/LIESMICH.zutun
+++ b/LIESMICH.zutun
@@ -15,6 +15,16 @@ Inventurcheck: retry_interval evt. anders (kuerzer) einstellbar
machen.
--------------------------------------------------------------------------------
BUGS beheben ab 1.1.9i1
--------------------------------------------------------------------------------
+
+Wenn ein Host nur den snmpwalk benutzen soll, versucht cmk trotzdem den Host via SNMP zu
kontaktieren.
+Beim Inventory sieht das z.B. so aus:
+> Host 'BOCBKKMM4000': SNMP Error
+> Host 'BOCBKKMM4000': SNMP Error
+> Host 'BOCBKKMM4000': SNMP Error
+> Host 'BOCBKKMM4000': SNMP Error
+Das liegt an den Checks, die noch snmp_info_single nutzen: blade_misc, ironport_misc,
snia_sml, snmp_info
+
+
ich bin mir nicht sicher ob das nun ein Thruk Problem oder ein Livestatus Problem ist.
Vermutlich beides :-)
Wenn ich im Thruk im Suchfenster einfach Enter drücke, kommt folgende Query bei raus:
GET services
diff --git a/checks/cisco_power b/checks/cisco_power
index 25efbc1..0ecf4d6 100644
--- a/checks/cisco_power
+++ b/checks/cisco_power
@@ -24,12 +24,20 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+# .1.3.6.1.4.1.9.9.13.1.5.1.2.1 "removed"
+# .1.3.6.1.4.1.9.9.13.1.5.1.2.2 "AC Power Supply"
+# .1.3.6.1.4.1.9.9.13.1.5.1.3.1 5
+# .1.3.6.1.4.1.9.9.13.1.5.1.3.2 1
+# .1.3.6.1.4.1.9.9.13.1.5.1.4.1 1
+# .1.3.6.1.4.1.9.9.13.1.5.1.4.2 2
+
cisco_power_states = ('', 'normal', 'warning',
'critical',
'shutdown', 'notPresent',
'notFunctioning')
cisco_power_source = ( '', 'unknown', 'ac', 'dc',
'externalPowerSupply', 'internalRedundant')
def inventory_cisco_power(checkname, info):
- return [ (line[0], '', '""') for line in info if 'RPS
NotExist' not in line[0]]
+ # 5 in line[1] means cisco_power_states = notPresent
+ return [ (line[0], '', '""') for line in info if 'RPS
NotExist' not in line[0] and line[1] != '5' ]
def check_cisco_power(item, params, info):
for line in info: