mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-23 06:35:42 +00:00
Works better in debian
This commit is contained in:
parent
4f1ea21980
commit
31ee54bb73
1 changed files with 43 additions and 32 deletions
|
@ -9,6 +9,15 @@
|
|||
# commands needed: logtail - grep
|
||||
#
|
||||
#
|
||||
# Configuration:
|
||||
# Maybe need to add folowing lines to plugins config file
|
||||
# (e.g. /etc/munin/plugin-conf.d/pure-ftpd) to run pure-ftpwho
|
||||
# as user with apropirate privilegs then restart munin-node.
|
||||
#
|
||||
# [pure-ftpd-bw]
|
||||
# user root
|
||||
#
|
||||
#
|
||||
# Parameters
|
||||
#
|
||||
# config (required)
|
||||
|
@ -53,7 +62,7 @@ fi
|
|||
|
||||
TMP1=`mktemp`
|
||||
if [ -f $TMP1 ]; then
|
||||
$LOGTAIL -o $OFFSET_FILE $LOGFILE | grep 'GET \|PUT ' > $TMP1
|
||||
$LOGTAIL -o $OFFSET_FILE -f $LOGFILE | grep 'GET \|PUT ' > $TMP1
|
||||
dls=$(awk '/GET / {print $9}' $TMP1)
|
||||
dl=0
|
||||
for d in $dls; do dl=$(expr $dl + $d); done
|
||||
|
@ -67,3 +76,5 @@ else
|
|||
echo "cant write temp file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue