Ajout de laserjet__pages et uniformisation des noms
darcs-hash:20080106051314-61eff-579c3d71c5ee1f51e81baf75e2ba12ea48195636.gz
This commit is contained in:
parent
1db9eebfc7
commit
f38e6e9d75
2 changed files with 30 additions and 0 deletions
30
munin/laserjet__pages
Executable file
30
munin/laserjet__pages
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: iso-8859-15 -*
|
||||
|
||||
import sys, os
|
||||
sys.path.append("/usr/scripts/gestion")
|
||||
|
||||
import hptools
|
||||
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
arg = sys.argv[1]
|
||||
else:
|
||||
arg = ''
|
||||
|
||||
if arg == "config":
|
||||
# Ecrit sur la sortie standard la configuration
|
||||
print 'host_name laserjet'
|
||||
print "graph_category etat"
|
||||
print "graph_title Pages imprimees"
|
||||
print "graph_vlabel nb"
|
||||
print "total.label Total"
|
||||
else:
|
||||
# Ecrit les valeurs actuelles sur la sortie standard
|
||||
oid = "1.3.6.1.2.1.43.10.2.1.4.1.1"
|
||||
try :
|
||||
comm = hptools.snmp(host="laserjet.adm.crans.org", version="1", community="public")
|
||||
print "total.value %s" % comm.get(oid)
|
||||
except :
|
||||
print ""
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue