Mikrotik Uptime Readable format

Hi All

I'm struggling to find a way to read mikrotik uptime's via snmp traps.

I'm using the snmp node and mikrotik OID but getting an unreadable format in milliseconds.

I've tried date formatters like moment's Humaniser, but i don't want it in date format, i need it to be uptime to see how long the devices are online for example: 1w1d01:20:00

I do get it the functions via the miktrotik node with API, but everytime i get info, i'm flooding my mikrotik log file with logins, i do not want to use API, i need a way to get the uptime format via snmp readable.

without knowing what the snmp output does look like, it's hard to guess what options there are.
Besides...do you know that moment.js also does provide "duration" objects? Did you try that?

This has been covered many times on this forum. This link will help Conversion and display milliseconds in the format "dd hh mm ss" - #6 by E1cid

Hi,

I've tried moment.js, but its seems to keep on creating 'n datestamp that i dont want. I tried the date/time formater as well as the humanizer functions, unless i'm missing someting in my flow like a funtion that does not add up to the total sum.

I will look in to the "duration" and try to see if that maybe solve my issue.

Thank you E1cid

I will definitely lookin to this topic, its seems like this might solve my problem, i just had a quick look at the original post flow and i see someting that might solve my problem, i just want to work thru this flow to see what he did and try to adjust it to my needs.

I will revert back with if it was sucsessful or not. Thank you for the direction...

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.