Module: check_mk
Branch: master
Commit: 2507b21b2108d137edc3e24050aa289791ce6a9b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2507b21b2108d1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Feb 16 14:35:14 2016 +0100
#3219 FIX lnx_distro: Now detecting Oracle VM Server correctly
---
.werks/3219 | 10 ++++++++++
ChangeLog | 3 +++
inventory/lnx_distro | 18 +++++++++++++++++-
3 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/.werks/3219 b/.werks/3219
new file mode 100644
index 0000000..d45a031
--- /dev/null
+++ b/.werks/3219
@@ -0,0 +1,10 @@
+Title: lnx_distro: Now detecting Oracle VM Server correctly
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1455629695
+
+
diff --git a/ChangeLog b/ChangeLog
index 6a43416..8b90914 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,9 @@
Event Console:
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
+ HW/SW-Inventory:
+ * 3219 FIX: lnx_distro: Now detecting Oracle VM Server correctly
+
1.2.8b1:
Core & Setup:
diff --git a/inventory/lnx_distro b/inventory/lnx_distro
index c8fc2ed..d647dbe 100644
--- a/inventory/lnx_distro
+++ b/inventory/lnx_distro
@@ -34,6 +34,9 @@
# <<<lnx_distro:sep(124)>>>
# /etc/redhat-release|Red Hat Enterprise Linux Server release 6.5 (Santiago)
+# <<<lnx_distro:sep(124)>>>
+# /etc/redhat-release|Oracle VM server release x.x.x
+
# <<<lnx_distro:sep(124):persist(1399310551)>>>
# /etc/SuSE-release|SUSE Linux Enterprise Server 11 (x86_64)|VERSION = 11|PATCHLEVEL = 2
@@ -46,7 +49,10 @@ def inv_lnx_distro(info):
elif line[0] == '/etc/debian_version':
inv_lnx_parse_debian(node, line[1])
elif line[0] == '/etc/redhat-release':
- inv_lnx_parse_redhat_release(node, line[1])
+ if line[1].startswith("Oracle"):
+ inv_lnx_parse_oracle_vm_server_release(node, line[1])
+ else:
+ inv_lnx_parse_redhat_release(node, line[1])
elif line[0] == '/etc/SuSE-release':
inv_lnx_parse_suse_release(node, line[1:])
elif line[0] == '/usr/share/cma/version':
@@ -77,6 +83,16 @@ def inv_lnx_parse_suse_release(node, line):
node["code_name"] = "Bottle"
+# <<<lnx_distro:sep(124)>>>
+# /etc/redhat-release|Oracle VM server release x.x.x
+def inv_lnx_parse_oracle_vm_server_release(node, line):
+ node["type"] = "linux"
+ parts = line.split(" ")
+ node["vendor"] = parts.pop(0)
+ node["version"] = parts.pop(-1)
+ node["name"] = " ".join(parts[:-1])
+
+
def inv_lnx_parse_redhat_release(node, line):
node["type"] = "linux"
parts = line.split("(")