PluginPortrait/ftp_transfers: ftp.2

File ftp.2, 782 bytes (added by jintxo, at 2006-05-12T19:12:34+02:00)

A Bit Better version of the ftp plugin (not much)

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 'ftp_put.label Files PUT'
31        echo 'ftp_get.label Files GET'
32        exit 0
33fi
34
35echo -en "ftp_put.value "
36echo $(grep "`date '+%b %d'`" /var/log/xferlog | grep [[:space:]]i[[:space:]] | wc -l)
37echo -n
38echo -en "ftp_get.value "
39echo $(grep "`date '+%b %d'`" /var/log/xferlog | grep [[:space:]]o[[:space:]] | wc -l)