PluginPortrait/ftp_transfers: proftpd

File proftpd, 873 bytes (added by anonymous, at 2006-08-08T17:35:24+02:00)

changed a little bit... thx 4 your script, works great

Line 
1#!/bin/sh
2#
3#
4# Script to show pureftp.
5#
6# Parameters understood:
7#
8#       config   (required)
9#       autoconf (optional - used by munin-config)
10#
11#
12# Magic markers (optional - used by munin-config and installation
13# scripts):
14#
15#%# family=auto
16#%# capabilities=autoconf
17
18MAXLABEL=20
19
20if [ "$1" = "autoconf" ]; then
21        echo yes
22        exit 0
23fi
24
25if [ "$1" = "config" ]; then
26
27        echo 'graph_title FTP Server'
28        echo 'graph_args --base 1000 -l 0'
29        echo 'graph_vlabel Daily FTP Operations'
30        echo 'graph_category FTP'
31        echo 'ftp_put.label Files PUT'
32        echo 'ftp_get.label Files GET'
33        exit 0
34fi
35
36echo -en "ftp_put.value "
37echo $(grep "`date '+%b %e'`" /var/log/xferlog | grep [[:space:]]i[[:space:]] | wc -l)
38echo -n
39echo -en "ftp_get.value "
40echo $(grep "`date '+%b %e'`" /var/log/xferlog | grep [[:space:]]o[[:space:]] | wc -l)