Module: check_mk
Branch: master
Commit: dad3df04b7d86b7f4ee15c638116bb030b9ab59d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dad3df04b7d86b…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Tue Oct 11 17:53:47 2016 +0200
added some additional information to werk #3946
---
inventory/snmp_uptime | 4 +++-
inventory/uptime | 4 +++-
web/plugins/views/inventory.py | 3 ++-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/inventory/snmp_uptime b/inventory/snmp_uptime
index 1289149..59ef36c 100644
--- a/inventory/snmp_uptime
+++ b/inventory/snmp_uptime
@@ -26,9 +26,11 @@
def inv_snmp_uptime(info):
uptime = parse_snmp_uptime(info[0][0])
- since = time.strftime("%c", time.localtime(time.time() -
float(uptime)))
+ current = time.time()
+ since = time.strftime("%c", time.localtime(current -
float(uptime)))
node = inv_tree("software.os.")
node["since"] = since
+ node["last"] = time.strftime("%c", time.localtime(current))
inv_info['snmp_uptime'] = {
diff --git a/inventory/uptime b/inventory/uptime
index 112c4c9..8419180 100644
--- a/inventory/uptime
+++ b/inventory/uptime
@@ -30,9 +30,11 @@
def inv_uptime(info):
uptime = float(info[0][0])
- since = time.strftime("%c", time.localtime(time.time() -
float(info[0][0])) )
+ current = time.time()
+ since = time.strftime("%c", time.localtime(current -
float(info[0][0])) )
node = inv_tree("software.os.")
node["since"] = since
+ node["last"] = time.strftime("%c", time.localtime(current))
inv_info['uptime'] = {
"inv_function" : inv_uptime,
diff --git a/web/plugins/views/inventory.py b/web/plugins/views/inventory.py
index 1cb65bb..ed31b23 100644
--- a/web/plugins/views/inventory.py
+++ b/web/plugins/views/inventory.py
@@ -680,7 +680,8 @@ inventory_displayhints.update({
".software.os.service_pack" : { "title" :
_("Service Pack"), "short" : _("Service Pack") },
".software.os.service_packs:" : { "title" :
_("Service Packs"), "render" : render_inv_dicttable,
"keyorder" : [
"name" ] },
- ".software.os.since" : { "title" :
_("Up since") },
+ ".software.os.since" : { "title" :
_("Up since"), },
+ ".software.os.last" : { "title" :
_("Last response"), },
".software.configuration." : { "title" :
_("Configuration"), },
".software.configuration.snmp_info." : { "title" :
_("SNMP Information"), },
".software.configuration.snmp_info.contact" : { "title" :
_("Contact"), },