Module: check_mk
Branch: master
Commit: 4af65d8af3679d8a61ed1346f137c0b063242055
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4af65d8af3679d…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 27 16:25:13 2016 +0200
3615 if: Convert bandwidth from octets into bits for graph display
This makes it easier to create custom graphs based on bits/sec. If you have any
existing custom graphs that make use of <i>Input octets</i> or <i>Output
octets</i>
then you need to replace those metrics with <i>Input bandwidth</i> or
<i>Output bandwidth</i>.
---
.werks/3615 | 11 +++++++++++
ChangeLog | 2 ++
web/plugins/metrics/check_mk.py | 28 ++++++++++++++++++++++++++--
3 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/.werks/3615 b/.werks/3615
new file mode 100644
index 0000000..0c0dea1
--- /dev/null
+++ b/.werks/3615
@@ -0,0 +1,11 @@
+Title: if: Convert bandwidth from octets into bits for graph display
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.9i1
+Date: 1464359025
+Class: feature
+
+This makes it easier to create custom graphs based on bits/sec. If you have any
+existing custom graphs that make use of <i>Input octets</i> or
<i>Output octets</i>
+then you need to replace those metrics with <i>Input bandwidth</i> or
<i>Output bandwidth</i>.
diff --git a/ChangeLog b/ChangeLog
index 050852d..2d938a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -88,6 +88,8 @@
* 3610 mk_oracle: linux plugin now available for solaris
* 3611 websphere_mq_queues: now age of messages not processed is configurable...
* 3612 nfsmounts: new rule for en/disabling performance data
+ * 3615 if: Convert bandwidth from octets into bits for graph display...
+ NOTE: Please refer to the migration notes!
* 3073 FIX: windows agent: relative paths to mrpe scripts are now treated as relative
to the agent installation directory...
* 3061 FIX: mk_jolokia: Fixed debugging of the agent plugin
* 3074 FIX: windows agent: fixed incorrect values for 32-bit performance counters
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 8019946..cd9f19a 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -1670,6 +1670,12 @@ metric_info["if_in_octets"] = {
"color" : "#00e060",
}
+metric_info["if_in_bps"] = {
+ "title" : _("Input bandwidth"),
+ "unit" : "bits/s",
+ "color" : "#00e060",
+}
+
metric_info["if_in_pkts"] = {
"title" : _("Input Packets"),
"unit" : "1/s",
@@ -1682,6 +1688,13 @@ metric_info["if_out_pkts"] = {
"color" : "#0080e0",
}
+metric_info["if_out_bps"] = {
+ "title" : _("Output bandwidth"),
+ "unit" : "bits/s",
+ "color" : "#0080e0",
+}
+
+
metric_info["if_out_octets"] = {
"title" : _("Output Octets"),
"unit" : "bytes/s",
@@ -3690,8 +3703,8 @@ check_metrics["check_mk-arbor_pravail.disk_usage"] =
disk_utilization_trans
# in=0;;;0; inucast=0;;;; innucast=0;;;; indisc=0;;;; inerr=0;0.01;0.1;; out=0;;;0;
outucast=0;;;; outnucast=0;;;; outdisc=0;;;; outerr=0;0.01;0.1;; outqlen=0;;;0;
if_translation = {
- "in" : { "name": "if_in_octets" },
- "out" : { "name": "if_out_octets" },
+ "in" : { "name": "if_in_bps", "scale":
8 },
+ "out" : { "name": "if_out_bps",
"scale": 8 },
"indisc" : { "name": "if_in_discards" },
"inerr" : { "name": "if_in_errors" },
"outdisc" : { "name": "if_out_discards" },
@@ -4707,6 +4720,7 @@ perfometer_info.append(("dual", [
}
]))
+
perfometer_info.append(("dual", [
{
"type" : "logarithmic",
@@ -5914,6 +5928,16 @@ graph_info.append({
],
})
+# Same but for checks that have been translated in to bits/s
+graph_info.append({
+ "title" : _("Bandwidth"),
+ "metrics" : [
+ ( "if_in_bps", "area", ),
+ ( "if_out_bps", "-area", ),
+ ],
+})
+
+
graph_info.append({
"title" : _("Packets"),
"metrics" : [