From c3336cf7a5c75e54abefca382e7702e306d2a07e Mon Sep 17 00:00:00 2001 From: john30 Date: Sun, 22 Feb 2015 18:26:49 +0100 Subject: [PATCH] combine power and energy diff in one graph and fix graph period for kWh data type --- contrib/munin/plugins/ebusd_ | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/contrib/munin/plugins/ebusd_ b/contrib/munin/plugins/ebusd_ index 0c9e3831..4d067be2 100755 --- a/contrib/munin/plugins/ebusd_ +++ b/contrib/munin/plugins/ebusd_ @@ -11,7 +11,6 @@ if [ "$1" = "suggest" ]; then echo "temp" echo "press" echo "power" - echo "energy" exit 0 fi prefix=`basename "$0"` @@ -19,10 +18,8 @@ if [ "$prefix" = "ebusd_temp" ]; then sensors="outsidetemp BrineTempInput BrineTempOutput FlowTemp mcFlowTempSensor hwTankTemp RoomTemp rc4:RoomTemp" elif [ "$prefix" = "ebusd_press" ]; then sensors="BrinePress HeatSystemPress VaporPressHigh VaporPressLow" -elif [ "$prefix" = "ebusd_power" ]; then - sensors="ActualEnvironmentPower" else - sensors="YieldEnvironmentEnergy" + sensors="YieldEnvironmentEnergy ActualEnvironmentPower" fi if [ "$1" = "config" ]; then if [ "$prefix" = "ebusd_temp" ]; then @@ -31,18 +28,19 @@ if [ "$1" = "config" ]; then elif [ "$prefix" = "ebusd_press" ]; then echo "graph_title ebusd Drucksensoren" echo "graph_vlabel Bar" - elif [ "$prefix" = "ebusd_power" ]; then - echo "graph_title ebusd Leistung" - echo "graph_vlabel kW" else - echo "graph_title ebusd Ertrag" - echo "graph_vlabel kWh" + echo "graph_title ebusd Leistung/Ertrag" + echo "graph_vlabel kW" + echo "graph_period hour" fi echo 'graph_category Heizung' for sensor in $sensors; do - echo ${prefix}_${sensor/:/_}.label $sensor - if [ "$prefix" = "ebusd_energy" ]; then + if [ ! "${sensor/nergy/}" = "$sensor" ]; then + echo ${prefix}_${sensor/:/_}.label "$sensor [diff]" echo ${prefix}_${sensor/:/_}.type COUNTER + echo ${prefix}_${sensor/:/_}.draw AREA + else + echo ${prefix}_${sensor/:/_}.label $sensor fi print_warning ${prefix}_${sensor/:/_} print_critical ${prefix}_${sensor/:/_}