the dude

25
Syed Jahanzaib Personal Blog to Share Knowledge ! December 13, 2011 Monitoring Network with the DUDE (PC x86 or Mikrotik NPK Ver) Filed under: Mikrotik Related — Tags: aacable mikrotik dude, aacable the dude, dude custom probe, dude disk probe, dude installation, dude lotus monitoring, dude printer probe, dude temperature probe, dude tips n tricks, howto change background in the dude, Howto install dude on mikrotik routerboard, mikrotik dude, the dude, the dude exampe, the dude map — Syed Jahanzaib / Pinochio~:) @ 12:45 PM i 29 Votes Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router... 1 of 25 7/6/2015 3:10 PM

Upload: zharfanhaniforri

Post on 05-Dec-2015

66 views

Category:

Documents


10 download

DESCRIPTION

mikrotik dude

TRANSCRIPT

Page 1: the dude

Syed Jahanzaib Personal Blog to ShareKnowledge !

December 13, 2011

Monitoring Network with the DUDE (PC x86 or Mikrotik NPK Ver)

Filed under: Mikrotik Related — Tags: aacable mikrotik dude, aacable the dude, dude custom probe, dudedisk probe, dude installation, dude lotus monitoring, dude printer probe, dude temperature probe, dudetips n tricks, howto change background in the dude, Howto install dude on mikrotik routerboard, mikrotikdude, the dude, the dude exampe, the dude map — Syed Jahanzaib / Pinochio~:) @ 12:45 PM

i29 Votes

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

1 of 25 7/6/2015 3:10 PM

Page 2: the dude

MIKROTIK DUDE BASIC INSTALLATION GUIDE, yes only basic ~ Article by Syed Jahanzaib ~

CNMS - Centralized Network Monitoring & Management System !!! - JZ

Example MAP of my Office LAN

What is THE DUDE ?Answer is below > As Mikrotik Wiki defines:

The Dude is a free Monitoring application by MikroTik, which can dramatically improve the way youmanage/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.

Some customized probes used in this map:

:)

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

2 of 25 7/6/2015 3:10 PM

Page 3: the dude

Voice / Speak Alert on various target / devices down/up eventsNOC Room temperature (It alerts when temperature goes above 25)Vmware ESXi 4.0/5.0 Guest VM + windows/linux servers Power ON/Shutdown from Dude usingTool Menu with customized scripts *UPS Load / Voltages / UPS Internal TemperatureIBM Lotus Number of Mail Waiting / DB Connected Users / Availability IndexHP Printers Toner Remaining in %No. of Connected Users on each A.PDisk Free/Total Statics, Alerts when Specified partition goes above 90%Disk Read/Write Monitoring / AlertHigh Memory Monitoring AlertWindows Service Monitor on SAP ServersCisco ASA / Switches CPU Load/ Up-time / TemperatureCisco Access Point Active Connected UsersAlerts for Lotus Domino / SAP Servrs Service alert , for example if server is on but specific serviceis downWireless Link Usage MonitoringInternet / LAN Link Monitor, If the link is in full utilization i.e 4mb, the link color changes toOrange, indicating Load on the link. very useful to monitor load.

Mikrotik’s “The DUDE” LIVE Monitoring System , It shows Live View of all devices and server’s onscreen, 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 NOCRoom Temperature Goes above 25 Degree, It will show Visual Alert, Email or SMS. or if D: drive space onmail 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 MAPusing tools and custom scripts, Also I have added some customize tools/scripts to run on target deviceusing custom command , added in tool menu.

We call it CNMS, Centralized Network Monitoring SystemThanks to DUDE

You can Install the DUDE on your Windows PC , OR you can also install it on your Mikrotikx86/RouterBoard.

First Download ‘The Dude’ from

1 http://www.mikrotik.com/thedude.php

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

3 of 25 7/6/2015 3:10 PM

Page 4: the dude

For Windows PC, Get the The Dude for Windows

After download simply execute the .exe file and it will install it just like any other simple application.If youhave install it on PC, you can start by going to START / Programs / The due.

For Mikrotik ROUTERBOARD (Hardware Version), FirstGet the NPK package,

Download the .npk package for mikrotik,

(Note: Select the ver accordingly.)

After downloading .npk, upload it to Mikrotik Files section and reboot the Mikrotik, It will automaticallyadd the The Dude package in it before rebooting. Follow the image below.

1 http://download.mikrotik.com/dude-install-3.6.exe

1 http://download.mikrotik.com/dude-3.6.npk

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

4 of 25 7/6/2015 3:10 PM

Page 5: the dude

After installation, Both management is done in a same manner.You access the DUDE installed onMikrotik 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, youcan connect to Mirkotik’s dude. Same as you use Winbox to connect to any Mikrotik. You can use thedude 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, dudehave no default password,ID = adminPassword = No Password, Just Enter

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 thingsworks 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 notfound.Its best to install SNMP on all of your servers to get the maximum information like Link usage/CPU

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

