[munin/iptables_] On ne plante pas sur une chaine vide
This commit is contained in:
parent
19d782c0be
commit
f6fa910ef8
1 changed files with 2 additions and 1 deletions
|
@ -51,7 +51,8 @@ else :
|
|||
data = commands.getoutput("%s %s | uniq | awk '{print $4}' | grep 231 | awk -F '.' '{print $1$2$3}' | sort | uniq -c | grep 231" % (IPTABLES, chain)).split('\n')
|
||||
total = 0
|
||||
for line in data :
|
||||
value, subnet = line.split()
|
||||
try: value, subnet = line.split()
|
||||
except ValueError: continue
|
||||
total += int(value)
|
||||
if subnet[:8] == "10231136":
|
||||
print "%sadm.value %s" % (nom, value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue