Hi Guys,

We wrote a small plugin that we used to graph the total disk space for all 
servers, so we thought some one else could be intereested;-)

Florian Deckert
SopraGroup - France

regards

toaldiskspace.zmd

Code:
totaldisk=0
totalused=0
for d in dmd.Devices.Server.getSubDevices():
   for f in d.os.filesystems():
     size=f.totalBlocks*f.blockSize
     used=f.getRRDValue('usedBlocks')
     if used is None:
       used = 0
     else:
        used=int(used)
     used=used*f.blockSize
     totaldisk += size
     totalused += used

print "OK|total=%r used=%r" % (totaldisk, totalused)




totaldiskspace.sh

Code:
#!/bin/bash

zendmd </home/zenoss/x.zmd 2>/dev/null | grep "OK"



All you have left is to create a new template with COMMAND "totaldiskspace.sh" 
and Data points "total" and "used".

If you bind the template to a server you will get a graph of all disk space.




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=28244#28244

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to