5 of 25 7/6/2015 3:10 PM

Page 6: the dude

/Memory/HDD etc etc.

After it will completes the discovery, it will create a automatic layout map, Something similar to belowimage.

If you are unable to see any PC , Try adding few ips manually. If target pc ping/icmp is blocked, then youwon’t be able to see any PC in the graphs, so its be�er to use another approach /combination on “Devicename preferences”. Also check your mikrotik / target pc firewall configuration.

The above image looks Pre�y much messed up, but you can trim it or adjust it according to your flavor ,like the below

:)

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

6 of 25 7/6/2015 3:10 PM

Page 7: the dude

The DUDE tip’s n tricks

Howto ADD Machines/Devices Manually (Without Auto

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

7 of 25 7/6/2015 3:10 PM

Page 8: the dude

Discovery Mode)

Sometimes You would like to add only few targeted devices / computers on your network to be monitoredvia 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 targetdevice and click NEXT.

Now select DISCOVER to check what services target device is offering for monitoring.

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

8 of 25 7/6/2015 3:10 PM

Page 9: the dude

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 install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

9 of 25 7/6/2015 3:10 PM

Page 10: the dude

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

10 of 25 7/6/2015 3:10 PM

Page 11: the dude

Howto Change Background Image

You can change background image by going to

HOWTO ENABLE WEB BASE ACCESS

You can also View/Controll Dude via web browser. This is convenient if you have fix public ip on yourmikrotik / 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.

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

11 of 25 7/6/2015 3:10 PM

Page 12: the dude

Make sure there is no other web server running on your pc/mikrotik. If so, please change the port in aboveimage to something different , example 1234. Now open your browser and point it to your dude server.

[sourcode]

h�p://192.168.2.6

[/sourcecode]It will ask id password, Enter your credentials. (First time dude installation have no password, just enteruse 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.

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

12 of 25 7/6/2015 3:10 PM

Page 13: the dude

HOWTO 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 itscolor 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.

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

13 of 25 7/6/2015 3:10 PM

Page 14: the dude

HOWTO Show any OID on Device

Some of the examples are taken from the Mikrotik DUDE forum.Special thanks to Mr. Lebowski

Right click on your device and select APPEARANCE, click on LABEL: and add this OID (For exampleonly, change the OID as your requirement)

OR

if you want to divide the value to be displayed, use following formula

HOWTO Remote Shutdown any PC using DUDE Tools

(generally for AD environment)

Open Dude console, from left menu, goto tools, and click on plus sign + to add new tool,the following

I will add more snaps and info of some live networks where I deployed this beautiful tool.

1 NOC Room Temperature : [oid("1.3.6.1.4.1.534.1.6.5.0")]

1 Temperature: [oid("1.3.6.1.4.1.13400.2.62.2.1.2.0")/100]

123

<blockquote><strong>Type</strong>: Executable<strong>Name</strong>: Shutdown Target<strong>Command</strong>: c:\windows\system32\shutdown.exe -s -f -t 30 /m \\[Device.FirstAddress]<

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

14 of 25 7/6/2015 3:10 PM

Page 15: the dude

One Link:

h�ps://aacable.wordpress.com/2012/07/02/the-dude-show-us-your-map-series/

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 new Probe.

Now add this probe in target windows device in service section. That’s it. Now if the C: Drive goes above85%, it will alert, you can tag voice/visual/email/sms alert with it. I use VOICE alert NOTE: The OID for the C: drive can be different on your system , it depends on the drives you have inyour 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 itsbe�er to check it in snmp section of device properties.

:)

12345

Function.

Name:drivecCode :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,1

123456

