Projet

Général

Profil

Révision 79c64cbb

ID79c64cbb9a7bd6f74ec3881dad02b33a192fe667
Parent e06508b1
Enfant 13530d9e

Ajouté par Steve Mokris il y a presque 14 ans

Initial version

Voir les différences:

plugins/other/toshiba_5520c_byfunction_twincolor_
1
#!/bin/bash
2
#
3
# toshiba_5520c_print_ munin grabber script
4
# 2009.01 by steve@kosada.com
5

  
6
destination=`basename $0 | sed 's/^toshiba_5520c_print_//g'`
7

  
8
if [ "$1" = "config" ]; then
9
	echo "graph_title Toshiba 5520C: Pages Printed"
10
	echo 'graph_vlabel Pages'
11
	echo 'graph_args --lower-limit 0'
12
	echo 'graph_category printer'
13

  
14
	echo "printBlack.label Black"
15
	echo "printBlack.draw AREA"
16

  
17
	echo "printFullColor.label Full Color"
18
	echo "printFullColor.draw STACK"
19

  
20
	echo "printTwinColor.label Twin Color"
21
	echo "printTwinColor.draw STACK"
22
else
23
	infopage=`wget -q -O - http://$destination:8080/TopAccess/Counter/TotalCount/List.htm | dos2unix | perl -p -e 's/\n/ /m'`
24

  
25
	echo printFullColor.value			`echo $infopage | perl -p -e 's/^.+\<B\>Print Counter\<\/B\>.+?\{Full\ Color[^}]+\,([0-9]+)\}.+$/$1/'`
26
	echo printTwinColor.value			`echo $infopage | perl -p -e 's/^.+\<B\>Print Counter\<\/B\>.+?\{Twin\ Color[^}]+\,([0-9]+)\}.+$/$1/'`
27
	echo printBlack.value				`echo $infopage | perl -p -e 's/^.+\<B\>Print Counter\<\/B\>.+?\{Black[^}]+\,([0-9]+)\}.+$/$1/'`
28
fi

Formats disponibles : Unified diff