Il faut virer les '.'.
Munin se sert des '.' et des '-' comme des sparateurs trs particuliers. Maintenant que des rgles dans mangle de komaz ont des '.' on les liminie darcs-hash:20060426170810-72cb0-58d54aa118b3888c8f15404caaa265251783830d.gz
This commit is contained in:
parent
3452ac5210
commit
d569556926
1 changed files with 5 additions and 5 deletions
|
@ -26,19 +26,19 @@ if arg == "config" :
|
||||||
print 'graph_category network'
|
print 'graph_category network'
|
||||||
print "graph_vlabel nb de regles"
|
print "graph_vlabel nb de regles"
|
||||||
for chain in CHAINS :
|
for chain in CHAINS :
|
||||||
nom = string.lower(chain.replace('_', '').replace('-', ''))
|
nom = string.lower(chain.replace('_', '').replace('-', '').replace('.','').replace('/', ''))
|
||||||
label = chain.replace('_', '-')
|
label = chain.replace('_', '-').replace('.','-').replace('/','-')
|
||||||
print "%s.label %s" % (nom, label)
|
print "%s.label %s" % (nom, label)
|
||||||
if CHAINS.index(chain) == 0 :
|
if CHAINS.index(chain) == 0 :
|
||||||
print "%s.draw AREA" % nom
|
print "%s.draw AREA" % nom
|
||||||
else :
|
else :
|
||||||
print "%s.draw STACK" % nom
|
print "%s.draw STACK" % nom
|
||||||
if label == "TEST-MAC-IP" :
|
if label == "TEST-MAC-IP" :
|
||||||
print "%s.warning 100:" % nom
|
print "%s.warning 100:2000" % nom
|
||||||
print "%s.critical 1:" % nom
|
print "%s.critical 1:3000" % nom
|
||||||
|
|
||||||
else :
|
else :
|
||||||
for chain in CHAINS :
|
for chain in CHAINS :
|
||||||
nom = string.lower(chain.replace('_', '').replace('-', ''))
|
nom = string.lower(chain.replace('_', '').replace('-', '').replace('.','').replace('/', ''))
|
||||||
value = int(commands.getoutput('%s %s | wc -l' % (IPTABLES, chain))) - 2
|
value = int(commands.getoutput('%s %s | wc -l' % (IPTABLES, chain))) - 2
|
||||||
print "%s.value %d" % (nom, value)
|
print "%s.value %d" % (nom, value)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue