Community discussions

MikroTik App
 
User avatar
BigSky
newbie
Topic Author
Posts: 26
Joined: Tue Aug 24, 2010 11:45 pm
Location: Montana, US

Dude - how to log interface status

Thu Jan 25, 2024 6:11 pm

Hi,

I can't seem to find a way to log the status of an ethernet interface status. I'm trying to have a record of when this ethernet port goes up & down. (see screen shot below). I'm having issues with the device plugged into it.

Screenshot 2024-01-25 090707.png
Thanks for your help.
You do not have the required permissions to view the files attached to this post.
 
User avatar
stmx38
Long time Member
Long time Member
Posts: 650
Joined: Thu Feb 14, 2008 4:03 pm
Location: Moldova, Chisinau

Re: Dude - how to log interface status

Fri Jan 26, 2024 10:25 am

We probably may consider to use at least 3 sources for that
1. SNMP - set a probe using SNMP in Dude
2. ROS - set a probe using a ROS script in Dude
3. Logs - Send logs to external Syslog and then notifications about specific event
Screenshot 2024-01-26 at 09.01.44.png
Screenshot 2024-01-26 at 09.03.47.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3123
Joined: Mon Apr 08, 2019 1:16 am

Re: Dude - how to log interface status

Fri Jan 26, 2024 2:51 pm

And ... in DUDE you can create datasets, that will collect (and compress over time) the collected data.


Datasets are made with SNMP OID and some functions in DUDE to round-subtract-average-convert the collected data.
I have no exemple for up-down collection (that is in the DUDE syslog as LOG records) , but follow traffic that way.

eg code like :
(round(diff32(oid_raw("1.3.6.1.2.1.2.2.1.10.6", 0, 0, "192.168.90.1", "v1-public")))+round(diff32(oid_raw("1.3.6.1.2.1.2.2.1.16.6", 0, 0, "192.168.90.1", "v1-public"))))/1000000
Klembord-2.jpg
You do not have the required permissions to view the files attached to this post.
 
User avatar
BigSky
newbie
Topic Author
Posts: 26
Joined: Tue Aug 24, 2010 11:45 pm
Location: Montana, US

Re: Dude - how to log interface status

Mon Jan 29, 2024 7:43 pm

Thanks everyone. I'll dig into this and see how it works.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4324
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: Dude - how to log interface status

Mon Jan 29, 2024 8:41 pm

Thanks everyone. I'll dig into this and see how it works.
One thing to note: Dude works by polling... so it records an instantance reading of something. It does NOT do "traps" or events... so its may not capture if up/down perfectly, but close (and closer if you shorten the polling intervals).

This polling usually happens via probes on a device, which also create "data sources". But you can "shortcut" the probe, by directly using the data sources as @bpwl shows

While you can also send logs from RouterOS device via Dude's syslog server – which save the logs, but it does NOT let you query/alarm logs.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3123
Joined: Mon Apr 08, 2019 1:16 am

Re: Dude - how to log interface status

Mon Jan 29, 2024 9:36 pm

Local logging -> action "remote" ->Dude syslog -> ROS logging as topic "dude" -> logging action "e-mail"

Long difficult path for push notifications. Logging will be there. But no SNMP trap handler in DUDE. Need something else to handle the SNMP trap sent when interface changes state.
viewtopic.php?t=188114

Who is online

Users browsing this forum: No registered users and 3 guests