Module: check_mk
Branch: master
Commit: bbb9332b18500360429c959062ccd6387c24f941
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bbb9332b185003…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Sep 12 11:33:42 2018 +0200
6497 FIX ceph_status, ceph_status.osds, ceph_status.mgrs: Used wrong value epoch rate
instead of epoch average
Change-Id: I640036bd976fbc3ae429ac53eca23f2f12e7baf7
---
.werks/6497 | 10 ++++++++++
checks/ceph_status | 6 +++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.werks/6497 b/.werks/6497
new file mode 100644
index 0000000..6e3fe86
--- /dev/null
+++ b/.werks/6497
@@ -0,0 +1,10 @@
+Title: ceph_status, ceph_status.osds, ceph_status.mgrs: Used wrong value epoch rate
instead of epoch average
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1536744730
+Class: fix
+
+
diff --git a/checks/ceph_status b/checks/ceph_status
index 85caa18..b7cb83f 100644
--- a/checks/ceph_status
+++ b/checks/ceph_status
@@ -39,12 +39,12 @@ def ceph_check_epoch(_id, epoch, params):
epoch_rate = get_rate("%s.epoch.rate" % _id, time.time(), epoch,
avg_interval_min)
epoch_avg = get_average("%s.epoch.avg" % _id, time.time(), epoch_rate,
avg_interval_min)
state = 0
- infotext = 'Epoch: %s/%s' % (epoch_rate,
get_age_human_readable(avg_interval_min*60))
+ infotext = 'Epoch: %s/%s' % (epoch_avg,
get_age_human_readable(avg_interval_min*60))
if warn is not None and crit is not None:
- if epoch_rate >= crit:
+ if epoch_avg >= crit:
state = 2
- elif epoch_rate >= warn:
+ elif epoch_avg >= warn:
state = 1
if state > 0:
infotext += " (warn/crit at %.1f/%.1f)" % (warn, crit)