2
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/ftp/proftpd
Steve Schnepp d40562033b proftpd: converting to /bin/sh
Some cleanup
2014-08-04 17:25:28 +02:00

25 lines
586 B
Bash
Executable file

#! /bin/sh
# configuration :
#
# env.LOGFILE /var/log/proftpd/proftpd.log
if [ "$1" = 'config' ]; then
echo "graph_args --base 1000 -l 0"
echo "graph_title Serveur FTP"
echo "graph_category Ftp"
echo "graph_vlabel Stats Proftpd"
echo "succes.label Login succes"
echo "succes.draw AREA"
echo "failed.label Login failed"
echo "failed.draw AREA"
fi
LOGFILE=${LOGFILE:-"/var/log/proftpd/proftpd.log"}
succes=$(grep -c "successful" "$LOGFILE" )
failed=$(grep -c "Login failed" "$LOGFILE" )
echo "succes.value $succes"
echo "failed.value $failed"
exit 0