Community discussions

MikroTik App
 
cielo
just joined
Topic Author
Posts: 3
Joined: Tue Nov 09, 2010 7:56 pm

Functions syntax

Thu Nov 11, 2010 12:13 pm

Hello,

can anyone post a link to the syntax for all the functions in The Dude?

I'm trying to solve a problem : between 2 switches I have multiple links (n X 1Gbps) and I want to sum all the IN bytes from all the interfaces for graphing purposes.
 
chrisd13
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Mon Feb 20, 2006 4:05 pm
Location: UK

Re: Functions syntax

Thu Nov 11, 2010 8:52 pm

To aggregate the RX traffic on the links use the following code, it will aggregate interfaces 7 - 9.
round(rate(diff32(oid("1.3.6.1.2.1.2.2.1.10.7"))*8))+round(rate(diff32(oid("1.3.6.1.2.1.2.2.1.10.8"))*8))+round(rate(diff32(oid("1.3.6.1.2.1.2.2.1.10.9"))*8))
If you need to aggregate more than 3 links then keep adding the following code after another + symbol.
round(rate(diff32(oid("1.3.6.1.2.1.2.2.1.10.10"))*8))
Create a new data source with the code you have created and it will graph the aggregate RX of the links you have added in.

1.3.6.1.2.1.2.2.1.10.x will give you the RX of the port

1.3.6.1.2.1.2.2.1.16.x will give you the TX of the port

where x is the interface number.

Open Charts then click on the Data Source tab and create a data source as shown below...
Graph_aggregate_interfaces.jpg
Adjust the interval time and keep times to your needs.

If you want to also have the aggregate of the TX just create another Data Source and use the TX OID (1.3.6.1.2.1.2.2.1.16.x) rather than the RX OID and you can then create a chart with both of them visable.

Add a new chart and then add your two data sources as shown below.
Graph_aggregate_interfaces_chart.jpg
You do not have the required permissions to view the files attached to this post.
 
cielo
just joined
Topic Author
Posts: 3
Joined: Tue Nov 09, 2010 7:56 pm

Re: Functions syntax

Fri Nov 12, 2010 2:15 pm

@Chris, thanks alot.
As you indicated I've created a new data source with the following code :
rate(diff32(oid_raw("1.3.6.1.2.1.2.2.1.16.129", 5, 5, "172.16.50.1", "v1-public")))+
rate(diff32(oid_raw("1.3.6.1.2.1.2.2.1.16.134", 5, 5, "172.16.50.1", "v1-public")))+
rate(diff32(oid_raw("1.3.6.1.2.1.2.2.1.16.256", 5, 5, "172.16.50.1", "v1-public")))+
rate(diff32(oid_raw("1.3.6.1.2.1.2.2.1.16.262", 5, 5, "172.16.50.1", "v1-public")))
and a second one, for outbound traffic.

Very useful your indications.

I'm still at the very beginning level and the help is away from being very useful.
If someone can indicate a good tutorial for Dude ... don't hesitate.
 
chrisd13
Frequent Visitor
Frequent Visitor
Posts: 68
Joined: Mon Feb 20, 2006 4:05 pm
Location: UK

Re: Functions syntax

Fri Nov 12, 2010 6:35 pm

No worries glad it is of help. I think the best place for you to start would be to read through the Dude wiki which is available from the Dude's homepage. On top of that have a read through the Probe Thread that is a sticky topic in this forum. It will give you some good pointers for creating functions and probes which will then hopefully start you off and soon you'll be creating mind blowing functions and probes of your own :D

All the best and good luck.
Don't forget to give Karma if we help you out :)

Who is online

Users browsing this forum: No registered users and 11 guests