logo

Mikrotik the DUDE

en March 24 , 2020
What is THE DUDE ?
The Dude is a Monitoring application by MikroTik, which can dramatically improve the way you manage/monitor your network environment. It will automatically scan all devices within specified subnets, Draw and Layout a map of your networks, monitor services of your devices and execute actions based on device state changes.
Mikrotik's "The DUDE" LIVE Monitoring System , It shows Live View of all devices and server's on screen, Auto Refreshes at defined intervals,
GREEN icon shows target is Active & Healthy,
ORANGE shows one or more probes failed to poll query any specific counter/oid,
RED means the target device is not reachable via network or powered off.
With some my of my Customized Advance Monitoring Probes Like UPS Temperature, KESC Voltages IN , NOC Room Temperature, HDD Monitor, I have also made some Custom Alerts, For Example if NOC Room Temperature Goes bove 25 Degree, It will show Visual Alert, Email or SMS. or if D: drive space on mail server goes above 80% it will alert me, If a targeted service on specific server stop, it visually alerts. Voice Speak Alert for various counters. Very good and advance Monitoring System, It can Shutdown and POWER ON any system on MAP using tools and custom scripts, Also I have added some customize tools/scripts to run on target device using custom command , added in tool menu.
We call it CNMS, Centralized Network Monitoring System .

Pre installation Inventory advisory host:
Make a list of devices to monitor:
Make sure no firewall or IPS system is blocking you on the network.
Make an priority on the hosts eq. host high, medium, low impact
Note the neighbors on the network for that host so that if a switch fails the admin is not overpowered with all the networks behind that switch. Keep in mind when you change the network config
Keep in mind the bandwidth usage
After installation make the services available within the dude according to the used services by inventory
After installation make the device types based on the above credentials per host

Install THE DUDE
You can Install the DUDE on your Windows PC , OR you can also install it on your Mikrotik x86/RouterBoard.
First Download 'The Dude' from http://www.mikrotik.com/thedude.php
For Windows PC, Get the The Dude for Windows http://download.mikrotik.com/dude-install-3.6.exe
After download simply execute the .exe file and it will install it just like any other simple application.If you have install it on PC, you can start by going to START / Programs / The due.
For Mikrotik ROUTERBOARD (Hardware Version), First Get the NPK package, Download the .npk package for mikrotik, http://download.mikrotik.com/dude-3.6.npk (Note: Select the ver accordingly.)
After downloading .npk, upload it to Mikrotik Files section and reboot the Mikrotik, It will automatically add the The Dude package in it before rebooting. Follow the image below.
After installation, Both management is done in a same manner. You access the DUDE installed on Mikrotik by using your windows base dude to connect to mikrotik.
If you are running the DUDE on PC, you can start by going to START / Programs / The due
If you are running the DUDE on Mikrotik, first install the dude on your windows pc, then using it, you can connect to Mirkotik's dude. Same as you use Winbox to connect to any Mikrotik. You can use the dude on your windows to connect to any dude all over the network.
Ok execute the dude. You will be asked for the credentials, Just like Mikrotik default installation, dude have no default password,
Now you will The Dude main screen. Just for an example, I will add simple Network by using Auto DISCOVERY. You can later create your own desired network MAP once you understand HOW things works in dude.
Use your local subnet series. Also click on 'LAYOUT MAP AFTER DISCOVERY COMPLETE'.
Remove un-necessary services from SERVICES menu, so you will not get red icon if the services not found.
Its best to install SNMP on all of your servers to get the maximum information like Link usage/CPU/Memory/HDD etc etc.
After it will completes the discovery, it will create a automatic layout map, Something similar to below image
If you are unable to see any PC , Try adding few ips manually. If target pc ping/icmp is blocked, then you won't be able to see any PC in the graphs, so its better to use another approach /combination on 'Device name preferences'. Also check your mikrotik / target pc firewall configuration.
The above image looks Pretty much messed up, but you can trim it or adjust it according to your flavor, like the example one below

The DUDE tips n tricks

Howto ADD Machines/Devices Manually (Without Auto Discovery Mode)
Sometimes You would like to add only few targeted devices / computers on your network to be monitored via dude.
To do so follow the instructions showed in the below screenshots.
On the Network MAP screen, Click on + sign, then select Device. Now enter IP address of your target device and click NEXT.
Now select DISCOVER to check what services target device is offering for monitoring.
Now add another device as shown in above images.
Now add Network ICON so that we can connect both devices for link monitoring.
Now the real part, Again Click on + sign and click LINK to create link between device and network icon.

