Syed Jahanzaib Personal Blog to Share Knowledge !

August 20, 2013

Monitor Switch Ports Up/Down Status via Mikrotik Dude – Short Notes

Filed under: Cisco Related, Mikrotik Related — Tags: , , — Syed Jahanzaib / Pinochio~:) @ 12:51 PM




Another Live Example of port monitoring with sms/email/voice alert system in DUDE.


In my network, I have few Cisco switches at various departments connected via FIBER optics. Recently we were having issue of network connectivity in between various switches and devices. I already have a very good setup of Mikrotik base DUDE monitoring system, but it shows only the SWITCH availability status on the screen, I wanted to have a good visual for switch ports too.

I found few ways to accomplish this task using DUDE functions, scripts, etc, but found following method is very simple to start with . It also sends me email when any port goes Down or not in use.

Make sure your switch support SNMP , and SNMP agent is enabled at your SWITCH as well as at your DUDE to match the same. For simplicity you can use PUBLIC as a default community string in the switch. Also In this example I have used CISCO 3750 (in dual stack mode) and add only few ports just for example.

First add your switch in the map so that it can appear in the map as look like below.

As showed in the image below . . .





Adding PROBE for port monitoring

Now to add PORTS monitoring, Open Dude,
Goto PROBES and click on + sign to add new probe.
Use the following data.

Name = PORT 9
Type = SNMP
SNMP Profile = Your SNMP Profile
Oid =
Oid Type = integer
Comapre method = ==equal
Integer Value = 1

As showed in the image below . . .


Note: Change the OID number to match the port number on your switch , for example I am monitoring port number9 which value is 10109 . You can use SNMPWALK via DUDE to check the OID’s for different ports of your switch.

Now click OK to save



Adding Switch PORT separately using IP and PROBE

Its time to add PORTs in your map so they can appear separately as showed in the title image

Go back to your MAP,
Right click and ADD new device,
Type your switch IP address, and click on Next,
Now DO NOT  click on Discover , simply click on + sign
In PROBE, Select the PORT 9 probe you created earlier
and click on Apply/OK

As showed in the image below . . .


Click on Finish.



Now you will see something like below . . .


As you can see the port number 9 is down , so the status is shown correctly.



Now you can repeat the same procedure to add as much ports you like to monitor.

Something like below image . . .





Adding LINKS to monitor port usage

You can also add LINKS to show the port usage🙂

As showed in the example below . . .

add link







After adding ports / snmp links, and other enhancements , you can see something like below image . .





I will add more methods to monitor the ports. For more info , please read more at following links

Updated: 20th October 2015

Howto check Cisco 3750 Port Status via SNMP using BASH to format the output.

<p style="text-align: left;">PORT1Q=`snmpwalk -Oqv -v1 -c COMMUNITY_NAME IP_ADDRESS`
if [ "$PORT1Q" = "1" ]; then
echo "$PORT1S"
echo "$PORT1S"
<p style="text-align: left;">

Syed Jahanzaib


  1. Hi, i have mikoritk, and Ubiquity équipement on my network. I want to know if it’s possible to monitor all of this équipement with a same software. If not, what can i use for monitor my network. Thanks in advance.

    Comment by Alex Monkam — August 20, 2013 @ 1:17 PM

    • You can use DUDE to monitor all devices on your network, specially if they have SNMP support, monitoring can be enhanced with more data to show.

      Comment by Syed Jahanzaib / Pinochio~:) — August 22, 2013 @ 4:21 PM

    • sir plz meri help karein mein internet cable ka kaam start karna chahata hun meine aik jaga linux per server bana hua dekha tha mein linux server configure karna seekhna chahata hun plz meri madad karein apka ahsan hoha meri koi help nahi kar raha hey app mujhe apna number dey dein agar aap chahein apki meherbani hogi mera naam farhan hey mera cell num hey 0321-2080078 kindly mujhe apna number sms kardein plz plz plz.

      Comment by farhan — September 29, 2013 @ 6:39 PM

  2. Assalam alaikum, can you please explain how to add Up time and Temperature for Switch or Router?

    Comment by M.Ahmed — September 2, 2013 @ 3:26 PM

    • Howto Show UPTIME

      Uptime: [string_substring(oid(“”),0,8)]

      HOWTO show Cisco ASA 5510 Cpu Usage

      Cisco ASA Cpu Usage: CPU Load 1min: [oid(“”)] %

      HOWTO show Cisco 3750 Switch Temperature

      Temperature : [oid(“”)]

      Comment by Syed Jahanzaib / Pinochio~:) — September 3, 2013 @ 8:00 AM

  3. I’m curious if you could leave a screen grab of your probe for the port up (green) / down (red) status? I cannot seem to get it to work following the examples here and in your MikroTik links. Thanks!

    Comment by Jon — June 4, 2014 @ 7:01 PM

  4. port monitor isn’t working with my scenario.. i have huawei s5700 .. i got the exact value but still its not working. and one more question how do i monitor optical transreciver via due.. please help us to configure this two…

    Comment by mirza baig — July 6, 2016 @ 12:05 AM

    • you can monitor only those devices which are reachable via Layer 3, means IP. if your transceiver supports ip, it can be monitored via dude.

      Comment by Syed Jahanzaib / Pinochio~:) — July 7, 2016 @ 3:12 PM

      • yes device is reachable through ip this is huawei s5700.. snmp is already configure in switch i have gather snmp related thing via mikrotik dude, the only thing that i want to monitor is 10gig sfp transreciever or port up down alert throufh dude via mail

        Comment by mirza baig — July 13, 2016 @ 10:25 PM

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: