Community discussions

MikroTik App
 
crackers
just joined
Topic Author
Posts: 1
Joined: Wed Jan 16, 2019 5:08 pm

How to get Ethernet port Uptime oid ?

Wed Jan 16, 2019 5:15 pm

Code: Select all

Hi there.

Tell me please, how i can get the oid (for snmp protocol) uptime of the ethernet port (or an other port, it doesn't mater) in RouterOS ?

I've tried the following command in the terminal : interface print oid
But I can't find what i'm looking for
(Whithout searching in log)
 
MCN
just joined
Posts: 16
Joined: Thu Feb 21, 2019 8:57 pm

Re: How to get Ethernet port Uptime oid ?

Fri Sep 10, 2021 1:44 am

IF-MIB::ifLastChange.1 = Timeticks

Maybe?

Looks like 1.3.6.1.2.1.2.2.1.9 for Mikrotik stuff....
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: How to get Ethernet port Uptime oid ?

Fri Sep 10, 2021 2:00 am

The user is waiting your reply from 2019...
 
MCN
just joined
Posts: 16
Joined: Thu Feb 21, 2019 8:57 pm

Re: How to get Ethernet port Uptime oid ?

Fri Sep 10, 2021 2:03 am

Yea - but the next poor slob that researches this may find it useful.

Also form this page:
https://community.cisco.com/t5/routing/ ... -p/2115204:
"To find out when the last status change of an interface occured, you also need to query sysUptime.0 (1.3.6.1.2.1.1.3.0) .

Calculate sysUptime.0 minus ifLastChange.x and divide the result by 100 (Tiimeticks are denoted in hundredths of a second).

This value gives you the time in seconds since the last status change."

May need to be modified for Mikrotik OID's etc...

If this helps some one - let us know - and what you did to make it work!

Who is online

Users browsing this forum: baragoon, FranMercedesG, GoogleOther [Bot], korg, Soleous75 and 82 guests