mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-24 09:57:09 +00:00
More housecleaning.
Collapse some categories; remove duplicates; move plugins in where they belong, remove files that are not really plugins at all.
This commit is contained in:
parent
4e3ef5b93e
commit
0a1524f27f
45 changed files with 0 additions and 1337 deletions
64
plugins/printer/hp2600_count_
Executable file
64
plugins/printer/hp2600_count_
Executable file
|
@ -0,0 +1,64 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
|
||||
myname=`basename $0 | sed 's/^hp2600_count_//g'`
|
||||
|
||||
name="${name-}"
|
||||
REGEX="${regex-\<$name\>}"
|
||||
|
||||
printer_ip=$name
|
||||
printer_ip='10.34.9.12'
|
||||
|
||||
get_data (){
|
||||
/usr/local/bin/wget -q -O - http://${printer_ip}/SSI/supply_status_info.htm | egrep -e '>[0-9]+'| awk -F '(<|>)' '{a=$5; sub("%"," ",a);sub("\r","",a); print a}'
|
||||
}
|
||||
|
||||
do_stats () {
|
||||
count=1
|
||||
for I in `get_data`; do
|
||||
[ $count = 3 ] && echo "countb.value $I"
|
||||
[ $count = 6 ] && echo "county.value $I"
|
||||
[ $count = 9 ] && echo "countc.value $I"
|
||||
[ $count = 12 ] && echo "countm.value $I"
|
||||
count=$(($count + 1))
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<'EOF'
|
||||
host_name printers
|
||||
graph_title HP 2600 pages by cartridge statistics
|
||||
graph_vlabel Count (Pages)
|
||||
graph_category HP2600 Printer
|
||||
graph_info Pages count by color.
|
||||
graph_args -l 0
|
||||
graph_scale no
|
||||
line.label ---
|
||||
line.line 0
|
||||
countb.label Black
|
||||
countb.draw AREA
|
||||
countb.colour 000000
|
||||
countb.min 0
|
||||
county.label Yellow
|
||||
county.min 0
|
||||
county.draw STACK
|
||||
county.colour ffff00
|
||||
countc.label Cyan
|
||||
countc.min 0
|
||||
countc.draw STACK
|
||||
countc.colour 00ffff
|
||||
countm.label Magenta
|
||||
countm.min 0
|
||||
countm.draw STACK
|
||||
countm.colour ff00ff
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
do_stats
|
||||
|
||||
|
||||
#EOF
|
82
plugins/printer/hp2600_status_
Executable file
82
plugins/printer/hp2600_status_
Executable file
|
@ -0,0 +1,82 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
|
||||
myname=`basename $0 | sed 's/^hp2600_status_//g'`
|
||||
|
||||
name="${name-}"
|
||||
REGEX="${regex-\<$name\>}"
|
||||
|
||||
printer_ip=$name
|
||||
printer_ip='10.34.9.12'
|
||||
|
||||
get_data (){
|
||||
/usr/local/bin/wget -q -O - http://${printer_ip}/SSI/supply_status_info.htm | egrep -e '>[0-9]+'| awk -F '(<|>)' '{a=$5; sub("%"," ",a);sub("\r","",a); print a}'
|
||||
}
|
||||
|
||||
do_stats () {
|
||||
count=1
|
||||
for I in `get_data`; do
|
||||
[ $count = 1 ] && echo "statb.value $I"
|
||||
[ $count = 4 ] && echo "staty.value $I"
|
||||
[ $count = 7 ] && echo "statc.value $I"
|
||||
[ $count = 10 ] && echo "statm.value $I"
|
||||
count=$(($count + 1))
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
case $1 in
|
||||
config)
|
||||
cat <<'EOF'
|
||||
host_name printers
|
||||
graph_title HP 2600 cartridge status
|
||||
graph_vlabel Status (%)
|
||||
graph_category HP2600 Printer
|
||||
graph_info Toner status.
|
||||
graph_args --upper-limit 400 -l 0
|
||||
line.label ---
|
||||
line.line 400
|
||||
statb.label Black
|
||||
statb.draw AREA
|
||||
statb.colour 000000
|
||||
statb.min 0
|
||||
statb.max 100
|
||||
lineb.label ---
|
||||
lineb.draw STACK
|
||||
lineb.colour ffffff
|
||||
lineb.skipprint 1
|
||||
lineb.cdef 100,statb,-
|
||||
staty.label Yellow
|
||||
staty.min 0
|
||||
staty.max 100
|
||||
staty.draw STACK
|
||||
staty.colour ffff00
|
||||
liney.label ---
|
||||
liney.draw STACK
|
||||
liney.colour ffffff
|
||||
liney.skipprint 1
|
||||
liney.cdef 100,staty,-
|
||||
statc.label Cyan
|
||||
statc.min 0
|
||||
statc.max 100
|
||||
statc.draw STACK
|
||||
statc.colour 00ffff
|
||||
linec.label ---
|
||||
linec.draw STACK
|
||||
linec.colour ffffff
|
||||
linec.skipprint 1
|
||||
linec.cdef 100,statc,-
|
||||
statm.label Magenta
|
||||
statm.min 0
|
||||
statm.max 100
|
||||
statm.draw STACK
|
||||
statm.colour ff00ff
|
||||
EOF
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
do_stats
|
||||
|
||||
|
||||
#EOF
|
|
@ -1,28 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# toshiba_5520c_print_ munin grabber script
|
||||
# 2009.01 by steve@kosada.com
|
||||
|
||||
destination=`basename $0 | sed 's/^toshiba_5520c_print_//g'`
|
||||
|
||||
if [ "$1" = "config" ]; then
|
||||
echo "graph_title Toshiba 5520C: Pages Printed"
|
||||
echo 'graph_vlabel Pages'
|
||||
echo 'graph_args --lower-limit 0'
|
||||
echo 'graph_category printer'
|
||||
|
||||
echo "printBlack.label Black"
|
||||
echo "printBlack.draw AREA"
|
||||
|
||||
echo "printFullColor.label Full Color"
|
||||
echo "printFullColor.draw STACK"
|
||||
|
||||
echo "printTwinColor.label Twin Color"
|
||||
echo "printTwinColor.draw STACK"
|
||||
else
|
||||
infopage=`wget -q -O - http://$destination:8080/TopAccess/Counter/TotalCount/List.htm | dos2unix | perl -p -e 's/\n/ /m'`
|
||||
|
||||
echo printFullColor.value `echo $infopage | perl -p -e 's/^.+\<B\>Print Counter\<\/B\>.+?\{Full\ Color[^}]+\,([0-9]+)\}.+$/$1/'`
|
||||
echo printTwinColor.value `echo $infopage | perl -p -e 's/^.+\<B\>Print Counter\<\/B\>.+?\{Twin\ Color[^}]+\,([0-9]+)\}.+$/$1/'`
|
||||
echo printBlack.value `echo $infopage | perl -p -e 's/^.+\<B\>Print Counter\<\/B\>.+?\{Black[^}]+\,([0-9]+)\}.+$/$1/'`
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue