1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-08-06 14:15:05 +00:00

- have some dirs

This commit is contained in:
Steve Schnepp 2012-02-13 18:24:46 +01:00
parent 0b089ea777
commit 08346aac58
687 changed files with 0 additions and 0 deletions

59
plugins/printers/snmp_hplj2015 Executable file
View file

@ -0,0 +1,59 @@
#!/bin/bash
HOST=${host:-"127.0.0.1"}
: << =cut
=head1 NAME
snmp_HPLJ2015 - Consumables level on HP LaserJet 2015n reported over SNMP
=head1 CONFIGURATION
HOST
=head1 AUTHOR
Oleksiy Kochkin
=head1 LICENSE
As is.
=back
=head1 MAGIC MARKERS
#%# family=contrib
#%# capabilities=autoconf
=cut
case $1 in
config)
echo "graph_title Consumables level @ $HOST"
echo 'graph_args --upper-limit 100 -l 0'
echo 'graph_vlabel %'
echo 'graph_category printers'
echo 'graph_scale no'
echo 'black.label Black toner level'
echo 'black.draw LINE2'
echo 'black.type GAUGE'
echo 'black.colour 000000'
echo 'black.warning 5:'
echo 'black.critical 1:'
echo 'black.min 0'
echo 'black.max 100'
exit 0;;
esac
BLACK_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.1"
BLACK_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.1"
BLACK_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_MAX_OID`
BLACK_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_LVL_OID`
BLACK_LVL_PERCENTS=$(($BLACK_LVL*100/$BLACK_MAX))
echo -n "black.value "
echo $BLACK_LVL_PERCENTS

59
plugins/printers/snmp_hplj4xxx Executable file
View file

@ -0,0 +1,59 @@
#!/bin/bash
HOST=${host:-"127.0.0.1"}
: << =cut
=head1 NAME
snmp_HPLJ2015 - Consumables level on HP LaserJet 2015n reported over SNMP
=head1 CONFIGURATION
HOST
=head1 AUTHOR
Oleksiy Kochkin
=head1 LICENSE
As is.
=back
=head1 MAGIC MARKERS
#%# family=contrib
#%# capabilities=autoconf
=cut
case $1 in
config)
echo "graph_title Consumables level @ $HOST"
echo 'graph_args --upper-limit 100 -l 0'
echo 'graph_vlabel %'
echo 'graph_category printers'
echo 'graph_scale no'
echo 'black.label Black toner level'
echo 'black.draw LINE2'
echo 'black.type GAUGE'
echo 'black.colour 000000'
echo 'black.warning 5:'
echo 'black.critical 1:'
echo 'black.min 0'
echo 'black.max 100'
exit 0;;
esac
BLACK_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.1"
BLACK_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.1"
BLACK_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_MAX_OID`
BLACK_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_LVL_OID`
BLACK_LVL_PERCENTS=$(($BLACK_LVL*100/$BLACK_MAX))
echo -n "black.value "
echo $BLACK_LVL_PERCENTS

59
plugins/printers/snmp_xerox3xxx Executable file
View file

@ -0,0 +1,59 @@
#!/bin/bash
HOST=${host:-"127.0.0.1"}
: << =cut
=head1 NAME
Xerox-WC3220 - Plugin to monitor consumables level on Xerox WorkCentre 3xxx series
=head1 CONFIGURATION
HOST
=head1 AUTHOR
Oleksiy Kochkin
=head1 LICENSE
As is.
=back
=head1 MAGIC MARKERS
#%# family=contrib
#%# capabilities=autoconf
=cut
case $1 in
config)
echo "graph_title Consumables level @ $HOST"
echo 'graph_vlabel %'
echo 'graph_category printers'
echo 'graph_args --upper-limit 100 -l 0'
echo 'graph_scale no'
echo 'black.label Black toner level'
echo 'black.draw LINE2'
echo 'black.type GAUGE'
echo 'black.colour 000000'
echo 'black.warning 5:'
echo 'black.critical 1:'
echo 'black.min 0'
echo 'black.max 100'
exit 0;;
esac
BLACK_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.1"
BLACK_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.1"
BLACK_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_MAX_OID`
BLACK_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_LVL_OID`
BLACK_LVL_PERCENTS=$(($BLACK_LVL*100/$BLACK_MAX))
echo -n "black.value "
echo $BLACK_LVL_PERCENTS

View file

