aboutsummaryrefslogtreecommitdiffstats
path: root/doc/stats_dabmux_munin.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-07 15:28:21 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-03-07 15:28:21 +0100
commitc85c9cc40d05c89b3fa6de997590ab488c13cb2e (patch)
tree58064e74c67320727ca794c11e004d14d1a0e647 /doc/stats_dabmux_munin.py
parentf7addcf7d00621f0973f2c6a997893ff3d7f6c3e (diff)
downloaddabmux-c85c9cc40d05c89b3fa6de997590ab488c13cb2e.tar.gz
dabmux-c85c9cc40d05c89b3fa6de997590ab488c13cb2e.tar.bz2
dabmux-c85c9cc40d05c89b3fa6de997590ab488c13cb2e.zip
Introduce slow peak statistic, averaging over 5 minutes
Diffstat (limited to 'doc/stats_dabmux_munin.py')
-rwxr-xr-xdoc/stats_dabmux_munin.py25
1 files changed, 21 insertions, 4 deletions
diff --git a/doc/stats_dabmux_munin.py b/doc/stats_dabmux_munin.py
index 7a134ef..6a52011 100755
--- a/doc/stats_dabmux_munin.py
+++ b/doc/stats_dabmux_munin.py
@@ -69,24 +69,36 @@ overruns.type COUNTER
multigraph audio_levels_{ident}
graph_title Contribution {ident} audio level (peak)
-graph_order left right
+graph_order left left_slow right right_slow
graph_args --base 1000
graph_vlabel peak audio level during last ${{graph_period}}
graph_category encoders
-graph_info This graph shows the audio level of both channels of the {ident} ZMQ input
+graph_info This graph shows the audio level and peak of both channels of the {ident} ZMQ input
left.info Left channel audio level
-left.label Left channel audio level
+left.label Left level
left.min -90
left.max 0
left.warning -40:0
left.critical -80:0
+left_slow.info Left channel audio peak over last 5 minutes
+left_slow.label Left peak
+left_slow.min -90
+left_slow.max 0
+left_slow.warning -40:0
+left_slow.critical -80:0
right.info Right channel audio level
-right.label Right channel audio level
+right.label Right level
right.min -90
right.max 0
right.warning -40:0
right.critical -80:0
+right_slow.info Right channel audio peak over last 5 minutes
+right_slow.label Right peak
+right_slow.min -90
+right_slow.max 0
+right_slow.warning -40:0
+right_slow.critical -80:0
multigraph state_{ident}
graph_title State of contribution {ident}
@@ -235,6 +247,11 @@ if len(sys.argv) == 1:
munin_values += "left.value {}\n".format(v['peak_left'])
munin_values += "right.value {}\n".format(v['peak_right'])
+ if 'peak_left_slow' in v:
+ # If ODR-DabMux is v2.0.0-3 or older, it doesn't export the slow peaks
+ munin_values += "left_slow.value {}\n".format(v['peak_left_slow'])
+ munin_values += "right_slow.value {}\n".format(v['peak_right_slow'])
+
if 'state' in v:
# If ODR-DabMux is v1.3.1-3 or older, it doesn't export state
re_state = re.compile(r"\w+ \((\d+)\)")