Community discussions

MikroTik App
 
Garga220
just joined
Topic Author
Posts: 7
Joined: Wed Jan 21, 2015 1:53 pm

New OID for CPU

Wed Apr 27, 2016 5:30 pm

Hello,

in new RouterOS v6.35 there was change for CPU OID representing 1 min avereage CPU load:

"*) snmp - fixed cpu load reporting to 1min average and change oid to 1.3.6.1.4.1.2021.11.10.0;".

Can someone explain what that exactly means.
-
On my RB2011 i get:

[coca@cola] > system resource cpu print oid
0 load=.1.3.6.1.2.1.25.3.3.1.2.
--
Both 1.3.6.1.2.1.25.3.3.1.2 and new 1.3.6.1.4.1.2021.11.10.0 give me the same value.

How can i "print or export" new OID from configuration?

Which one to use?

Why did they put new OID if the old one is now same as the new.

Are they the same?
 
Garga220
just joined
Topic Author
Posts: 7
Joined: Wed Jan 21, 2015 1:53 pm

Re: New OID for CPU

Fri May 06, 2016 9:57 am

bump
 
User avatar
dynek
Member Candidate
Member Candidate
Posts: 221
Joined: Tue Jan 21, 2014 10:03 pm

Re: New OID for CPU

Fri Mar 31, 2017 10:44 am

Hello,

Pretty much the same question so I'm exhuming this thread :-)

As far as I was able to see on my RB1100AHx2, I can query CPU usage using:
- .1.3.6.1.2.1.25.3.3.1.2.1 (cpu1)
- .1.3.6.1.2.1.25.3.3.1.2.2 (cpu2)
- .1.3.6.1.4.1.2021.11.10.0 (1min average?)

However none of this value reports what I can see in /system resources - Are cpu1 and 2 also 1min average?
And the last one is the average of both cpu on 1 min?

Thanks
 
User avatar
dynek
Member Candidate
Member Candidate
Posts: 221
Joined: Tue Jan 21, 2014 10:03 pm

Re: New OID for CPU

Sat Apr 01, 2017 2:30 pm

I don't quite understand what the Mikrotik is exposing via SNMP.
There are the regular IF info:
http://www.oidview.com/mibs/0/IF-MIB.html

Duplicated at a different place?
http://www.oidview.com/mibs/14988/MIKROTIK-MIB.html

The odd thing is I can find correct values for a bridge & ovpn in IF-MIB but in MIKROTIK-MIB all values are 0.

And finally why do /interface print oid expose IF-MIB instead of MIKROTIK-MIB oids?

Thanks
 
User avatar
tomaskir
Trainer
Trainer
Posts: 1162
Joined: Sat Sep 24, 2011 2:32 pm
Location: Slovakia

Re: New OID for CPU

Fri Apr 21, 2017 7:12 pm

It is simple:

.1.3.6.1.2.1.25.3.3.1.2 is a standards based OID (coming from the host mgmt MIB).
The MIB specifies:
The average, over the last minute, of the percentage of time that this processor was not idle.
Implementations may approximate this one minute smoothing period if necessary.
Meaning the OID, according to the MIB, MUST return average CPU utilization for the last minute.

Previous to the change in v6.35, this OID returned IMMEDIATE CPU load at the time of the request.
This means MikroTik was incorrectly reporting CPU load as per the definition of the OID from the MIB.

So MikroTik changed .1.3.6.1.2.1.25.3.3.1.2 to properly report CPU load for the last minute.

A new OID was introduced, no not lose previous ability to poll current CPU load.
So .1.3.6.1.4.1.2021.11.10 will give you CPU load at the time you make the SNMP request.
 
User avatar
dynek
Member Candidate
Member Candidate
Posts: 221
Joined: Tue Jan 21, 2014 10:03 pm

Re: New OID for CPU

Mon May 08, 2017 2:45 pm

Hello tomaskir and thank you for your answer,

On a RB1100AHx2 .1.3.6.1.2.1.25.3.3.1.2 exposes both CPUs (.1.3.6.1.2.1.25.3.3.1.2.1 and .1.3.6.1.2.1.25.3.3.1.2.2)
However .1.3.6.1.4.1.2021.11.10 only exposes a single value. Would that be the average of both CPUs?

Thank you
 
jo2jo
Forum Guru
Forum Guru
Posts: 1003
Joined: Fri May 26, 2006 1:25 am

Re: New OID for CPU

Thu Feb 15, 2018 6:34 am

Also can someone please show where in the CLI we can access these OIDs (ie at what / run Print oid at)?

i never used to have an issue using the OID from /sys resource pr oid (or /sys resour cpu pr oid) but as of recent ROS versions / recent deployments the CLI is returning OID that give error.

tks
 
jo2jo
Forum Guru
Forum Guru
Posts: 1003
Joined: Fri May 26, 2006 1:25 am

Re: New OID for CPU

Fri Apr 13, 2018 12:42 am

bump - (mt support ?)

We still dont have consistency pre-CPU OID change (ie around 6.35). How do we access (via snmp OID) the CPU load % shown in /system resource print (ie the avg of X cores, instant value).
This is not a minor issue, its very important to graph / have access to CPU % data.

I appreciate the user reply below, but this is not working (tested on several MT devices, all return No such OID)

A new OID was introduced, no not lose previous ability to poll current CPU load.
So .1.3.6.1.4.1.2021.11.10 will give you CPU load at the time you make the SNMP request.

tks
EDIT: not even the 1m avg OID works, so mt pls, provide OID to get CPU % (and not on a per core per oid basis)

EDIT2: unless there was confuision in my email to MT support, it looks like they fully removed the ability to get any kind of CPU AVG (ie on multi-core RBs) around ros 6.35, and will *consider* adding it back in the future:
>Thank you for contacting us.
>We will consider adding OID for this value in future RouterOS releases.
>Best regards,
>Martins S.

There is no point in SNMP monitoring a single CPU core, of a multi-core RB ( ALL MT's higher end RBs are Multi-core) - we need ability to get an average (back).

edit3; look like feature was removed inplace of per-core snmp monitoring only:
(below from MT support):
Currently in order to get CPU usage you have to get CPU core usage from System/Resource/CPU menu and calculate average value if you want to get total CPU usage.
 
AlexOpenwireless
just joined
Posts: 1
Joined: Fri May 26, 2023 7:09 am

Re: New OID for CPU

Fri May 26, 2023 7:16 am

Wanted to bump this back up. I'm unsure if the 1.3.6.1.4.1.2021.11.10 OID is working correctly. I see CPU loads of 5% under Resources on my CCR1036 but when I snmpwalk that OID I get an integer of zero. Now, weirdly, when I walk the OIDs for ALL the cores, they're all around 1-4, some are zero. So I have no idea where the 5% number is coming from but the new OID shouldn't be getting 0... Need to figure out a way to report a single data point in Zabbix for 36 cores...

Who is online

Users browsing this forum: TeWe and 84 guests