Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/234969

Change subject: Get rid of cargo-cult statistics in check_graphite
......................................................................

Get rid of cargo-cult statistics in check_graphite

Messages like '25.93% of data above the critical threshold [100000000.0]'
are goofy. The numbers are impressive precise, but when presented without
context, they don't actually do anything except bestow a false air of
mathematical precision.

Before:

  High load average on labstore1002 is CRITICAL:
    88.89% of data above the critical threshold [24.0]

After:

  High load average on labstore1002 is CRITICAL:
    88% above threshold.

Change-Id: I3ce33c610378eb1f80d9ebbf159584ad6e88045e
---
M modules/nagios_common/files/check_commands/check_graphite
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/234969/1

diff --git a/modules/nagios_common/files/check_commands/check_graphite 
b/modules/nagios_common/files/check_commands/check_graphite
index 9c344ee..cf2c524 100755
--- a/modules/nagios_common/files/check_commands/check_graphite
+++ b/modules/nagios_common/files/check_commands/check_graphite
@@ -280,10 +280,8 @@
             if lengths[key] >= t * self.perc / 100.0:
                 perc = lengths[key] * 100.0 / t
                 raise NagiosException(
-                    key, '%3.2f%% of data %s the %s threshold [%s]' %
-                    (perc, report, key.lower(), self.limits[key]))
-        return 'Less than %3.2f%% %s the threshold [%s]' % \
-            (self.perc, report, self.limits['WARNING'])
+                    key, '%d%% %s threshold' % (round(perc), report))
+        return 'Only %d%% %s threshold' % (round(self.perc), report)
 
 
 class SeriesThreshold(Threshold):

-- 
To view, visit https://gerrit.wikimedia.org/r/234969
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ce33c610378eb1f80d9ebbf159584ad6e88045e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to