Module: check_mk
Branch: master
Commit: fec7e6813bef2865751ab80bb1130b0048161a31
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fec7e6813bef28…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Mar 9 09:46:40 2018 +0100
Updated werk 5624
Change-Id: I8ae5524d087ea8f14beb536896bb27aadb6b4ad0
---
.werks/5624 | 2 +-
inventory/oracle_instance | 13 ++++++++++---
inventory/oracle_performance | 22 +++++++++++++++++-----
web/plugins/views/inventory.py | 33 +++++++++++++++++++++++++--------
4 files changed, 53 insertions(+), 17 deletions(-)
diff --git a/.werks/5624 b/.werks/5624
index 02ea7d2..0da9e6d 100644
--- a/.werks/5624
+++ b/.werks/5624
@@ -1,4 +1,4 @@
-Title: oracle_performance, oracle_tablespaces: Inventory plugins provide status data
+Title: oracle_instance, oracle_performance, oracle_tablespaces: Inventory plugins provide
status data
Level: 1
Component: inv
Compatible: compat
diff --git a/inventory/oracle_instance b/inventory/oracle_instance
index 4cdf041..a8f8873 100644
--- a/inventory/oracle_instance
+++ b/inventory/oracle_instance
@@ -30,8 +30,10 @@
# last entry: db creation time 'ddmmyyyyhh24mi'
-def inv_oracle_instance(info):
- node = inv_tree_list("software.applications.oracle.instance:")
+def inv_oracle_instance(info, inventory_tree, status_data_tree):
+ path = "software.applications.oracle.instance:"
+ inv_node = inventory_tree.get_list(path)
+ status_node = status_data_tree.get_list(path)
for line in info:
db_creation_time = None
if len(line) == 6:
@@ -49,7 +51,7 @@ def inv_oracle_instance(info):
else:
continue
- node.append({
+ inv_node.append({
"sid" : sid,
"version" : version,
"openmode" : openmode,
@@ -58,6 +60,11 @@ def inv_oracle_instance(info):
"db_creation_time" : db_creation_time,
})
+ status_node.append({
+ "sid" : sid,
+ "db_uptime" : up_seconds,
+ })
+
inv_info['oracle_instance'] = {
'inv_function' : inv_oracle_instance,
diff --git a/inventory/oracle_performance b/inventory/oracle_performance
index 94b4ae4..3799dd2 100644
--- a/inventory/oracle_performance
+++ b/inventory/oracle_performance
@@ -30,14 +30,26 @@
def inv_oracle_performance(parsed, status_data_tree):
- status_node =
status_data_tree.get_list("software.applications.oracle.performance:")
+ status_node =
status_data_tree.get_list("software.applications.oracle.sga:")
for entry, entryinfo in parsed.items():
if "SGA_info" in entryinfo:
- sga_info, sga_size = entryinfo["SGA_info"].items()[0]
+ sga_data = entryinfo["SGA_info"]
status_node.append({
- "sid" : entry,
- "sga_info" : sga_info,
- "sga_size" : sga_size,
+ "sid" : entry,
+ "fixed_size" : sga_data.get("Fixed SGA
Size"),
+ "max_size" : sga_data.get("Maximum SGA
Size"),
+ "redo_buffer" : sga_data.get("Redo
Buffers"),
+ "buf_cache_size" : sga_data.get("Buffer Cache
Size"),
+ "in_mem_area_size" : sga_data.get("In-Memory Area
Size"),
+ "shared_pool_size" : sga_data.get("Shared Pool
Size"),
+ "large_pool_size" : sga_data.get("Large Pool
Size"),
+ "java_pool_size" : sga_data.get("Java Pool
Size"),
+ "streams_pool_size" : sga_data.get("Streams Pool
Size"),
+ "shared_io_pool_size" : sga_data.get("Shared IO Pool
Size"),
+ "data_trans_cache_size" : sga_data.get("Data Transfer
Cache Size"),
+ "granule_size" : sga_data.get("Granule
Size"),
+ "start_oh_shared_pool" : sga_data.get("Startup overhead
in Shared Pool"),
+ "free_mem_avail" : sga_data.get("Free SGA Memory
Available"),
})
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index a0005b4..4f64ae0 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -698,13 +698,14 @@ inventory_displayhints.update({
".software.applications.oracle.instance:" : {
"title" : _("Instances"),
"keyorder"
: [ "sid", "version", "openmode", "logmode",
-
"logins", "db_creation_time" ],
+
"logins", "db_uptime", "db_creation_time" ],
"view"
: "invorainstance_of_host" },
".software.applications.oracle.instance:*.sid" : {
"title" : _("SID"), },
".software.applications.oracle.instance:*.version" : {
"title" : _("Version"), },
".software.applications.oracle.instance:*.openmode" : {
"title" : _("Open mode"), },
".software.applications.oracle.instance:*.logmode" : {
"title" : _("Log mode"), },
".software.applications.oracle.instance:*.logins" : {
"title" : _("Logins"), },
+ ".software.applications.oracle.instance:*.db_uptime" : {
"title" : _("Uptime"), "paint" : "age" },
".software.applications.oracle.instance:*.db_creation_time" : {
"title" : _("Creation time"), "paint" :
"date_and_time" },
".software.applications.oracle.dataguard_stats:" : {
"title" : _("Dataguard statistics"),
@@ -721,12 +722,28 @@ inventory_displayhints.update({
".software.applications.oracle.recovery_area:*.sid" : {
"title" : _("SID"), },
".software.applications.oracle.recovery_area:*.flashback" : {
"title" : _("Flashback"), },
- ".software.applications.oracle.performance:" : { "title" :
_("Performance"),
- "keyorder" : [
"sid", "sga_info", "sga_size" ],
- "view":
"invoraperformance_of_host"},
- ".software.applications.oracle.performance:*.sid" : {
"title" : _("SID"), },
- ".software.applications.oracle.performance:*.sga_info" : {
"title" : _("SGA info"), },
- ".software.applications.oracle.performance:*.sga_size" : {
"title" : _("SGA size"), "paint" : "size" },
+ ".software.applications.oracle.sga:" : {
"title" : _("SGA Info"),
+ "keyorder"
: [ "sid", "fixed_size", "redo_buffer",
"buf_cache_size",
+
"in_mem_area_size", "shared_pool_size", "large_pool_size",
+
"java_pool_size", "streams_pool_size",
"shared_io_pool_size",
+
"data_trans_cache_size", "granule_size", "max_size",
+
"start_oh_shared_pool", "free_mem_avail" ],
+ "view"
: "invorasga_of_host" },
+ ".software.applications.oracle.sga:*.sid" : {
"title" : _("SID"), },
+ ".software.applications.oracle.sga:*.fixed_size" : {
"title" : _("Fixed size"), "paint" : "size" },
+ ".software.applications.oracle.sga:*.max_size" : {
"title" : _("Maximum size"), "paint" : "size" },
+ ".software.applications.oracle.sga:*.redo_buffer" : {
"title" : _("Redo buffers"), "paint" : "size" },
+ ".software.applications.oracle.sga:*.buf_cache_size" : {
"title" : _("Buffer cache size"), "paint" : "size"
},
+ ".software.applications.oracle.sga:*.in_mem_area_size" : {
"title" : _("In-memory area"), "paint" : "size"
},
+ ".software.applications.oracle.sga:*.shared_pool_size" : {
"title" : _("Shared pool size"), "paint" : "size"
},
+ ".software.applications.oracle.sga:*.large_pool_size" : {
"title" : _("Large pool size"), "paint" : "size"
},
+ ".software.applications.oracle.sga:*.java_pool_size" : {
"title" : _("Java pool size"), "paint" : "size"
},
+ ".software.applications.oracle.sga:*.streams_pool_size" : {
"title" : _("Streams pool size"), "paint" : "size"
},
+ ".software.applications.oracle.sga:*.shared_io_pool_size" : {
"title" : _("Shared pool size"), "paint" : "size"
},
+ ".software.applications.oracle.sga:*.data_trans_cache_size" : {
"title" : _("Data transfer cache size"), "paint" :
"size" },
+ ".software.applications.oracle.sga:*.granule_size" : {
"title" : _("Granule size"), "paint" : "size" },
+ ".software.applications.oracle.sga:*.start_oh_shared_pool" : {
"title" : _("Startup overhead in shared pool"), "paint" :
"size" },
+ ".software.applications.oracle.sga:*.free_mem_avail" : {
"title" : _("Free SGA memory available"), "paint" :
"size" },
".software.applications.oracle.tablespaces:" : {
"title" : _("Tablespaces"),
"keyorder"
: ["sid", "name", "version", "type",
"autoextensible",
@@ -1095,7 +1112,7 @@ declare_invtable_view("invorainstance",
".software.applications.oracle.ins
declare_invtable_view("invorarecoveryarea",
".software.applications.oracle.recovery_area:", _("Oracle recovery
area"), _("Oracle recovery areas"))
declare_invtable_view("invoradataguardstats",
".software.applications.oracle.dataguard_stats:", _("Oracle dataguard
statistic"), _("Oracle dataguard statistics"))
declare_invtable_view("invoratablespace",
".software.applications.oracle.tablespaces:", _("Oracle
tablespace"), _("Oracle tablespaces"))
-declare_invtable_view("invoraperformance",
".software.applications.oracle.performance:", _("Oracle
performance"), _("Oracle performance"))
+declare_invtable_view("invorasga",
".software.applications.oracle.sga:", _("Oracle
performance"), _("Oracle performance"))
# This would also be possible. But we muss a couple of display and filter hints.