Howto Change Background Image
You can change background image by going to

Howto enable web based access
You can also View/Controll Dude via web browser. This is convenient if you have fix public ip on your mikrotik / pc where due is hosted, you can monitor your network all over globe using browser only.
First you have to enable Web Service in DUDE.
Make sure there is no other web server running on your pc/mikrotik. If so, please change the port in above image to something different , example 1234. Now open your browser and point it to your dude server.
http://URL_of_Mikrotik:1234
It will ask id password, Enter your credentials. (First time dude installation have no password, just enter use admin without any password, and then you can change password from ADMIN section.
Now click on MAPS > Network Map & you will be redirected to your network map. See the below image.

Show Link Capacity with color changing on full usage
If you want to monitor link bandwidth usage, and you want to configure that if the link is used fully its color should be changed as showed in the image below.
take properties of link , and tick on 'speed' and define the value you want to monitor. for example 1mb as showed in the image below.

The Dude Script examples from the web.

Howto Show any OID on Device
Right click on your device and select APPEARANCE, click on LABEL: and add this OID (For example only, change the OID as your requirement)
NOC Room Temperature : [oid("1.3.6.1.4.1.534.1.6.5.0")]

Howto Remote Shutdown any PC
Open Dude console, from left menu, goto tools, and click on plus sign + to add new tool,the following
Type: Executable
Name: Shutdown Target
Command: c:\windows\system32\shutdown.exe -s -f -t 30 /m \\[Device.FirstAddress]

Howto add probe for disk like C: & D:
To monitor C: or D: drive for space alert, First create Function, then create probe and use the function. then add this probe to device
Now create an new Function:
name: drivec
Code: if(array_size(oid_column("1.3.6.1.2.1.25.2.3.1.6",10,5)),round((oid("1.3.6.1.2.1.25.2.3.1.6.1",10,5)/oid("1.3.6.1.2.1.25.2.3.1.5.1",10,5))*100),"False")
Now create an new Probe.
Name:Low Space in C Drive
Type: Function
Available:drivec()<>"False"
Error:if(drivec()<>"False",if(drivec() < 85, "", concatenate("Warning: Drive C = ", drivec(), "%")), "Failed to read Drive C the server might be down")
Value:drivec()
Unit: %
Now add this probe in target windows device in service section. That's it. Now if the C: Drive goes above 85%, it will alert, you can tag voice/visual/email/sms alert with it. The OID for the C: drive can be different on your system , it depends on the drives you have in your system, for example I used the 1.3.6.1.2.1.25.2.3.1.6.1 , but you may have 1.3.6.1.2.1.25.2.3.1.6.2 , so its better to check it in snmp section of device properties.

Howto show Disk Read & Write Time
You have to first install snmptools and add disk counters in the ini file in order to retrieve the disk read write time counters.e.g: http://aacable.wordpress.com/2012/07/25/using-snmptools-to-monitor-disk-read-write-time-win2008-6432-bit / Disk Read / Write Time C: & D: [string_substring(oid("1.3.6.1.4.1.15.1"),0,3)] / [string_substring(oid("1.3.6.1.4.1.15.2"),0,3)]

Howto check if specific program is running or not [using taskmgr list]
Create New Probe and tag it with your required target device.
Probe Name: lotus_notes_test
Type: Function
Available: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "notes2.exe")>0, 1, -1)
Error: if(array_find(oid_column("1.3.6.1.2.1.25.4.2.1.2"), "notes2.exe")>0, "", "notes2.exe not detected by SNMP probe")Notes not running on zaib pc")
Value: 1
Unit: running
Note: Replace notes2.exe with your require files name you want to monitor. The name is case-sensitive! Write the file name the same as you see it in the Windows Task Manager List.

Howto check if specific SERVICE is running or not
Create New Probe and tag it with your required target device.
Probe Name: check_telnet_service
Type: Function
Error: if(array_find(oid_column("1.3.6.1.4.1.77.1.2.3.1.1"),"Telnet")>0, "", "Telnet not detected by SNMP probe")Value: 1
Value: 1
Unit:
Note: Replace Telnet with the service name your want to monitor. Type the full name of the service you see in the services console. The name may be case-sensitive! Write the file name the same as you see it in the Services Console.

