[Inclusão Digital]Monitorar sessão BGP
Wenderson Souza
wendersonsouza em gmail.com
Sexta Março 9 19:15:23 BRT 2012
SNMP pelo jeito não tem, a não ser com a pequena gambiarra abaixo.
http://forum.mikrotik.com/viewtopic.php?f=2&t=12536
-------------------
Unfortunately snmp oids are not plenty on mikrotik yet : ) It would be
best if snmp oid could be queried and a :global variable on mikrotik
could be handed back.
Hack this up and see what you get:
1. Add a blank bridge interface.
interface bridge> add name=b-peer-1 mtu=1000
2. Find its OID:
interface> print oid
14 R name=.1.3.6.1.2.1.2.2.1.2.41 mtu=.1.3.6.1.2.1.2.2.1.4.41
mac-address=.1.3.6.1.2.1.2.2.1.6.41
admin-status=.1.3.6.1.2.1.2.2.1.7.41
oper-status=.1.3.6.1.2.1.2.2.1.8.41
bytes-in=.1.3.6.1.2.1.2.2.1.10.41
packets-in=.1.3.6.1.2.1.2.2.1.11.41
discards-in=.1.3.6.1.2.1.2.2.1.13.41
errors-in=.1.3.6.1.2.1.2.2.1.14.41
bytes-out=.1.3.6.1.2.1.2.2.1.16.41
packets-out=.1.3.6.1.2.1.2.2.1.17.41
discards-out=.1.3.6.1.2.1.2.2.1.19.41
errors-out=.1.3.6.1.2.1.2.2.1.20.41
Now the MTU oid can be used to check value with whatsup or other snmp
monitoring...
3. Run / schedule this script for how often you want that to update.
Code:
:if ([/routing bgp peer get [/routing bgp peer find name=cymru] state
] = established) do={/int bridge set [/int bridge find name=b-peer-1]
mtu=1000} else={/int bridge set [/int bridge find name=b-peer-1]
mtu=1001}
4. Use whats up to query OID mtu=.1.3.6.1.2.1.2.2.1.4.41 - if MTU =
1000 its up, if its 1001 its down.
Kind of a hack, but very possible. I'm sure the script could be
enhanced to automatically update multiple at once but this was a
quicky. Possibly name the bridge with a psuedo name of the bgp peer
and it would run thru all of them.
Sam
----------------------------------
Atenciosamente,
Wenderson Souza
Diretor de Tecnologia - Inter Connect
Macapá - Amapá - Brasil
Em 9 de março de 2012 15:51, fknet <ffkammer em conchalnet.com.br> escreveu:
> Boa tarde!
>
> Alguém sabe se há como monitorar as sessões BGP de meus roteadores mikrotik
> via snmp ou de alguma outra forma???
>
> obrigado
>
> fabrício
> _______________________________________________
> Inclusaodigital mailing list
> Inclusaodigital em anid.com.br
> http://mail.anid.com.br/mailman/listinfo/inclusaodigital
Mais detalhes sobre a lista de discussão Inclusaodigital