I hacked together something like this:
" free = free * 1024; " is because otherwise unit b(IEC) was showing incorrectly.
is there anything that could be improved on this script?
Code Select
transport = CreateSNMPTransport($node);
if (transport == null) { return null; }
diskSize = SNMPGetValue(transport,".1.3.6.1.2.1.25.2.3.1.5.131072");
diskUsed = SNMPGetValue(transport,".1.3.6.1.2.1.25.2.3.1.6.131072");
if(diskSize == null || diskUsed == null) { return null; }
free = diskSize - diskUsed;
free = free * 1024;
return free;
" free = free * 1024; " is because otherwise unit b(IEC) was showing incorrectly.
is there anything that could be improved on this script?