2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Added colour,draw and (some)cdef support

This commit is contained in:
Oded Ben Ozer 2010-07-14 10:00:40 +02:00 committed by Steve Schnepp
parent fc964e5b01
commit 5df115fa71

View File

@ -92,6 +92,8 @@ EOH1
eval icritical='${critical_'${name}':-${critical}}'
eval imax='${max_'${name}':-${max}}'
eval itype='${type_'${name}':-${type}}'
eval idraw='${draw_'${name}':-${draw}}'
eval icolour='${colour_'${name}':-${colour}}'
iquery=$(echo "${iquery}" | tr '\n\r' ' ')
cat << EOH2
result${I}.label ${ilabel}
@ -100,11 +102,23 @@ result${I}.min 0
EOH2
[ -n "${imax}" ] && echo "result${I}.max ${imax}"
[ -n "${itype}" ] && echo "result${I}.type ${itype}"
[ -n "${idraw}" ] && echo "result${I}.draw ${idraw}"
[ -n "${icolour}" ] && echo "result${I}.colour ${icolour}"
[ -n "${iwarning}" ] && echo "result${I}.warning ${iwarning}"
[ -n "${icritical}" ] && echo "result${I}.critical ${icritical}"
I=$((I+1))
fi
done
for cdefname in ${cdefnames} ;do
eval icdef='${cdef_'${cdefname}'}'
if [ -n "${icdef}" ]; then
eval icdeflbl='${cdeflbl_'${cdefname}':-${cdeflbl}}'
cat << EOH4
${cdefname}.cdef ${icdef}
${cdefname}.label ${icdeflbl}
EOH4
fi
done
exit 0
fi
@ -134,3 +148,4 @@ for name in ${names}; do
fi
done