Community discussions

MikroTik App
 
essele
newbie
Topic Author
Posts: 29
Joined: Tue Jan 07, 2014 5:55 am

snmp-get in script

Wed Mar 22, 2017 11:45 pm

Hi,

Is there any way of using snmp-get in a script and getting the result in a variable?

The command seems to only output results and there appears to be no easy way of capturing them, which seems to be a bit of a limitation.

At the moment I've solved the problem by using :execute with file output and then sitting in a busy loop waiting for the file to arrive, and then doing a whole load of horrible text processing. It works but is really nasty.

I'm using snnp-get to query a couple of adsl bridges so I can work out the connection speeds and hence combined bandwidth, so I can setup my queue tree properly. As I said it now works fine, but the complexity of the code for a simple snmp-get makes me a bit nervous.

Any help appreciated.

Cheers,

Lee.

Who is online

Users browsing this forum: No registered users and 76 guests