Tweaking des plugins munin

darcs-hash:20080914174748-ffbb2-f90ffd8cb29070a3d0ed1c63d3b7302e07815ae4.gz
This commit is contained in:
Nicolas Dandrimont 2008-09-14 19:47:48 +02:00
parent 31539859ee
commit cceeea27bb
4 changed files with 25 additions and 12 deletions

View file

@ -8,10 +8,6 @@ fichier = '/var/lib/munin/tmp/stats-ip_'
import sys, os, string
sys.path.append('/usr/scripts/gestion')
from ldap_crans import crans_ldap
from config import NETs
from iptools import AddrInNet
# On prend l'argument pour définir la plage d'ip à analyser
SUBNET = sys.argv[0].split('_')[1]
@ -34,6 +30,10 @@ if arg == "config" :
print "total.label Total disponibles"
elif arg == "fichier" :
from ldap_crans import crans_ldap
from config import NETs
from iptools import AddrInNet
ips = [ x.ip() for x in crans_ldap().search('ip=*')['machine'] ]