Deleting laserjet and changing cat name
This commit is contained in:
parent
5c6386abae
commit
ea4d25f597
5 changed files with 2 additions and 11 deletions
30
archive/munin/laserjet__pages
Executable file
30
archive/munin/laserjet__pages
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*
|
||||
|
||||
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 u'host_name laserjet'
|
||||
print u"graph_category État"
|
||||
print "graph_title Pages imprimees"
|
||||
print u"graph_vlabel nb"
|
||||
print u"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