I managed to get this working just need a few tweeks as sometime receive 0 randomly. Any ideas welcome.
Description - QNAP - Storage - Disk - Logical - available {instance-name} (%)
parameter
.1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.3.{instance}
Transformation
// We are originally querying the actual volume size. This is required for
// calculation and to have an instance to work with.
volumeSize = $1;
// Obtain the actual instance we're after. The last octet in the OID. Result will be stored in $1.
$dci->name match "^.*\.([0-9]+)$";
// Build OID to use to obtain space used
oid = ".1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.4." .$1;
// Connect to node via SNMP
transport = CreateSNMPTransport($node);
if (transport == null)
return false; // node does not support SNMP or transport cannot be created
// Obtain matching used space to calculate usage in %, which we can actually alert on.
volumefree = SNMPGetValue(transport, oid);
if (volumefree == null)
return false;
return format(int64(volumefree) / volumeSize * 100,1,2);