mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
2ec4e4c1f7
Some plugins emit wrongly formatted "no" messages or lack the "yes" message on success.
56 lines
1.5 KiB
Bash
Executable File
56 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Plugin to monitor the number of shared files with the aMule ed2k/KAD client.
|
|
#
|
|
# In order to use this plugin, you need to enable the "Online Signature" feature
|
|
# available in aMule's configuration options. You will also need to tell aMule to save
|
|
# the signature file in '/tmp' .
|
|
# For detailed instructions with screenshots, see http://linux.andreagozzi.com/content/munin_stuff.php
|
|
#
|
|
#
|
|
# Parameters understood:
|
|
#
|
|
# config (required)
|
|
# autoconf (optional - used by munin-config)
|
|
#
|
|
#
|
|
# $Log$
|
|
#
|
|
# Revision 1.0 2008/04/21
|
|
# aMule shares plugin contributed by Andrea Gozzi (asgozzi@gbhtech.com).
|
|
#
|
|
#
|
|
# Magic markers - optional - used by installation scripts and
|
|
# munin-config:
|
|
#
|
|
#%# family=auto
|
|
#%# capabilities=autoconf
|
|
|
|
if [ "$1" = "autoconf" ]; then
|
|
if [ -z "$(which amule)" ]; then
|
|
echo "no (amule not installed)"
|
|
else
|
|
if [ ! -e /tmp/amulesig.dat ]; then
|
|
echo "no (amulesig.dat not found)"
|
|
else
|
|
echo yes
|
|
fi
|
|
fi
|
|
exit 0
|
|
fi
|
|
|
|
if [ "$1" = "config" ]; then
|
|
|
|
echo "graph_title aMule shared files"
|
|
echo 'graph_info This graph shows the number of shared files on aMule .'
|
|
echo 'graph_info Plugin available at <a href="http://linux.andreagozzi.com/content/munin_stuff.php">http://linux.andreagozzi.com/content/munin_stuff.php</a>'
|
|
echo 'graph_args -l 0 --base 1000'
|
|
echo 'graph_vlabel no of shares'
|
|
echo 'graph_category filetransfer'
|
|
echo 'shares.label shared files'
|
|
echo 'shares.draw AREA'
|
|
exit 0
|
|
fi
|
|
|
|
cat /tmp/amulesig.dat | tr '\n' ';' | awk -F ";" "{ print \"shares.value \" \$10 }"
|