Projet

Général

Profil

Révision 8238b488

ID8238b488054c7d7ee8df86e8985723d972e29107
Parent 37e94f52
Enfant ea7bacc9

Ajouté par Diego Elio Pettenò il y a plus de 13 ans

Remove snmp plugins for printer supplies.

At least Munin 2.0 already provides snmp__printer_supplies that takes
care of the same data (they all use Printer-MIB values). Also that
plugin uses Munin's own SNMP abstraction instead of using net-snmp
commands directly, which makes it more suitable for the job.

Voir les différences:

plugins/snmp/snmp_hplj_
1
#!/bin/bash
2

  
3
HOST=${host:-"127.0.0.1"}
4

  
5
: << =cut
6

  
7
=head1 NAME
8

  
9
snmp_HPLJ2015 - Consumables level on HP LaserJet 2015n reported over SNMP
10

  
11
=head1 CONFIGURATION
12

  
13
HOST
14

  
15
=head1 AUTHOR
16

  
17
Oleksiy Kochkin
18

  
19
=head1 LICENSE
20

  
21
As is.
22

  
23
=back
24

  
25
=head1 MAGIC MARKERS
26

  
27
 #%# family=contrib
28
 #%# capabilities=autoconf
29

  
30
=cut
31

  
32
case $1 in
33
config)
34

  
35
echo "graph_title Consumables level @ $HOST"
36
echo 'graph_args --upper-limit 100 -l 0'
37
echo 'graph_vlabel %'
38
echo 'graph_category printers'
39
echo 'graph_scale no'
40
echo 'black.label Black toner level'
41
echo 'black.draw LINE2'
42
echo 'black.type GAUGE'
43
echo 'black.colour 000000'
44
echo 'black.warning 5:'
45
echo 'black.critical 1:'
46
echo 'black.min 0'
47
echo 'black.max 100'
48
exit 0;;
49
esac
50

  
51
BLACK_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.1"
52
BLACK_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.1"
53

  
54
BLACK_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_MAX_OID`
55
BLACK_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_LVL_OID`
56
BLACK_LVL_PERCENTS=$(($BLACK_LVL*100/$BLACK_MAX))
57

  
58
echo -n "black.value "
59
echo $BLACK_LVL_PERCENTS
plugins/snmp/snmp_xerox3xxx
1
#!/bin/bash
2

  
3
HOST=${host:-"127.0.0.1"}
4

  
5
: << =cut
6

  
7
=head1 NAME
8

  
9
Xerox-WC3220 - Plugin to monitor consumables level on Xerox WorkCentre 3xxx series
10

  
11
=head1 CONFIGURATION
12

  
13
HOST
14

  
15
=head1 AUTHOR
16

  
17
Oleksiy Kochkin
18

  
19
=head1 LICENSE
20

  
21
As is.
22

  
23
=back
24

  
25
=head1 MAGIC MARKERS
26

  
27
#%# family=contrib
28
#%# capabilities=autoconf
29
  
30
=cut
31
  
32
case $1 in
33
config)
34
 
35
echo "graph_title Consumables level @ $HOST"
36
echo 'graph_vlabel %'
37
echo 'graph_category printers'
38
echo 'graph_args --upper-limit 100 -l 0'
39
echo 'graph_scale no'
40
echo 'black.label Black toner level'
41
echo 'black.draw LINE2'
42
echo 'black.type GAUGE'
43
echo 'black.colour 000000'
44
echo 'black.warning 5:'
45
echo 'black.critical 1:'
46
echo 'black.min 0'
47
echo 'black.max 100'
48
exit 0;;
49
esac
50
  
51
BLACK_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.1"
52
BLACK_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.1"
53

  
54
BLACK_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_MAX_OID`
55
BLACK_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_LVL_OID`
56
BLACK_LVL_PERCENTS=$(($BLACK_LVL*100/$BLACK_MAX))
57

  
58
echo -n "black.value "
59
echo $BLACK_LVL_PERCENTS
plugins/snmp/snmp_xerox_wc-7x32
1
#!/bin/bash
2

  
3
HOST=${host:-"127.0.0.1"}
4

  
5
: << =cut
6

  
7
=head1 NAME
8

  
9
Xerox-WC7x32-consumables - Plugin to monitor consumables level on Xerox WorkCentre 7x32 series printers
10

  
11
=head1 CONFIGURATION
12

  
13
host
14

  
15
=head1 AUTHOR
16

  
17
Oleksiy Kochkin
18

  
19
=head1 LICENSE
20

  
21
As is.
22

  
23
=back
24

  
25
=head1 MAGIC MARKERS
26

  
27
 #%# family=contrib
