#!/bin/bash #%# family=auto #%# capabilities=autoconf #%# capabilities=suggest . $MUNIN_LIBDIR/plugins/plugin.sh if [ "$1" = "autoconf" ]; then echo "yes" exit 0 fi if [ "$1" = "suggest" ]; then echo "temp" echo "press" echo "power" exit 0 fi prefix=`basename "$0"` if [ "$prefix" = "ebusd_temp" ]; then sensors="outsidetemp BrineTempInput BrineTempOutput FlowTemp mcFlowTempSensor hwTankTemp" elif [ "$prefix" = "ebusd_press" ]; then sensors="BrinePress HeatSystemPress VaporPressHigh VaporPressLow" else sensors="ActualEnvironmentPower" fi if [ "$1" = "config" ]; then if [ "$prefix" = "ebusd_temp" ]; then echo "graph_title ebusd Temperaturen" echo "graph_vlabel Grad" elif [ "$prefix" = "ebusd_press" ]; then echo "graph_title ebusd Drucksensoren" echo "graph_vlabel Bar" else echo "graph_title ebusd Ertrag" echo "graph_vlabel kW" fi echo 'graph_category Heizung' for sensor in $sensors; do echo ${prefix}_${sensor}.label $sensor print_warning ${prefix}_$sensor print_critical ${prefix}_$sensor done exit 0 fi for sensor in $sensors; do RESULT=`echo "r $sensor"|nc localhost 8888 2>/dev/null|head -n 1|sed -e 's#;.*$##'` echo ${prefix}_${sensor}.value $RESULT done