[Mikrotik] Dude Question

Justin Miller mikrotik at dynstatic.net
Tue May 28 16:56:33 CDT 2013


You can make a function in dude that does a routeros command and use it's results in a function that would return up/down. You can use this function in the label to get your desired results. I'm not sure how you would define the Interface from the label tho. Maybe it's link_index() "returns link index available from some contexts"....

Here is an example function

ros_command(":put [/system routerboard get model]")

Something like this seems to work. Returns true/false. Just got to put that in an if/then.

ros_command(concatenate(":put [/interface ethernet get ",link_index()," running]"))


Justin


On May 28, 2013, at 4:05 PM, Rory McCann <rmm.lists at gmail.com> wrote:

> Well, regardless does anyone know if there is an equivalent variable for interface.operstatus available when using "routeros"?
> 
> Rory McCann
> Minn-Kota Ag Products
> P: 701-403-4877 | E: rory at mkap.com
> 
> On 5/28/2013 3:00 PM, Josh Luthman wrote:
>> I will say I see it more with SNMP than I do with RouterOS.
>> 
>> Josh Luthman
>> Office: 937-552-2340
>> Direct: 937-552-2343
>> 1100 Wayne St
>> Suite 1337
>> Troy, OH 45373
>> 
>> 
>> On Tue, May 28, 2013 at 3:59 PM, Rory McCann <rmm.lists at gmail.com> wrote:
>> 
>>> So why doesn't the label do the same thing when I select "routeros"
>>> instead of "snmp"? If it was I/O bound, I should be seeing it consistently
>>> across everything which I am not.
>>> 
>>> 
>>> Rory McCann
>>> Minn-Kota Ag Products
>>> P: 701-403-4877 | E: rory at mkap.com
>>> 
>>> On 5/28/2013 1:41 PM, Justin Miller wrote:
>>> 
>>>> The flash on the RB-1000 is a little slow for use with Dude. Just because
>>>> you can doesn't mean you should.....
>>>> 
>>>> You are likely seeing those labels because it's so slow with the I/O.
>>>> 
>>>> 
>>>> On May 28, 2013, at 12:02 PM, Rory McCann <rmm.lists at gmail.com> wrote:
>>>> 
>>>>  Hi guys,
>>>>> I'm playing around with The Dude on an RB1000 (using dude v4beta1) and
>>>>> I've got a question on setting up labels.
>>>>> 
>>>>> I've found that when using SNMP on my mikrotik devices, when the label
>>>>> refreshes, it displays all the variables for a few seconds before
>>>>> displaying the values. For example, when it refreshes, the label says:
>>>>> 
>>>>> Rate: [Interface.Speed]
>>>>> Rx: [Interface.InBitRate]
>>>>> Tx: [Interface.OutBitRate]
>>>>> Status: [Interface.OperStatus]
>>>>> 
>>>>> Then after a few seconds, it will display:
>>>>> 
>>>>> Rate: 100 Mbps
>>>>> Rx: 50 bps
>>>>> Tx: 51 bps
>>>>> Status: up
>>>>> 
>>>>> Since I don't like this behavior, I decided to try switching the link
>>>>> type from SNMP to RouterOS and use the native variables. This works much
>>>>> better, however I can't seem to find an equivalent for
>>>>> [Interface.OperStatus]. If I try to poll the OID, I always get "up(1)"
>>>>> regardless if the link is actually connected or not.
>>>>> 
>>>>> Is there a variable that RouterOS would understand to simply tell me
>>>>> "up" or "down" for the Interface status?
>>>>> 
>>>>> --
>>>>> Rory McCann
>>>>> Minn-Kota Ag Products
>>>>> P: 701-403-4877 | E: rory at mkap.com
>>>>> 
>>>>> 
>>>>> ______________________________**_________________
>>>>> Mikrotik mailing list
>>>>> Mikrotik at mail.butchevans.com
>>>>> http://mail.butchevans.com/**mailman/listinfo/mikrotik<http://mail.butchevans.com/mailman/listinfo/mikrotik>
>>>>> 
>>>>> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
>>>>> RouterOS
>>>>> 
>>>> ______________________________**_________________
>>>> Mikrotik mailing list
>>>> Mikrotik at mail.butchevans.com
>>>> http://mail.butchevans.com/**mailman/listinfo/mikrotik<http://mail.butchevans.com/mailman/listinfo/mikrotik>
>>>> 
>>>> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
>>>> RouterOS
>>>> 
>>> ______________________________**_________________
>>> Mikrotik mailing list
>>> Mikrotik at mail.butchevans.com
>>> http://mail.butchevans.com/**mailman/listinfo/mikrotik<http://mail.butchevans.com/mailman/listinfo/mikrotik>
>>> 
>>> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik
>>> RouterOS
>>> 
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://mail.butchevans.com/pipermail/mikrotik/attachments/20130528/a7a5b722/attachment.html>
>> _______________________________________________
>> Mikrotik mailing list
>> Mikrotik at mail.butchevans.com
>> http://mail.butchevans.com/mailman/listinfo/mikrotik
>> 
>> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS
> 
> _______________________________________________
> Mikrotik mailing list
> Mikrotik at mail.butchevans.com
> http://mail.butchevans.com/mailman/listinfo/mikrotik
> 
> Visit http://blog.butchevans.com/ for tutorials related to Mikrotik RouterOS



More information about the Mikrotik mailing list