<?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[snmp]]></title><description><![CDATA[<p dir="auto">i have this is in config-&gt;scripting library<br />
script name : test</p>
<p dir="auto">sub main()<br />
{<br />
   return ret = SNMPSet("2c", .1.3.6.1.2.1.25.1.6.0, 10);<br />
if (!ret)<br />
{<br />
    trace(1,"SNMPSet failed");<br />
    return -1;<br />
}</p>
<p dir="auto">}</p>
<p dir="auto">and when trying to execute it from console it says<br />
error : script test not found .<br />
what should i do?<br />
and is it enough for snmp set? isn't it necessary to install net-snmp?</p>
]]></description><link>https://forum.netxms.org/topic/2379/snmp</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:14:39 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2379.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 11 May 2013 11:36:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to snmp on Thu, 16 May 2013 20:21:54 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Script looks correct. But are you sure that .1.3.6.1.2.1.25.1.5.0 is writeable, and that community string set in NetXMS allows read/write access?</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/10293</link><guid isPermaLink="true">https://forum.netxms.org/post/10293</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 16 May 2013 20:21:54 GMT</pubDate></item><item><title><![CDATA[Reply to snmp on Thu, 16 May 2013 19:59:48 GMT]]></title><description><![CDATA[<p dir="auto">thanks<br />
but i want to set an object such as  .1.3.6.1.2.1.25.1.5.0<br />
is this wrong?</p>
<p dir="auto">if ($1 == null)<br />
{<br />
   println "Please specify node name as parameter";<br />
   return 3;<br />
}<br />
println $1;<br />
transport = CreateSNMPTransport(FindObject($1));   <br />
if (transport == null)<br />
{<br />
    println "Failed to create SNMP transport, exit";<br />
    return 1;<br />
}</p>
<p dir="auto">ret = SNMPSet(transport, ".1.3.6.1.2.1.25.1.5.0", 4);<br />
if (!ret)<br />
{<br />
    println "failed";<br />
    trace(1,"SNMPSet failed");<br />
    return -1;<br />
}</p>
]]></description><link>https://forum.netxms.org/post/10288</link><guid isPermaLink="true">https://forum.netxms.org/post/10288</guid><dc:creator><![CDATA[jamesof]]></dc:creator><pubDate>Thu, 16 May 2013 19:59:48 GMT</pubDate></item><item><title><![CDATA[Reply to snmp on Sun, 12 May 2013 10:07:26 GMT]]></title><description><![CDATA[<p dir="auto">Your script has syntax error, and so it not compiles. Because of that you got "script not found" message (not very meaningful in this case, I agree). Besides that, it has other errors. First of all, you have to create SNMP transport object for node you want to query, and then use it in SNMPGet function. Below is an example of script which can be run from server's debug console to get SNMP object ID from node passed as parameter:</p>
<pre><code>if ($1 == null)
{
   println "Please specify node name as parameter";
   return 3;
}

transport = CreateSNMPTransport(FindObject($1));    // Create SNMP transport for node
if (transport == null)
{
    println "Failed to create SNMP transport, exit";
    return 1;
}

value = SNMPGetValue(transport, ".1.3.6.1.2.1.1.1.0");
if (value == null)
{
    println "Failed to issue SNMP GET request";
    return 2;
}
else
{
    println "System description: " . value;
    return 0;
}
</code></pre>
<p dir="auto">Example of running this script on my test server attached.</p>
<p dir="auto">Best regards,<br />
Victor</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001170-test_script.png" alt="test_script.png" class="img-markdown  img-fluid" width="888" height="114" /></p>
]]></description><link>https://forum.netxms.org/post/10254</link><guid isPermaLink="true">https://forum.netxms.org/post/10254</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sun, 12 May 2013 10:07:26 GMT</pubDate></item></channel></rss>