<?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[How to monitor sysUpTime via SNMP?]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I am trying to find an optimal way to monitor sysUpTime (OID: .1.3.6.1.2.1.1.3.0) and hrSystemUptime (OID: .1.3.6.1.2.1.25.1.1.0). Both values are timeticks which is not supported type for DCI so I ended up with two following solutions, each with certain drawbacks.</p>
<p dir="auto"><strong>Solution 1 - see the human readable value but no graph</strong></p>
<ol>
<li>Create DCI Internal/Dummy - type String</li>
<li>Add transformation script:</li>
</ol>
<pre><code>transport = CreateSNMPTransport($node);
if (transport == null)
{
  trace(1,"Snmp transport error on ".$node-&gt;ipAddr);
  return -1;
}

uptime = SNMPGetValue(transport, ".1.3.6.1.2.1.1.3.0");
if (uptime != null)
{
  // return uptime/100; // in seconds as float
  // return uptime/8640000 // in days as float
  return SecondsToUptime(uptime/100); // readable format
}
else
{
  trace(1,"Could not read uptime value for ".$node-&gt;ipAddr);
  return -1;
}
</code></pre>
<p dir="auto"><strong>Solution 2 - graph in days, but no easily readable output</strong><br />
Same as above, only change the value type to Floating point and uncomment required line in the script.</p>
<p dir="auto">Does anybody have a better way for monitoring uptime or Timeticks SNMP values in general so there is both human readable and graphical output?</p>
<p dir="auto"> Regards,<br />
 Lukas</p>
]]></description><link>https://forum.netxms.org/topic/2629/how-to-monitor-sysuptime-via-snmp</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 21:29:23 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2629.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 Sep 2013 08:39:24 GMT</pubDate><ttl>60</ttl></channel></rss>