Howto Create Alert if specific OID result gets below Specific Digit/%
If you want to monitor specific OID result and if it gets below or above your pre-defined number, it should alert, Use the below probe (I used this probe to monitor my data center room temperature using temperature device, if the temperature goes above 25, it alerts)
Name: NCO Room Temperature Alert
Type: Function
Available: if(oid("1.3.6.1.4.1.534.1.6.5.0")>0, 1, -1)
Available: if(oid("1.3.6.1.4.1.534.1.6.5.0")<25, "", "NOC Room Temp Over 25, Turn ON Extra AC")
Value: 1.3.6.1.4.1.534.1.6.5.0
Unit: C

Howto check HP 2420n Toner Cartridge
On device label, use the following oid [Make sure you have enabled the snmp on the printer and in the device snmp section)
TONER [oid("1.3.6.1.2.1.43.11.1.1.9.1.1")/0.6000*100] % Remaining

Howto show number of connected users on Cisco AP
Active WiFi Users: [oid("1.3.6.1.4.1.9.9.273.1.1.2.1.1.1")]

Howto show number of PPP ACTIVE users on Mikrotik RouterOS
Active PPP Users: [oid("1.3.6.1.4.1.9.9.150.1.1.1.0")]

Howto show Disk C: & D: Free/Total statistics on Device Lable
Disk Space: C:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.1")-
oid("1.3.6.1.2.1.25.2.3.1.6.1"))*oid("1.3.6.1.2.1.25.2.3.1.4.1"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.1")*oid("1.3.6.1.2.1.25.2.3.1.4.1")/1024)/1024)/1024)] GB ** D:\=[round(((((oid("1.3.6.1.2.1.25.2.3.1.5.2")-
oid("1.3.6.1.2.1.25.2.3.1.6.2"))*oid("1.3.6.1.2.1.25.2.3.1.4.2"))/1024)/1024)/1024)]/[round(((oid("1.3.6.1.2.1.25.2.3.1.5.2")*oid("1.3.6.1.2.1.25.2.3.1.4.2")/1024)/1024)/1024)] GB

Howto show Cisco ASA 5510 Cpu Usage & Connections
Cisco ASA Cpu Usage: CPU Load 1min: [oid("1.3.6.1.4.1.9.9.109.1.1.1.1.5.1")] %
Total Connections: [oid("1.3.6.1.4.1.9.9.147.1.2.2.2.1.5.40.6")]

Howto show Cisco 3750 Switch Temperature
Temperature : [oid("1.3.6.1.4.1.9.9.13.1.3.1.3.1006")]

Howto show EATON UPS 9155 : Temperature/Volts/Load
UPS Temp: [oid("1.3.6.1.4.1.534.1.6.1.0")]
Volts: [oid("1.3.6.1.2.1.33.1.3.3.1.3.1")]
LOAD [oid("1.3.6.1.2.1.33.1.4.4.1.5.1")] %
Backup Time Remaining: [oid("1.3.6.1.2.1.33.1.2.3.0")]
EATON Powerware Environment Monitoring Probe [EMP]
NOC Room Temperature : [oid("1.3.6.1.4.1.534.1.6.5.0")]
NOC Room Humidity : [oid("1.3.6.1.4.1.534.1.6.6.0")]

Howto show all CPU's Load
Load on [array_size(oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad"))] CPU('s): [oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorLoad")] IBM Lotus Domino Server
Mail Waiting: [oid("1.3.6.1.4.1.334.72.1.1.4.6.0")]
Server Availability Index: [oid("1.3.6.1.4.1.334.72.1.1.6.3.19.0")]
Lotus DB Connected Users: [oid("1.3.6.1.4.1.334.72.1.1.6.3.6.0")]

Howto Show System/Device UPTIME
Uptime: [string_substring(oid("1.3.6.1.2.1.1.3.0"),0,8)]

Howto Where to add/place mib files on the dude
File that were previously generated by server like default mibs/images/etc on first server startup are now shown in "(data-path)/files/default" directory as symlinks and are usable in read-only mode. In order to avoid deletion or corruption of these default resources.
Your custom uploaded mibs/images/etc need to be stored in: "(data-path)/files/" directory.
© Copyright 2020 PA2JFX      Hosted by Strato B.V.