Community discussions

MikroTik App
 
jesse.dupont
just joined
Topic Author
Posts: 10
Joined: Tue May 06, 2008 5:53 am

Data Source Issue from v4 to v6

Thu Aug 24, 2017 2:18 am

Hello. I'm finally migrating from v4.0b3 to v6 (6.38.7 to be exact) and this data source code isn't working any longer:

rate(diff64(oid_raw("1.3.6.1.4.1.14988.1.1.2.2.1.7.16777218")))*8

Any ideas what I need to modify? The OID is valid (from HTB in RouterOS and works on v4.0b3.

Thank you!

EDIT: It seems to be a problem with "diff64". I have another similar code line (the OID is different) on a device label that works, but the value being returned from the OID poll is much smaller. Could the number on the OID above, which is bytes that traversed the queue tree queue, simply be too large even for diff64? By the way, when I say it doesn't work, what I mean is it only returns the number 0.

So, "[rate(diff64(oid_raw("1.3.6.1.4.1.14988.1.1.2.2.1.7.16777218")))*8]" on a device label returns 0 and it says 0 through multiple polling cycles.
This, "[oid_raw("1.3.6.1.4.1.14988.1.1.2.2.1.7.16777218")] on the same device label returns the bytes value as expected.
This, "[rate(oid_raw("1.3.6.1.4.1.14988.1.1.2.2.1.7.16777218"))]" on the same device label returns the bytes divided by the time elapsed since last poll, as expected.
 
jesse.dupont
just joined
Topic Author
Posts: 10
Joined: Tue May 06, 2008 5:53 am

Re: Data Source Issue from v4 to v6

Thu Aug 24, 2017 7:00 pm

Update:

So this: "rate(diff64(oid ("1.3.6.1.4.1.14988.1.1.2.2.1.7.16777218")/1000000)*1000000)*8" on a label works. I had to divide the number being retrieved from the OID by 1 million before diff64 could deal with it.

Likewise, "rate(diff64(oid ("1.3.6.1.4.1.14988.1.1.2.2.1.7.16777218")))*8" works on label if I go reset the counters for the queue in RouterOS (but only for a little while, once the bytes counter rolls past 2 billion, the label just says 0 again).

This has to be an issue with the diff64 function and number size. The largest number I'm retrieving from the OID is 15 digits long, considerably smaller than the max for a 64-bit number, but it seems that diff64 can't deal with the numbers if they're larger than 10 digits. It's like diff64 is really only diff32...

Mikrotik Support?