mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
25 lines
623 B
Bash
Executable file
25 lines
623 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 network"
|
|
echo "graph_vlabel Stats Proftpd"
|
|
echo "succes.label Login success"
|
|
echo "succes.draw AREA"
|
|
echo "failed.label Login failed"
|
|
echo "failed.draw AREA"
|
|
fi
|
|
|
|
LOGFILE=${LOGFILE:-"/var/log/proftpd/proftpd.log"}
|
|
|
|
success=$(grep -c "successful" "$LOGFILE")
|
|
failed=$(grep -c "Login failed" "$LOGFILE" )
|
|
|
|
echo "succes.value $success"
|
|
echo "failed.value $failed"
|
|
|
|
exit 0
|