SNMPSet
-
GE All,
I have a reset OID that i want to send to a node. The node sits behind a server with an agent running on it. All the DCIs are working fine. How would I send SNMPSet OID to the node to reset (or any other Set command)? I've searched this forum and Google. I've tried different Object Tools and Server Scripts and I can get it to work. Any help would be greatly appreciated.
Thanks!
-
You can create a script, which can then be called via Object Tools.
For example the following works to reboot Cisco routers:snmpTransport = CreateSNMPTransport($node); if ( snmpTransport == null ) return "Unable to connect"; returnValue = SNMPSet(snmpTransport,"1.3.6.1.4.1.9.2.9.9.0","2","INTEGER"); if ( returnValue == null ) return "No response. Something went wrong."; if ( returnValue == 0 ) return "Unable to initiate reload. No SNMP Write Access?"; if ( returnValue == 1 ) return "Reload triggered.";In the Object Tools configuration, you create a new Tool of type Server Script and call the script you saved by name. So if the above was called "ReloadCisco" in your Script Library, then that's what you'd call.
You will probably also want to filter the Object Tool to ensure it doesn't show against systems that can't handle it.
And of course you have to have SNMP Set/Writes enabled on the device and have that community configured on the node in NetXMS. -
Tursiops,
Thanks for the reply! I had a chance to try your script. I followed the instructions to implement the script and I all received was a message that it executed successfully. The camera did not reset and I also tried it on a switch. I double checked the write community string. I'm going to have to double check again and make sure I have everything set up correctly.
Thanks!!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login