Community discussions

MikroTik App
 
heiko2
just joined
Topic Author
Posts: 4
Joined: Thu Feb 11, 2010 9:27 am

reduce SNMP-Requests

Thu Jul 26, 2012 3:09 pm

i have some devices that supports only some OID. they all are behind a low bandwith gateway. therefor i have to reduce snmp-traffic.
if i chose a snmp-profile for a device, dude creates automaticaly some requests about interfaces and standard snmp-oids. to switch them of i set snmp-profile to no-snmp. for monitoring some internal values i created data-sources with snmp-v1-public-profile. so far seems all ok.
To get some informations on limits i made some probes with v1-public-snmp-profile. if i set device profile to v1-public or v2-public the probe works. but if the device is on no-snmp the probe does not work even the data-sources on the same device do.
then i got a "local problem" status on this probes.
How can i use snmp-probes if i dont want to set entire device to snmp?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: reduce SNMP-Requests

Thu Jul 26, 2012 4:32 pm

"no-snmp" will not send any SNMP packets. The best you could do is specify the wrong community to keep responses from coming from your device then in each function/probe specify the correct community. Your device might be able to be configured to only respond for specific oids.

You can place this on a device label to see if it works. It will show the snmp system name field...
[oid("1.3.6.1.2.1.1.5.0",5,5,"","public")]
First parameter - oid string, second - cache time, third - negative cache time, forth - ip address, fifth - snmp profile.

I tested that with and when I switch to no snmp I get "SNMP Operation Failed" instead of snmp system name.

There are some posts about how to limit results from router board and from Cisco you can search for those if you need more detail.

HTH,
Lebwoski
 
heiko2
just joined
Topic Author
Posts: 4
Joined: Thu Feb 11, 2010 9:27 am

Re: reduce SNMP-Requests

Thu Jul 26, 2012 6:56 pm

sorry, maybe you misunderstud, what i try to do.
My problem is the amount of additional created snmp-requests.
it is the same amount, if i ask for a value, which is not available or if i ask with wrong parameters.
the problem is, that dude creates many requests, i cannot suppres. i only need 1 or 2 values, to fullfill my task. everything else is unnessecary load.
i have tu suppress the generation of this load, because i'm unable to filter them out.

is there a way to define the requests, generated automaticaly?
 
lebowski
Forum Guru
Forum Guru
Posts: 1619
Joined: Wed Aug 27, 2008 5:17 pm

Re: reduce SNMP-Requests

Fri Jul 27, 2012 12:43 am

As far as I know there is no way to disable dude's automatic collection of interfaces and other junk with out resorting to a trick of some sort.

This will work but you have to modify every probe, on your device put the wrong IP address in settings, then in the probe specify a the correct IP address. Automatic collection would go to a non existent IP but the probe would collect still...

If you have a device on 192.168.1.3, change it's configured ip address to 192.168.1.50 or some other unused address and place the following on the device label the SNMP system name will show up. Which proves my suggestion would work although it is nuts :)
[oid("1.3.6.1.2.1.1.5.0",5,5,"192.168.1.3","public")]
 
heiko2
just joined
Topic Author
Posts: 4
Joined: Thu Feb 11, 2010 9:27 am

Re: reduce SNMP-Requests

Sat Jul 28, 2012 1:20 pm

Hi lebowski

it sounds possible. it's not a fine solution. but it reduces load on the small gate. maybe someone of the developer will read this thread and makes it configurable next time. until we have to live with such a work around.

thx
Heiko
 
User avatar
geoffsmith31
Member Candidate
Member Candidate
Posts: 155
Joined: Fri Nov 05, 2010 6:08 am
Location: Toowoomba, Australia

Re: reduce SNMP-Requests

Sun Jul 29, 2012 9:53 am

I hase created a probe that I use to do SNMP queries on a device using a particular SNMPv3 context (Dude doesnt support contexts). I have downloaded the SNMP GET command line utility (free for non-commercial use) and written a VB script to use that tool to query the individual OID that I need. I then use The Dude execute function to run the VB script and return the value. I think that you could use the same sort of process to overcome your problems.

If you search this forum you will find the details that I posted about that probe.
 
heiko2
just joined
Topic Author
Posts: 4
Joined: Thu Feb 11, 2010 9:27 am

Re: reduce SNMP-Requests

Sun Jul 29, 2012 8:55 pm

hello geoffsmith31

i'm not sure about how to get values from execute. could you give me an example of you programming?

thx heiko
 
User avatar
geoffsmith31
Member Candidate
Member Candidate
Posts: 155
Joined: Fri Nov 05, 2010 6:08 am
Location: Toowoomba, Australia

Re: reduce SNMP-Requests

Sun Jul 29, 2012 11:50 pm

Here http://forum.mikrotik.com/viewtopic.php ... 00#p322042 is the details of a probe that I wrote which uses SNMPGet and The Dude's execute function. It is far more complicated than just getting an OID value but you should be able to hack it down to what you need without too much drama.
 
solelunauno
Member Candidate
Member Candidate
Posts: 119
Joined: Mon Jul 16, 2012 7:00 pm
Location: Roseto Capo Spulico CS Italy
Contact:

Re: reduce SNMP-Requests

Mon Feb 15, 2016 12:25 pm

Very well, lebowski .
I made your suggestion, and it works well; I see from logs that now there are only a little number of requests from snmp each polling time.
I was also able to reduce polls, increasing polling time and appearance updates (appearance label makes snmp requests also).
But those tecniques (increase polling time) are useful only in pure snmp monitoring, so not in RouterOS devices monitored.
For some unknown reason, if the monitored device is a pure snmp device (for example a linux server), The Dude follows the polling times set, but if the monitored device is a mikrotik router, The Dude make requests every 5-10 seconds, ignoring settings!
Why?

Who is online

Users browsing this forum: No registered users and 6 guests