Name:Low Space in C DriveType: FunctionAvailable:drivec()FalseError:if(drivec()False,if(drivec() < 85, , concatenate(Warning: Drive C = , drivec(), %)), FailedValue:drivec()Unit: %

:D

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

15 of 25 7/6/2015 3:10 PM

Page 16: the dude

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 readwrite time counters.e.g: h�ps://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.

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.

123456

Probe Name: lotus_notes_testType: FunctionAvailable: 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 detectedValue: 1Unit: running

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

16 of 25 7/6/2015 3:10 PM

Page 17: the dude

HOWTO check if specific SERVICE is running or not

Create New Probe and tag it with your required target device.

Note: Replace Telnet with the service name your want to monitor. Type the full name of the service yousee in the services console. The name may be case-sensitive! Write the file name the same as you see it inthe Services Console.

HOWTO Create Alert if specific OID result gets belowSpecific Digit/% like NOC room temperature

If you want to monitor specific OID result and if it gets below or above your pre-defined number, itshould alert, Use the below probe (I used this probe to monitor my data center room temperature usingtemperature device, if the temperature goes above 25, it alerts using sms/voice alert)

and if you want to divide the snmp result by 100 , then you have to first create function likefollowing.

123456

Probe Name: check_telnet_serviceType: FunctionAvailable: if(array_find(oid_column("1.3.6.1.4.1.77.1.2.3.1.1"),"Telnet")0, 1, 0)Error: if(array_find(oid_column("1.3.6.1.4.1.77.1.2.3.1.1"),"Telnet")0, "", "Telnet not detectedValue: 1Unit:

123456

Name: NOC Room Temperature AlertType: FunctionAvailable: 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 / SJz")Value: 1.3.6.1.4.1.534.1.6.5.0Unit: C

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

17 of 25 7/6/2015 3:10 PM

Page 18: the dude

then create a probe with following data.

1234567

Name: NOC Room TempType Function:Agent: DefaultAvailable: getTemperature()Error: if(getTemperature()<25, "", "NOC Room Temperature above 25 c, Please check A.C")Value: getTemperature()Unit: C

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

18 of 25 7/6/2015 3:10 PM

Page 19: the dude

HOWTO show ping result on device label

If you want to show the ping result on your device label, Right click on device , select appearance, inLablel, paste the following code:

[array_element(ping(device_property(“FirstAddress”)),0)] ms

HOWTO Check for High Delay via Ping Function/Probe

If you want to monitor any device ping delay ms, for example if ping ms delay to any internet linkincreases above 600 ms , then it should alert, use the following function/probe.

First add new function

Now create probe and tag the ping_r� function in it.

Now tag it with the device in services section.

1234

Function:Name: ping_rttDescription: Returns the round-trip time of a ping request to the FirstAddres of a deviceCode: round(array_element(ping(device_property("FirstAddress")), 0))

123456

Probe Name: Ping DelayType: FunctionAvailable: and(device_property("FirstAddress") <> "", ping_rtt()>-1)Error: if(and(ping_rtt()>-1, ping_rtt()<200), "", if(ping_rtt()>-1, concatenate("Latency above Value: ping_rtt()Unit: ms

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

19 of 25 7/6/2015 3:10 PM

Page 20: the dude

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)

HOWTO show number of connected users on Cisco AP

1 TONER [oid("1.3.6.1.2.1.43.11.1.1.9.1.1")/0.6000*100] % Remaining

1 Active WiFi Users: [oid("1.3.6.1.4.1.9.9.273.1.1.2.1.1.1")]

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

20 of 25 7/6/2015 3:10 PM

Page 21: the dude

HOWTO show number of PPP ACTIVE users on MikrotikRouterOS

HOWTO show Disk C: & D: Free/Total statistics on Device

Lable

HOWTO show Cisco ASA 5510 Cpu Usage & Connections

1 Active PPP Users: [oid("1.3.6.1.4.1.9.9.150.1.1.1.0")]

1 Disk [Free/Total] 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"))

12

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 install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

21 of 25 7/6/2015 3:10 PM

Page 22: the dude

HOWTO show Cisco 3750 Switch Temperature

HOWTO show EATON UPS 9155 : Temperature/Volts/Load

1 Temperature : [oid("1.3.6.1.4.1.9.9.13.1.3.1.3.1006")]

1234

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")]

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

22 of 25 7/6/2015 3:10 PM

Page 23: the dude

EATON Powerware Environment Monitoring Probe [EMP]

EMERSON LIBERT 10kva UPS Monitoring Probe [EMP]

HOWTO show all CPU’s Load

12

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")]

12345678

INPUT Volt: [oid("1.3.6.1.4.1.13400.2.16.2.2.1.0")/100]LOAD [oid("1.3.6.1.4.1.13400.2.16.2.3.6.0")/100] %Battery Volt [oid("1.3.6.1.4.1.13400.2.16.2.5.1.0")/100]Backup Time: [oid("1.3.6.1.4.1.13400.2.16.2.5.2.0")]

# Temperature & Humidity are not builtin feature, separate sensor module should be attached withTemperature: [oid("1.3.6.1.4.1.13400.2.62.2.1.2.0")/100]Humidity: [oid("1.3.6.1.4.1.13400.2.62.2.1.3.0")/100]

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

23 of 25 7/6/2015 3:10 PM

Page 24: the dude

IBM Lotus Domino Server

Howto Show System/Device UPTIME

.

Howto Send SMS alerts via DUDE.

h�ps://aacable.wordpress.com/2013/11/02/mikrotik-dude-sms-notification/

1 Load on [array_size(oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrDevice.hrProcessorTable.h

123

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")]

1 Uptime: [string_substring(oid("1.3.6.1.2.1.1.3.0"),0,8)]

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

24 of 25 7/6/2015 3:10 PM

Page 25: the dude

Regard’s~ Syed Jahanzaib ~

Comments (44)The Silver is the New Black Theme. Blog at WordPress.com.

Follow

Follow “Syed Jahanzaib Personal Blog to Share Knowledge !”

Build a website with WordPress.com

Howto install dude on mikrotik routerboard | Syed Jahanzaib Personal Blo... https://aacable.wordpress.com/tag/howto-install-dude-on-mikrotik-router...

25 of 25 7/6/2015 3:10 PM