<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[instance discovery and calculating disk used percentage - qnap snmp]]></title><description><![CDATA[<p dir="auto">Hi looking for a bit of assistance of where i'm going wrong trying to calulated used % on logical qnap drives via snmp.</p>
<p dir="auto">the qnap snmp has used and total snmp but not %.</p>
<p dir="auto">Have the following</p>
<p dir="auto"><strong>parameter</strong></p>
<p dir="auto">.1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.4.{instance}</p>
<p dir="auto"><strong>Transformation</strong></p>
<p dir="auto">sub main()<br />
{<br />
diskfree = GetDCIValueByName($node,SNMPGetValue(transport,".1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.4.".$1));<br />
disksize = GetDCIValueByName($node,SNMPGetValue(transport,".1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.3.".$1));<br />
return (100*(diskfree/disksize));<br />
 }</p>
<p dir="auto"><strong>instance discovery</strong><br />
snmp walk<br />
.1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.1</p>
<p dir="auto">Let me know where i'm going wrong or if something is missed happy to build this in to the qnap template once working and share.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.netxms.org/topic/7247/instance-discovery-and-calculating-disk-used-percentage-qnap-snmp</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:39:38 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7247.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Nov 2021 19:51:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to instance discovery and calculating disk used percentage - qnap snmp on Mon, 22 Jul 2024 13:35:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jdowney" aria-label="Profile: jdowney">@<bdi>jdowney</bdi></a> said in <a href="/post/30781">instance discovery and calculating disk used percentage - qnap snmp</a>:</p>
<blockquote>
<p dir="auto">I managed to get this working just need a few tweeks as sometime receive 0 randomly. Any ideas welcome.</p>
</blockquote>
<p dir="auto">You can add trace command to trace data to server log when incorrect data is obtained. Like:<br />
trace(1, "Incorrect value");</p>
]]></description><link>https://forum.netxms.org/post/33622</link><guid isPermaLink="true">https://forum.netxms.org/post/33622</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Mon, 22 Jul 2024 13:35:53 GMT</pubDate></item><item><title><![CDATA[Reply to instance discovery and calculating disk used percentage - qnap snmp on Wed, 17 Jul 2024 00:52:41 GMT]]></title><description><![CDATA[<p dir="auto">The concatenation operator is ".." not "." so in the above script it should be</p>
<pre><code>oid = ".1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.4." ..$1;
</code></pre>
<p dir="auto">or else you will get an error</p>
]]></description><link>https://forum.netxms.org/post/33613</link><guid isPermaLink="true">https://forum.netxms.org/post/33613</guid><dc:creator><![CDATA[sarangtc]]></dc:creator><pubDate>Wed, 17 Jul 2024 00:52:41 GMT</pubDate></item><item><title><![CDATA[Reply to instance discovery and calculating disk used percentage - qnap snmp on Wed, 17 Nov 2021 13:58:11 GMT]]></title><description><![CDATA[<p dir="auto">I managed to get this working just need a few tweeks as sometime receive 0 randomly. Any ideas welcome.</p>
<p dir="auto">Description - QNAP - Storage - Disk - Logical - available {instance-name} (%)</p>
<p dir="auto"><strong>parameter</strong><br />
.1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.3.{instance}</p>
<p dir="auto"><strong>Transformation</strong><br />
// We are originally querying the actual volume size. This is required for<br />
// calculation and to have an instance to work with.<br />
volumeSize = $1;</p>
<p dir="auto">// Obtain the actual instance we're after. The last octet in the OID. Result will be stored in $1.<br />
$dci-&gt;name match "^.*\.([0-9]+)$";<br />
// Build OID to use to obtain space used<br />
oid = ".1.3.6.1.4.1.24681.1.4.1.1.1.2.3.2.1.4." .$1;</p>
<p dir="auto">// Connect to node via SNMP<br />
transport = CreateSNMPTransport($node);<br />
if (transport == null)<br />
return false; // node does not support SNMP or transport cannot be created</p>
<p dir="auto">// Obtain matching used space to calculate usage in %, which we can actually alert on.<br />
volumefree = SNMPGetValue(transport, oid);<br />
if (volumefree == null)<br />
return false;</p>
<p dir="auto">return format(int64(volumefree) / volumeSize * 100,1,2);</p>
]]></description><link>https://forum.netxms.org/post/30781</link><guid isPermaLink="true">https://forum.netxms.org/post/30781</guid><dc:creator><![CDATA[jdowney]]></dc:creator><pubDate>Wed, 17 Nov 2021 13:58:11 GMT</pubDate></item></channel></rss>