mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Added colour,draw and (some)cdef support
This commit is contained in:
parent
fc964e5b01
commit
5df115fa71
1 changed files with 15 additions and 0 deletions
|
@ -92,6 +92,8 @@ EOH1
|
||||||
eval icritical='${critical_'${name}':-${critical}}'
|
eval icritical='${critical_'${name}':-${critical}}'
|
||||||
eval imax='${max_'${name}':-${max}}'
|
eval imax='${max_'${name}':-${max}}'
|
||||||
eval itype='${type_'${name}':-${type}}'
|
eval itype='${type_'${name}':-${type}}'
|
||||||
|
eval idraw='${draw_'${name}':-${draw}}'
|
||||||
|
eval icolour='${colour_'${name}':-${colour}}'
|
||||||
iquery=$(echo "${iquery}" | tr '\n\r' ' ')
|
iquery=$(echo "${iquery}" | tr '\n\r' ' ')
|
||||||
cat << EOH2
|
cat << EOH2
|
||||||
result${I}.label ${ilabel}
|
result${I}.label ${ilabel}
|
||||||
|
@ -100,11 +102,23 @@ result${I}.min 0
|
||||||
EOH2
|
EOH2
|
||||||
[ -n "${imax}" ] && echo "result${I}.max ${imax}"
|
[ -n "${imax}" ] && echo "result${I}.max ${imax}"
|
||||||
[ -n "${itype}" ] && echo "result${I}.type ${itype}"
|
[ -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 "${iwarning}" ] && echo "result${I}.warning ${iwarning}"
|
||||||
[ -n "${icritical}" ] && echo "result${I}.critical ${icritical}"
|
[ -n "${icritical}" ] && echo "result${I}.critical ${icritical}"
|
||||||
I=$((I+1))
|
I=$((I+1))
|
||||||
fi
|
fi
|
||||||
done
|
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
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -134,3 +148,4 @@ for name in ${names}; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue