Module: check_mk
Branch: master
Commit: d65ed41dcd181ef91f67d7ae703ce018efcf15d1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d65ed41dcd181e…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jan 8 14:00:40 2014 +0100
FIX blade_blades: Now only make inventory for blades that are powered on
The inventory function now only find blades that are powered on instead just exsist.
This handels the case, that a blade is ready for production but still not in use.
---
.werks/113 | 11 +++++++++++
ChangeLog | 1 +
checkman/blade_blades | 2 +-
checks/blade_blades | 4 ++--
4 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/.werks/113 b/.werks/113
new file mode 100644
index 0000000..3b8dd7e
--- /dev/null
+++ b/.werks/113
@@ -0,0 +1,11 @@
+Title: blade_blades: Now only make inventory for blades that are powered on
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i1
+Date: 1389185906
+Targetversion: future
+
+The inventory function now only find blades that are powered on instead just exsist.
+This handels the case, that a blade is ready for production but still not in use.
diff --git a/ChangeLog b/ChangeLog
index 70a0e52..e0ae4a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -79,6 +79,7 @@
* 0251 FIX: agent_vsphere / check_mk agent: fixed outdated systemtime of check_mk
agent...
* 0439 FIX: postfix_mailq: Linux agent better detects Postfix installation...
* 0440 FIX: heartbeat_crm: Inventory more gracefully handles case where agent output
is invalid...
+ * 0113 FIX: blade_blades: Now only make inventory for blades that are powered on...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checkman/blade_blades b/checkman/blade_blades
index aef942e..a2e5e2a 100644
--- a/checkman/blade_blades
+++ b/checkman/blade_blades
@@ -21,5 +21,5 @@ examples:
]
inventory:
- All blades in the system with the state 1 (present) are automatically
+ All blades that are powered on are automatically
inventorized.
diff --git a/checks/blade_blades b/checks/blade_blades
index f1f0e7c..6a79744 100644
--- a/checks/blade_blades
+++ b/checks/blade_blades
@@ -37,8 +37,8 @@ blade_blades_power_labels = ('off', 'on')
blade_blades_health_labels = ('unknown', 'good', 'warning',
'bad')
def inventory_blade_blades(info):
- # find only blades that are present
- return [ (line[0], '', line[1]) for line in info if line[1] == '1' ]
+ # find only blades that are powered on
+ return [ (line[0], '', line[1]) for line in info if line[2] == '1' ]
def check_blade_blades(item, params, info):
for line in info: