Module: check_mk
Branch: master
Commit: bee29d9e49cb2c0635be17338d4e0dcabf60dee3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bee29d9e49cb2c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jan 13 10:32:47 2011 +0100
Removed df.trend check for inclusion in releases after 1.4
---
checks/df | 133 -------------------------------------------------------------
1 files changed, 0 insertions(+), 133 deletions(-)
diff --git a/checks/df b/checks/df
index 1555b66..a809e35 100644
--- a/checks/df
+++ b/checks/df
@@ -101,136 +101,3 @@ def inventory_df(checkname, info):
return inventory
check_info['df'] = (check_df, "fs_%s", 1, inventory_df)
-
-
-
-# New check: df.trend with checks the amount of space
-# which has been allocated in a given time range
-#
-# Author: Lars Michelsen <lm(a)mathias-kettner.de
-
-df_trend_default_levels = (86400, 1.0, 2.0, 10, None)
-
-# This stores the current value and compares it with the value
-# which before "backlog" seconds. If there is no value found
-# with this age (check is too new) the oldest known value is used.
-def get_trend(itemname, this_time, this_val, backlog):
-
- # first call: take current value
- if not itemname in g_counters:
- g_counters[itemname] = (this_time, this_val)
-
- if opt_dont_submit:
- return 0, this_val
- raise MKCounterWrapped(itemname, 'Counter initialization')
-
- # Get previous value and time difference
- last_time, last_val = g_counters.get(itemname)
- timedif = this_time - last_time
-
- # Only update when old data is older than 24h
- if this_time - last_time > backlog:
- print "get_trend: Saving new val"
- g_counters[itemname] = (this_time, this_val)
-
- return timedif, (this_val - last_val)
-
-def inventory_df_trend(checkname, info):
- inventory = []
- for line in info:
- try:
- fs_type = line[1]
- size_kb = int(line[2])
- if size_kb == 0 or line[5] == '-':
- continue # exclude filesystems without size
- item = " ".join(line[6:]).replace('\\', '/') # Windows \ is replaced with /
-
- # exclude some filesystem types and some items
- if fs_type not in inventory_df_exclude_fs and item not in inventory_df_exclude_mountpoints:
- inventory.append((item, 'df_trend_default_levels'))
- except ValueError,e:
- sys.stderr.write("Invalid plugin output '%s'\n" % (line,))
- pass # ignore e.g. entries for /proc, etc. if plugin sends any
-
- return inventory
-
-# FIXME: There is some duplicate code with the df check. Maybe move to include file
-def check_df_trend(item, params, info):
- # df outputs seven columns:
- # DEVICE FS-TYPE SIZE(KB) USED(KB) AVAIL(KB) USED(%) MOUNTPOINT
- # The mount point may contain spaces (seen on VMWare volumes)
-
- used_list = [ l for l in info if " ".join(l[6:]).replace('\\','/') == item ]
-
- if len(used_list) == 0:
- return (3, "UNKNOWN - %s missing or not a partition" % item )
- used = used_list[0] # might be listed twice. We take the first occurance
-
- # In some rare cases the item may contain a space (happened on ESX).
- if len(used) > 7:
- used = used[0:6] + [ " ".join(used[6:]) ]
-
- if len(used) != 7 or used[5][-1] != '%':
- return (3, "UNKNOWN - Invalid output from agent (%s)" % (' '.join(used),))
-
- bytes_total = saveint(used[2]) * 1024
- bytes_used = bytes_total - (saveint(used[4]) * 1024)
-
- # Get trend within the given timerange. When there are no information
- # for the whole range get the oldest available data
- try:
- timedif, trend = get_trend("df.trend.%s" % item, time.time(), saveint(bytes_used), params[0])
- except MKCounterWrapped, e:
- return (3, "UNKNOWN - Initialized value -> Skipping check result")
-
- # Check thresholds: percentage trend
- perc_used = 100 * (bytes_used / float(bytes_total))
- perc_trend = 100 * (trend / float(bytes_total))
- status = 0
- status_txt = ''
- if params[2] and perc_trend > params[2]:
- status = 2
- status_txt = ' (grew more than %s%%)' % params[2]
- elif params[1] and perc_trend > params[1]:
- status = 1
- status_txt = ' (grew more than %s%%)' % params[1]
-
- # Format the timedif
- (hours, seconds) = divmod(timedif, 3600)
- (minutes, seconds) = divmod(seconds, 60)
- timedif_txt = '%02d:%02d:%02d' % (int(hours), int(minutes), int(seconds))
-
- perfdata = [
- ( 'trend_mb', '%.2fMB' % (trend / 1024 / 1024), '', '', 0, '%.2f' % (bytes_total / 1024 / 1024)),
- ( 'trend_perc', '%.2f%%' % perc_trend, params[1], params[2], 0, 100 ),
- ]
-
- output = "%s trend is %s (%.2f%%) for last %s%s" % \
- (item, get_bytes_human_readable(trend), perc_trend, timedif_txt, status_txt)
-
- # Calculate the time left, assuming linear growing
- sec_left = -1
- if trend > 0:
- bytes_per_sec = trend / timedif
- sec_left = bytes_total / bytes_per_sec
-
- if params[4] and params[4] * 86400 > sec_left:
- status = 2
- status_txt = ' (CRIT: less than %d days left)' % params[4]
- elif params[3] and params[3] * 86400 > sec_left:
- if status < 1:
- status = 1
- status_txt = ' (WARN: less than %d days left)' % params[3]
-
- # Fortmat the output
- (days, seconds) = divmod(sec_left, 86400)
- (hours, seconds) = divmod(seconds, 3600)
- (minutes, seconds) = divmod(seconds, 60)
- output += ' - %d days, %d hours, %d minutes, %d seconds left%s' % \
- (int(days), int(hours), int(minutes), int(seconds), status_txt)
-
- perfdata += [('sec_left', sec_left, params[3], params[4])]
-
- return (status, '%s - %s' % (nagios_state_names[status], output), perfdata)
-
-check_info['df.trend'] = (check_df_trend, "Disk Usage Trend %s", 1, inventory_df_trend)
Module: check_mk
Branch: master
Commit: 63beea91233ec154dfe6b9162d8624e5d49c66bf
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=63beea91233ec1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sat Jan 22 14:23:13 2011 +0100
Updated bug entries
---
.bugs/98 | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/.bugs/98 b/.bugs/98
new file mode 100644
index 0000000..71ab2a2
--- /dev/null
+++ b/.bugs/98
@@ -0,0 +1,16 @@
+Title: Restart of Nagios makes Multisite murk
+Component: multisite
+Benefit: 2
+State: open
+Cost: 2
+Date: 2011-01-22 14:20:58
+Class: bug
+
+When Nagios is restarted (e.g. via WATO), then for a short time the
+Livestatus socket is gone. This leads to error messages in various
+places - e.g. snapins and also AJAX functions which produce jQuery
+errors.
+
+We need to find a solution for a cleaner handling of this. Couldn't
+be a site in the state "restarting". If yes - how can we detect such
+a state. The livestatus socket is missing in such a case.
Module: check_mk
Branch: master
Commit: 04538f6e36d8a3bf45117a4d9090a7aecde3df23
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=04538f6e36d8a3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Jan 16 10:59:48 2011 +0100
Updated bug entries
---
.bugs/96 | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/.bugs/96 b/.bugs/96
new file mode 100644
index 0000000..06ee32d
--- /dev/null
+++ b/.bugs/96
@@ -0,0 +1,14 @@
+Title: PNP Popup does not work with HTTP-Login on different host
+Component: multisite
+Benefit: 2
+State: open
+Cost: 2
+Date: 2011-01-16 10:57:40
+Class: bug
+
+In a multi site setup where the remote hosts are not transparently
+reachable via HTTP proxy but are directly connected by the browser,
+the user has to enter his login again for each remote site. While
+this is not nice, it works nevertheless.
+
+But: the PNP popups do *not* work, even after one is logged in.