Random Project

modification to add perfdata

I dont have any idea about python, but with this little modify, you can get perfdata

if maxLoad >= critical:
# If load is higher than warning threshold.
print “CRITICAL – relative load is %s” %maxLoad + “%” + “|relativeload=%s;%d;%d” % (maxLoad, warning, critical)
sys.exit(2)
elif maxLoad >= warning:
print “WARNING – relative load is %s” %maxLoad + “%” + “|relativeload=%s;%d;%d” % (maxLoad, warning, critical)
sys.exit(1)
elif maxLoad