1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +00:00

Improve incorrect or unspecific output for "autoconf"

Some plugins emit wrongly formatted "no" messages or lack the "yes"
message on success.
This commit is contained in:
Lars Kruse 2018-09-16 04:09:21 +02:00
parent e4cd049b01
commit 2ec4e4c1f7
20 changed files with 68 additions and 99 deletions

View file

@ -87,26 +87,16 @@ ATUN=`$SNMPGET $fnVPNSslStatsActiveTunnels | cut -d ":" -f4 | cut -d " " -f2`
autoconf()
{
if [ $SCPU ]; then
echo yes, OID $FGTcpu can be readed.
if [ -z "$SCPU" ]; then
echo "no (one or multiple OID can not be read)"
elif [ -z "$SMEM" ]; then
echo "no (one or multiple OID can not be read)"
elif [ -z "$SCNT" ]; then
echo "no (one or multiple OID can not be read)"
else
echo no, one or multiple OID can not be readed.
exit 1
echo "yes"
fi
if [ $SMEM ]; then
echo yes, OID $fnSysMemUsage can be readed.
else
echo no, one or multiple OID can not be readed.
exit 1
fi
if [ $SCNT ]; then
echo yes, OID $fnSysSesCount can be readed.
else
echo no, one or multiple OID can not be read.
exit 1
fi
exit 0
exit 0
}
config()