Module: check_mk
Branch: master
Commit: 3b70c6599ee2f4093a04c3d3f124837cf6d4e421
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3b70c6599ee2f4…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Jun 9 12:41:01 2017 +0200
4780 FIX HW/SW inventory: Removed entries about section ages provided by check_mk_agent;
this reverts Werk 3904
These HW/SW inventory entries filled up inventory archive and slowed
down the monitoring system. See also Werk 4485.
Change-Id: Id348e9e94183f9c34388e67f600cacab116eb8df
---
.werks/4780 | 12 ++++++++++++
modules/inventory.py | 37 -------------------------------------
web/plugins/views/inventory.py | 8 --------
3 files changed, 12 insertions(+), 45 deletions(-)
diff --git a/.werks/4780 b/.werks/4780
new file mode 100644
index 0000000..4f1538e
--- /dev/null
+++ b/.werks/4780
@@ -0,0 +1,12 @@
+Title: HW/SW inventory: Removed entries about section ages provided by check_mk_agent;
this reverts Werk 3904
+Level: 2
+Component: inv
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1497004583
+
+These HW/SW inventory entries filled up inventory archive and slowed
+down the monitoring system. See also Werk 4485.
diff --git a/modules/inventory.py b/modules/inventory.py
index c9cb2a6..8832080 100644
--- a/modules/inventory.py
+++ b/modules/inventory.py
@@ -319,43 +319,6 @@ def do_inv_for_realhost(hostname):
else:
inv_function(info)
- extend_tree_with_check_mk_inventory_info(hostname)
-
-
-def extend_tree_with_check_mk_inventory_info(hostname):
- persisted_file = cmk.paths.omd_root + "/var/check_mk/persisted/%s" %
hostname
- try:
- persisted_data = eval(file(persisted_file).read()).items()
-
- except IOError, e:
- if e.errno == 2: # IOError: [Errno 2] No such file or directory
- return
- else:
- raise
-
- except Exception, e:
- raise MKGeneralException(_("Cannot parse persisted file of %s: %s") %
(hostname, e))
-
- add_check_mk_inventory_info_to_tree(hostname, persisted_data)
- console.verbose(tty.green + tty.bold + "check_mk_sections" + " "
+ tty.normal)
-
-
-def add_check_mk_inventory_info_to_tree(hostname, persisted_data):
- node = inv_tree_list("software.applications.check_mk.inventory.sections:")
- section_ages = []
- for section, sectiondata in persisted_data:
- when, until = sectiondata[:2]
- section_ages.append(when)
-
- node.append({
- "section" : section,
- "age" : when,
- "until" : until,
- })
-
- node = inv_tree("software.applications.check_mk.inventory.")
- node["oldest_section"] = min(section_ages)
-
def get_inv_params(hostname, info_type):
return host_extra_conf_merged(hostname, inv_parameters.get(info_type, []))
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index 7dd56b7..98c1c20 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -759,14 +759,6 @@ inventory_displayhints.update({
},
".software.applications.check_mk.cluster.nodes:" : {
"title" : _("Nodes"),
"render" :
render_inv_dicttable, },
- ".software.applications.check_mk.inventory." : {
"title" : _("Hardware/Software Inventory"), },
- ".software.applications.check_mk.inventory.oldest_section" : {
"title" : _("Oldest agent section"), "paint" :
"timestamp_as_age" },
- ".software.applications.check_mk.inventory.sections:" : {
"title" : _("Agent sections"),
- "render" :
render_inv_dicttable,
- "keyorder" :
[ "section", "age", "until" ] },
- ".software.applications.check_mk.inventory.sections:*.section" : {
"title" : _("Section") },
- ".software.applications.check_mk.inventory.sections:*.age" : {
"title" : _("Age"), "paint" : "timestamp_as_age"
},
- ".software.applications.check_mk.inventory.sections:*.until" : {
"title" : _("Valid until"), "paint" :
"date_and_time" },
".software.applications.citrix." : {
"title" : _("Citrix") },
".software.applications.citrix.controller." : {
"title" : _("Controller") },