@ -0,0 +1,127 @@
#!/bin/bash
HOST=${host:-"127.0.0.1"}
: << =cut
=head1 NAME
Xerox-WC7x32-consumables - Plugin to monitor consumables level on Xerox WorkCentre 7x32 series printers
=head1 CONFIGURATION
host
=head1 AUTHOR
Oleksiy Kochkin
=head1 LICENSE
As is.
=back
=head1 MAGIC MARKERS
#%# family=contrib
#%# capabilities=autoconf
=cut
case $1 in
config)
echo "graph_title Consumables level @ $HOST"
echo 'graph_vlabel %'
echo 'graph_category printers'
echo 'graph_args --upper-limit 100 -l 0'
echo 'graph_scale no'
echo 'cyan.label Cyan toner level'
echo 'cyan.draw LINE2'
echo 'cyan.type GAUGE'
echo 'cyan.colour 1921B1'
echo 'cyan.warning 5:'
echo 'cyan.critical 1:'
echo 'cyan.min 0'
echo 'cyan.max 100'
echo 'magenta.label Magenta toner level'
echo 'magenta.draw LINE2'
echo 'magenta.type GAUGE'
echo 'magenta.colour C00086'
echo 'magenta.warning 5:'
echo 'magenta.critical 1:'
echo 'magenta.min 0'
echo 'magenta.max 100'
echo 'yellow.label Yellow toner level'
echo 'yellow.draw LINE2'
echo 'yellow.type GAUGE'
echo 'yellow.colour FECD00'
echo 'yellow.warning 5:'
echo 'yellow.critical 1:'
echo 'yellow.min 0'
echo 'yellow.max 100'
echo 'black.label Black toner level'
echo 'black.draw LINE2'
echo 'black.type GAUGE'
echo 'black.colour 000000'
echo 'black.warning 5:'
echo 'black.critical 1:'
echo 'black.min 0'
echo 'black.max 100'
echo 'drum.label Drum unit resource left'
echo 'drum.draw LINE2'
echo 'drum.type GAUGE'
echo 'drum.colour 00C12B'
echo 'drum.warning 5:'
echo 'drum.critical 1:'
echo 'drum.min 0'
echo 'drum.max 100'
exit 0;;
esac
BLACK_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.1"
BLACK_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.1"
YELLOW_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.2"
YELLOW_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.2"
MAGENTA_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.3"
MAGENTA_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.3"
CYAN_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.4"
CYAN_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.4"
DRUM_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.24"
DRUM_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.24"
BLACK_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_MAX_OID`
BLACK_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_LVL_OID`
BLACK_LVL_PERCENTS=$(($BLACK_LVL*100/$BLACK_MAX))
YELLOW_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $YELLOW_MAX_OID`
YELLOW_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $YELLOW_LVL_OID`
YELLOW_LVL_PERCENTS=$(($YELLOW_LVL*100/$YELLOW_MAX))
MAGENTA_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $MAGENTA_MAX_OID`
MAGENTA_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $MAGENTA_LVL_OID`
MAGENTA_LVL_PERCENTS=$(($MAGENTA_LVL*100/$MAGENTA_MAX))
CYAN_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $CYAN_MAX_OID`
CYAN_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $CYAN_LVL_OID`
CYAN_LVL_PERCENTS=$(($CYAN_LVL*100/$CYAN_MAX))
DRUM_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $DRUM_MAX_OID`
DRUM_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $DRUM_LVL_OID`
DRUM_LVL_PERCENTS=$(($DRUM_LVL*100/$DRUM_MAX))
echo -n "cyan.value "
echo $CYAN_LVL_PERCENTS
echo -n "magenta.value "
echo $MAGENTA_LVL_PERCENTS
echo -n "yellow.value "
echo $YELLOW_LVL_PERCENTS
echo -n "black.value "
echo $BLACK_LVL_PERCENTS
echo -n "drum.value "
echo $DRUM_LVL_PERCENTS

62
plugins/printers/xerox-wc3220 Executable file
View file

@ -0,0 +1,62 @@
#!/bin/sh
PRINTER_IP=${host:-"10.10.10.10"}
TMP_DIR=${tmp:-"/tmp"}
: << =cut
=head1 NAME
Xerox-WC3220 - Plugin to monitor consumables level and status on Xerox WorkCentre 3220
=head1 CONFIGURATION
PRINTER_IP
=head1 AUTHOR
Oleksiy Kochkin
=head1 LICENSE
As is.
=back
=head1 MAGIC MARKERS
#%# family=contrib
#%# capabilities=autoconf
=cut
case $1 in
config)
echo "graph_title Consumables level @ $PRINTER_IP"
echo 'graph_vlabel %'
echo 'graph_category printers'
echo 'graph_scale no'
echo 'black.label Black toner level'
echo 'black.draw LINE2'
echo 'black.type GAUGE'
echo 'black.colour 000000'
echo 'black.warning 5:'
echo 'black.critical 1:'
echo 'black.min 0'
echo 'black.max 100'
exit 0;;
esac
wget -q -o /dev/null -O $TMP_DIR/$PRINTER_IP-Supplies.html http://$PRINTER_IP/status/Supplies.html
TONER_STR=$(grep "<td width=5%>" "$TMP_DIR/$PRINTER_IP-Supplies.html")
#<td width=5%>99%</td>
echo -n "black.value "
echo $TONER_STR | egrep -o "5%>[0-9]{1,2}" | egrep -o "[0-9]{1,2}$"
rm $TMP_DIR/$PRINTER_IP-Supplies.html