28
 #%# capabilities=autoconf
29
  
30
=cut
31

  
32
case $1 in
33
config)
34

  
35
echo "graph_title Consumables level @ $HOST"
36
echo 'graph_vlabel %'
37
echo 'graph_category printers'
38
echo 'graph_args --upper-limit 100 -l 0'
39
echo 'graph_scale no'
40
echo 'cyan.label Cyan toner level'
41
echo 'cyan.draw LINE2'
42
echo 'cyan.type GAUGE'
43
echo 'cyan.colour 1921B1'
44
echo 'cyan.warning 5:'
45
echo 'cyan.critical 1:'
46
echo 'cyan.min 0'
47
echo 'cyan.max 100'
48
echo 'magenta.label Magenta toner level'
49
echo 'magenta.draw LINE2'
50
echo 'magenta.type GAUGE'
51
echo 'magenta.colour C00086'
52
echo 'magenta.warning 5:'
53
echo 'magenta.critical 1:'
54
echo 'magenta.min 0'
55
echo 'magenta.max 100'
56
echo 'yellow.label Yellow toner level'
57
echo 'yellow.draw LINE2'
58
echo 'yellow.type GAUGE'
59
echo 'yellow.colour FECD00'
60
echo 'yellow.warning 5:'
61
echo 'yellow.critical 1:'
62
echo 'yellow.min 0'
63
echo 'yellow.max 100'
64
echo 'black.label Black toner level'
65
echo 'black.draw LINE2'
66
echo 'black.type GAUGE'
67
echo 'black.colour 000000'
68
echo 'black.warning 5:'
69
echo 'black.critical 1:'
70
echo 'black.min 0'
71
echo 'black.max 100'
72
echo 'drum.label Drum unit resource left'
73
echo 'drum.draw LINE2'
74
echo 'drum.type GAUGE'
75
echo 'drum.colour 00C12B'
76
echo 'drum.warning 5:'
77
echo 'drum.critical 1:'
78
echo 'drum.min 0'
79
echo 'drum.max 100'
80
exit 0;;
81
esac
82

  
83
BLACK_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.1"
84
BLACK_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.1"
85
YELLOW_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.2"
86
YELLOW_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.2"
87
MAGENTA_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.3"
88
MAGENTA_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.3"
89
CYAN_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.4"
90
CYAN_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.4"
91
DRUM_MAX_OID=".1.3.6.1.2.1.43.11.1.1.8.1.24"
92
DRUM_LVL_OID=".1.3.6.1.2.1.43.11.1.1.9.1.24"
93

  
94
BLACK_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_MAX_OID`
95
BLACK_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $BLACK_LVL_OID`
96
BLACK_LVL_PERCENTS=$(($BLACK_LVL*100/$BLACK_MAX))
97

  
98
YELLOW_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $YELLOW_MAX_OID`
99
YELLOW_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $YELLOW_LVL_OID`
100
YELLOW_LVL_PERCENTS=$(($YELLOW_LVL*100/$YELLOW_MAX))
101

  
102
MAGENTA_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $MAGENTA_MAX_OID`
103
MAGENTA_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $MAGENTA_LVL_OID`
104
MAGENTA_LVL_PERCENTS=$(($MAGENTA_LVL*100/$MAGENTA_MAX))
105

  
106
CYAN_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $CYAN_MAX_OID`
107
CYAN_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $CYAN_LVL_OID`
108
CYAN_LVL_PERCENTS=$(($CYAN_LVL*100/$CYAN_MAX))
109

  
110
DRUM_MAX=`snmpget -v 1 -c public -Ov -Oq $HOST $DRUM_MAX_OID`
111
DRUM_LVL=`snmpget -v 1 -c public -Ov -Oq $HOST $DRUM_LVL_OID`
112
DRUM_LVL_PERCENTS=$(($DRUM_LVL*100/$DRUM_MAX))
113

  
114
echo -n "cyan.value "
115
echo $CYAN_LVL_PERCENTS
116

  
117
echo -n "magenta.value "
118
echo $MAGENTA_LVL_PERCENTS
119

  
120
echo -n "yellow.value "
121
echo $YELLOW_LVL_PERCENTS
122

  
123
echo -n "black.value "
124
echo $BLACK_LVL_PERCENTS
125

  
126
echo -n "drum.value "
127
echo $DRUM_LVL_PERCENTS

Formats disponibles : Unified diff