Syed Jahanzaib Personnel Blog to Share Knowledge ! October 31, 2013 Monitoring Mikrotik with Linux base MRTG [References] Filed under: Linux Related Mikrotik Related — Tags: mikrotik graph mikrotik mrtg queue graph queue monitoring queue mrtg — Syed Jahanzaib / Pinochio~:) @ 2:23 PM 18 Votes I have another article that explains well about monitoring most of the mikrotik parts via nix base MRTG but it have lots of junk data too , curse upon WordPress who always messes with the coding and most of the time my hard work goes to TRASH :( I will post updates # Enabling SNMP on Mikrotik First Enable SNMP service (with public as community string or whatever you like on your mikrotik. Make sure no firewall rule is blocking SNMP traffic from/to the monitoring server. Open Terminal in mikrotik and paste the following command. Or you can configure it via going to IP > SNMP /snmp community set [ find default=yes ] addresses=0.0.0.0/0 authentication-password="" authentication-protocol=MD5 encryption-password="" encryption-protocol=DES name=public read-access=yes \ security=none write-access=no /snmp set contact=Syed-Jahanzaib enabled=yes engine-id="" location=aacable-wordpress-com trap-community=public trap-generators="" trap-target="" trap-version=1 [admin@MikroTik-2] /snmp> Now proceed further :) 1. Monitoring Mikrotik Simple Queue with Linux base MRTG (for monitoring performance and track purposes) To monitor simple QUEUE via Linux base MRTG, you can use following config as an example :D First you have to check your simple queue OID (numeric value which is used by MRTG to poll specific data from the remote server) in mikrotik. for example you have a queue to allow 100M for proxy cached marked packets. Open Terminal and print OID for Simple Queue number 0 (your can be changed, but in general Queue for proxy hit packets should be on ** TOP ** ) [admin@MikroTik] /queue simple print Flags: X - disabled, I - invalid, D - dynamic 0 ;;; Simple Queue for squid Proxy CACHE HIT Packet Allow Unlimited Bandwidth name=SQ-for-cache-hit interface=all parent=none packet-marks=Cache direction=both priority=8 queue=default-small/default-small limit-at=0/0 max-limit=100M/100M burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s total-queue=default-small Now check its OID value which will be used in MRTG to graph the values. Do remember, If you move/delete/add particular Queue , the oid value will change, simply note down new value and recreate graphs with the new values. Also on every system these OIDs are different, simply take a print oid to use them. [admin@MikroTik] /queue simple print oid Flags: X - disabled, I - invalid, D - dynamic 0 ;;; Simple Queue for squid Proxy CACHE HIT Packet Allow Unlimited Bandwidth name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.12534 bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.12534 bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.8.12534 packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.12534 packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.12534 queues-in=.1.3.6.1.4.1.14988.1.1.2.1.1.12.12534 queues-out=.1.3.6.1.4.1.14988.1.1.2.1.1.13.12534 As showed in the image below . . . Now we have to take bytes-in and bytes- ut value for graphing purposes. which is in our case are .1.3.6.1.4.1.14988.1.1.2.1.1.8.12534 .1.3.6.1.4.1.14988.1.1.2.1.1.9.12534 Now you can simply use the below CFG file to create Graphs for the mikrotik simple queue. Target[mikrotik-simple-queue-in-out]: .1.3.6.1.4.1.14988.1.1.2.1.1.8.12534&.1.3.6.1.4.1.14988.1.1.2.1.1.9.12534:public@10.0.0.1 MaxBytes[mikrotik-simple-queue-in-out]: 100000000 #Options[mikrotik-simple-queue-in-out]: bits Title[mikrotik-simple-queue-in-out]: Mikrotik QUEUE for Cache HIT PageTop[mikrotik-simple-queue-in-out]: <H1>Mikrotik QUEUE for Cache HIT</H1> #Maintainer: Syed Jahanzaib SAMPLE GRAPH FOR THE SIMPLE QUEUE MONITORING VIA MRTG 2. Monitoring CPU Usage 10 ### MIKROTIK 10.0.0.1 CPU load ### Target[10.0.0.1_cpu]: 1.3.6.1.2.1.25.3.3.1.2.1&1.3.6.1.2.1.25.3.3.1.2.1:public@10.0.0.1 AbsMax[10.0.0.1_cpu]: 100 MaxBytes[10.0.0.1_cpu]: 100 Title[10.0.0.1_cpu]: MIKROTIK CPU load PageTop[10.0.0.1_cpu]: <H1>MIKROTIK CPU load</H1> Options[10.0.0.1_cpu]: gauge,growright,nopercent, noo YLegend[10.0.0.1_cpu]: CPU load ShortLegend[10.0.0.1_cpu]: % LegendI[10.0.0.1_cpu]: CPU load (percentage) As showed in the image below . . . 3. Monitoring Active PPP Users 10 11 12 # Mikrotik PPP ACTIVE Users Target[mtpppusers]: 1.3.6.1.4.1.9.9.150.1.1.1.0&1.3.6.1.4.1.9.9.150.1.1.1.0:public@10.0.0.1 Title[mtpppusers]: Active PPP Users on MT PageTop[mtpppusers]: <H1>Active PPP Users on MT</H1> MaxBytes[mtpppusers]: 300 Colours[mtpppusers]: B#8888ff,B#8888ff,B#5398ff,B#5398ff Options[mtpppusers]: gauge,nopercent,noo,integer,growright LegendI[mtpppusers]: Active PPP Users on MT LegendO[mtpppusers]: YLegend[mtpppusers]: Active PPP Users on MT Legend1[mtpppusers]: Active PPP Users on MT Legend2[mtpppusers]: As showed in the image below . . . 4. Monitoring RB CPU Temperature 10 11 12 13 14 ### MONITORING Mikrotik CPU TEMP ### Target[mt.cpu.temp]: 1.3.6.1.4.1.14988.1.1.3.11.0&.1.3.6.1.4.1.14988.1.1.3.11.0:public@10.0.0.1 Options[mt.cpu.temp]: gauge, growright, nopercent, noinfo MaxBytes[mt.cpu.temp]: 100 Colours[mt.cpu.temp]: RED#ff4f27,Y#fffb15,RED#ff4f27,RED#fffb15 #Unscaled[mt.cpu.temp]: dwmy YLegend[mt.cpu.temp]: CPU Temprature Title[mt.cpu.temp]: Mikrotik RB CPU Temprature PageTop[mt.cpu.temp]: <H1>Mikrotik RB CPU Temprature</H1>
Monitoring Mikrotik with Linux base MRTG [References] | Syed Jahanzaib Personnel Blog to Share Knowledge !
Материал перенесён из старой базы знаний ATC-IP и оформлен в едином стиле нового сайта.