2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Initial version

This commit is contained in:
Steve Mokris 2009-01-20 02:37:32 +01:00 committed by Steve Schnepp
parent 4e3ab0c60b
commit e06508b177

View File

@ -0,0 +1,28 @@
#!/bin/bash
#
# toshiba_5520c_byfunction_fullcolor_ munin grabber script
# 2009.01 by steve@kosada.com
destination=`basename $0 | sed 's/^toshiba_5520c_byfunction_fullcolor_//g'`
if [ "$1" = "config" ]; then
echo "graph_title Toshiba 5520C: Full Color Pages (by function)"
echo 'graph_vlabel Pages'
echo 'graph_args --lower-limit 0'
echo 'graph_category printer'
echo "fullColorPrintComputer.label Print from Computer"
echo "fullColorPrintComputer.draw AREA"
echo "fullColorScanNetwork.label Scan to Network"
echo "fullColorScanNetwork.draw STACK"
echo "fullColorPrintCopy.label Print: Copy"
echo "fullColorPrintCopy.draw STACK"
else
infopage=`wget -q -O - http://$destination:8080/TopAccess/Counter/TotalCount/List.htm | dos2unix | perl -p -e 's/\n/ /m'`
echo fullColorPrintCopy.value `echo $infopage | perl -p -e 's/^.+\<B\>Print Counter\<\/B\>.+?\{Full\ Color\,([0-9]+).+$/$1/'`
echo fullColorPrintComputer.value `echo $infopage | perl -p -e 's/^.+\<B\>Print Counter\<\/B\>.+?\{Full\ Color(\,[0-9\-]+){2}\,([0-9]+).+$/$2/'`
echo fullColorScanNetwork.value `echo $infopage | perl -p -e 's/^.+\<B\>Scan Counter\<\/B\>.+?\{Full\ Color\,[0-9]+\,([0-9]+).+$/$1/'`
fi