From 8ec655372a2d2e6b5d85caaf6e69f4b07a0e4438 Mon Sep 17 00:00:00 2001 From: Steve Mokris Date: Tue, 13 Jan 2009 01:54:52 +0100 Subject: [PATCH] Initial version --- plugins/other/dell_5310n_health_ | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 plugins/other/dell_5310n_health_ diff --git a/plugins/other/dell_5310n_health_ b/plugins/other/dell_5310n_health_ new file mode 100755 index 00000000..5d401734 --- /dev/null +++ b/plugins/other/dell_5310n_health_ @@ -0,0 +1,22 @@ +#!/bin/bash +# +# dell_5310n_health_ munin grabber script +# 2008.07 by steve@kosada.com + +destination=`basename $0 | sed 's/^dell_5310n_health_//g'` + +tmpWeb=/tmp/`basename $0` +wget -q -O $tmpWeb http://$destination/cgi-bin/dynamic/PrinterStatus.html + +if [ "$1" = "config" ]; then + echo "graph_title dell 5310n health: $destination" + echo 'graph_vlabel count' + echo 'graph_args --lower-limit 0' + echo 'graph_category printer' + + echo "toner.label Toner (percent)" +else + echo toner.value `grep '>Black\ Toner' $tmpWeb | perl -p -e 's/^.+>Black\ Toner[^0-9]+([0-9]+)\%<.+$/$1/'` +fi + +rm $tmpWeb