summaryrefslogtreecommitdiffstats
path: root/doc/stats_dabmod_munin.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-11-18 17:45:13 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-11-18 17:45:13 +0100
commitde1115dcc4d3226806a6a1c813a98d030a33261b (patch)
treec8158eb5df4601f1b22e0e3ff8d99afb844f9bdb /doc/stats_dabmod_munin.py
parent7b0bd2675b7514e2292684bfe2bd647f87330727 (diff)
downloaddabmod-de1115dcc4d3226806a6a1c813a98d030a33261b.tar.gz
dabmod-de1115dcc4d3226806a6a1c813a98d030a33261b.tar.bz2
dabmod-de1115dcc4d3226806a6a1c813a98d030a33261b.zip
Add temperature to munin
Diffstat (limited to 'doc/stats_dabmod_munin.py')
-rwxr-xr-xdoc/stats_dabmod_munin.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/stats_dabmod_munin.py b/doc/stats_dabmod_munin.py
index 2f88d5d..2c79c48 100755
--- a/doc/stats_dabmod_munin.py
+++ b/doc/stats_dabmod_munin.py
@@ -144,6 +144,8 @@ frames.min 0"""
# One GAUGE multigraph
# sdr gpsdo_num_sv
+# and one for device sensors
+# sdr temp
config_all += """
multigraph sdr_gpsdo_sv_holdover
graph_title Number of GNSS SVs used and holdover state
@@ -160,7 +162,19 @@ num_sv.max 20
holdover.info Holdover
holdover.label Holdover
holdover.min 0
-holdover.max 1"""
+holdover.max 1
+
+multigraph sdr_sensors
+graph_title SDR Sensors
+graph_order temp
+graph_vlabel SDR Sensors
+graph_category dabmod
+graph_info This graph shows the device temperature in Celsius
+
+temp.info Device temperature in Celsius
+temp.label Celsius
+temp.min 0
+temp.max 100"""
ctx = zmq.Context()
@@ -316,6 +330,13 @@ if len(sys.argv) == 1:
except:
munin_values += "holdover.value U\n"
+ munin_values += "multigraph sdr_sensors\n"
+ try:
+ sdr_temp = get_rc_value("sdr", "temp", sock)
+ munin_values += "temp.value {}\n".format(sdr_temp)
+ except:
+ munin_values += "temp.value U\n"
+
munin_values += "multigraph sdr_frames\n"
sdr_frames = get_rc_value("sdr", "frames", sock)
munin_values += handle_re("frames", re_int_value, sdr_frames)