mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-25 18:38:30 +00:00
Initial version
This commit is contained in:
parent
76a8fde61d
commit
03c422864f
1 changed files with 57 additions and 0 deletions
57
plugins/other/amule_uptime
Executable file
57
plugins/other/amule_uptime
Executable file
|
@ -0,0 +1,57 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Plugin to monitor the current aMule ed2k/KAD client uptime.
|
||||||
|
#
|
||||||
|
# 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 uptime 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 "$0: error: amule not installed"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
if [ ! -e /tmp/amulesig.dat ]; then
|
||||||
|
echo "$0: error: amulesig.dat not found"
|
||||||
|
else
|
||||||
|
echo yes
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "config" ]; then
|
||||||
|
|
||||||
|
echo "graph_title aMule uptime"
|
||||||
|
echo 'graph_info This graph shows aMule uptime.'
|
||||||
|
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 uptime in hours'
|
||||||
|
echo 'graph_category amule'
|
||||||
|
echo 'uptime.label uptime'
|
||||||
|
echo 'uptime.draw AREA'
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat /tmp/amulesig.dat | tr '\n' ';' | awk -F ";" "{ print \"uptime.value \" \$17/3600 }"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue