Commit e142825b authored by Daniel Stan's avatar Daniel Stan

munin/wifi_auth: graphing des auths TTLS/PEAP

parent bd7bd8eb
......@@ -42,6 +42,12 @@ if [ "$1" = "config" ]; then
echo 'success.label Succès'
echo 'success.draw AREASTACK'
echo 'success.colour 00FF00'
echo 'peap.label Authentifications PEAP'
echo 'ttls.label Authentifications TTLS'
echo 'peap.draw LINE1'
echo 'peap.colour 000000'
echo 'ttls.draw LINE2'
echo 'ttls.colour F6FF00'
exit 0
fi
......@@ -53,16 +59,23 @@ TEMP_FILE=$(mktempfile munin-radius-wifi.XXXXXX)
if [ -n "$TEMP_FILE" -a -f "$TEMP_FILE" ]
then
if [ $ARGS != 0 ]; then
$LOGTAIL -f ${FREERADIUS_LOG} -o ${STATEFILE} | grep 'freeradius\[.*\]:' > ${TEMP_FILE}
$LOGTAIL -f ${FREERADIUS_LOG} -o ${STATEFILE} > ${TEMP_FILE}
else
$LOGTAIL ${FREERADIUS_LOG} ${STATEFILE} | grep 'freeradius\[.*\]:' > ${TEMP_FILE}
$LOGTAIL ${FREERADIUS_LOG} ${STATEFILE} > ${TEMP_FILE}
fi
success=$(grep -c 'Login OK' ${TEMP_FILE})
failures=$(grep -c 'Login incorrect' ${TEMP_FILE})
peap=$(grep -c 'authenticated - EAP type: 25' ${TEMP_FILE})
ttls=$(grep -c 'authenticated - EAP type: 21' ${TEMP_FILE})
/bin/rm -f $TEMP_FILE
fi
echo "success.value ${success}"
echo "failures.value ${failures}"
# NB: chaque authentification réussie en TTLS ou PEAP produit deux "succès"
# (inner et outer-tunnels)
echo "peap.value ${peap}"
echo "ttls.value ${ttls}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment