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:
parent
580904896c
commit
6a4a587b38
59
plugins/other/snmp_xerox3xxx
Executable file
59
plugins/other/snmp_xerox3xxx
Executable 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
|
Loading…
Reference in New Issue
Block a user