mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-11-22 02:13:44 +01:00
Fixed indentation bug, bond members would fail silently
This commit is contained in:
parent
441f82c5e7
commit
e6da5afcbe
@ -106,16 +106,16 @@ def main(argv):
|
|||||||
print "Critical: bonding device %s %s" % (interface, bond['mii_status'])
|
print "Critical: bonding device %s %s" % (interface, bond['mii_status'])
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
|
|
||||||
# Some interface in the bond is down
|
# Some interface in the bond is down
|
||||||
for slave in bond['slaves']:
|
for slave in bond['slaves']:
|
||||||
if slave['mii_status'] != 'up':
|
if slave['mii_status'] != 'up':
|
||||||
outstring = "%s%s down " % (outstring, slave['int'])
|
outstring = "%s%s down " % (outstring, slave['int'])
|
||||||
if retval < 1:
|
if retval < 1:
|
||||||
retval = 1
|
retval = 1
|
||||||
|
|
||||||
if retval:
|
if retval:
|
||||||
print "%s: %s%s %s" % (states[retval], outstring, "in bonding device", interface)
|
print "%s: %s%s %s" % (states[retval], outstring, "in bonding device", interface)
|
||||||
sys.exit(retval)
|
sys.exit(retval)
|
||||||
|
|
||||||
print "OK: bonding device %s up and running" % interface
|
print "OK: bonding device %s up and running" % interface
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user