Projet

Général

Profil

Révision 3c299b3d

ID3c299b3d593424d78f5527432bd4059543cdd3e0
Parent 0bf4041d
Enfant 06915eea

Ajouté par Steve Mokris il y a presque 14 ans

Initial version

Voir les différences:

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

  
6
destination=`basename $0 | sed 's/^oki_c5500_pages_//g'`
7
password='foo'
8

  
9
if [ "$1" = "config" ]; then
10
	echo "graph_title oki c5500 pages: $destination"
11
	echo 'graph_vlabel count'
12
	echo 'graph_args --lower-limit 0'
13
	echo 'graph_category printer'
14

  
15
	echo "tray1.label Tray 1"
16
	echo "tray2.label Tray 2"
17
	echo "total.label Total"
18
else
19
	infopage=`wget -q -O - http://root:$password@$destination/printer/printerinfo_top.htm | perl -p -e 's/\n/ /m'`
20

  
21
	echo tray1.value    `echo $infopage | perl -p -e 's/^.+Tray\ 1\ Page\ Count\:\ \<\/TD\>\<TD\ WIDTH\=\"94\"\>([0-9]+)\<.+$/$1/'`
22
	echo tray2.value    `echo $infopage | perl -p -e 's/^.+Tray\ 2\ Page\ Count\:\ \<\/TD\>\<TD\ WIDTH\=\"94\"\>([0-9]+)\<.+$/$1/'`
23
	echo total.value    `echo $infopage | perl -p -e 's/^.+Total\ Page\ Count\:\ \<\/TD\>\<TD\ WIDTH\=\"94\"\>([0-9]+)\<.+$/$1/'`
24
fi

Formats disponibles : Unified diff