View file

@ -0,0 +1,109 @@
#!/bin/sh
PRINTER_IP=${host:-"10.10.10.10"}
TMP_DIR=${tmp:-"/tmp"}
: << =cut
=head1 NAME
Xerox-WC7232-consumables - Plugin to monitor consumables level and status on Xerox WorkCentre 7232
=head1 CONFIGURATION
PRINTER_IP
=head1 AUTHOR
Oleksiy Kochkin
=head1 LICENSE
As is.
=back
=head1 MAGIC MARKERS
#%# family=contrib
#%# capabilities=autoconf
=cut
case $1 in
config)
echo "graph_title Consumables level @ $PRINTER_IP"
echo 'graph_vlabel %'
echo 'graph_category printers'
echo 'graph_scale no'
echo 'cyan.label Cyan toner level'
echo 'cyan.draw LINE2'
echo 'cyan.type GAUGE'
echo 'cyan.colour 1921B1'
echo 'cyan.warning 5:'
echo 'cyan.critical 1:'
echo 'cyan.min 0'
echo 'cyan.max 100'
echo 'magenta.label Magenta toner level'
echo 'magenta.draw LINE2'
echo 'magenta.type GAUGE'
echo 'magenta.colour C00086'
echo 'magenta.warning 5:'
echo 'magenta.critical 1:'
echo 'magenta.min 0'
echo 'magenta.max 100'
echo 'yellow.label Yellow toner level'
echo 'yellow.draw LINE2'
echo 'yellow.type GAUGE'
echo 'yellow.colour FECD00'
echo 'yellow.warning 5:'
echo 'yellow.critical 1:'
echo 'yellow.min 0'
echo 'yellow.max 100'
echo 'black.label Black toner level'
echo 'black.draw LINE2'
echo 'black.type GAUGE'
echo 'black.colour 000000'
echo 'black.warning 5:'
echo 'black.critical 1:'
echo 'black.min 0'
echo 'black.max 100'
echo 'drum.label Drum unit resource left'
echo 'drum.draw LINE2'
echo 'drum.type GAUGE'
echo 'drum.colour 00C12B'
echo 'drum.warning 5:'
echo 'drum.critical 1:'
echo 'drum.min 0'
echo 'drum.max 100'
exit 0;;
esac
wget -q -o /dev/null -O $TMP_DIR/$PRINTER_IP-stsply.htm http://$PRINTER_IP/stsply.htm
#toner and drum cartriges have both status and percentage
TONER_STR=$(grep Toner "$TMP_DIR/$PRINTER_IP-stsply.htm")
#info=info.concat([['Toner Cartridges',[['Cyan Toner [C]',0,77],['Magenta Toner [M]',7,1],['Yellow Toner [Y]',7,1],['Black Toner [K]',0,39]],3]]);
DRUM_STR=$(grep Drum "$TMP_DIR/$PRINTER_IP-stsply.htm")
#info=info.concat([['Drum Cartridges',[['Drum Cartridges',0,79]],1]]);
echo -n "cyan.value "
echo $TONER_STR | egrep -o "C]',[0-9],[0-9]{1,2}" | egrep -o "[0-9]{1,2}$"
echo -n "magenta.value "
echo $TONER_STR | egrep -o "M]',[0-9],[0-9]{1,2}" | egrep -o "[0-9]{1,2}$"
echo -n "yellow.value "
echo $TONER_STR | egrep -o "Y]',[0-9],[0-9]{1,2}" | egrep -o "[0-9]{1,2}$"
echo -n "black.value "
echo $TONER_STR | egrep -o "K]',[0-9],[0-9]{1,2}" | egrep -o "[0-9]{1,2}$"
echo -n "drum.value "
echo $DRUM_STR | egrep -o "s',[0-9],[0-9]{1,2}" | egrep -o "[0-9]{1,2}$"
rm $TMP_DIR/$PRINTER_IP-stsply.htm