Wednesday, 7 June 2017

MIKROTIK:-Manually Created queue added in PRTG for monitoring .

If you want to add your manually created queue in PRTG for monitoring purpose then you have to add that queue in PRTG using OID value .



OID -Object Identifier .

OIDs are generally provided by the hardware manufacturers or can be found in so-called OID repositories, where collections of MIB trees and the corresponding OIDs can be accessed. PRTG reads these OIDs and appoints them the device they belong to. That means that it monitors a selected device and its specific OID.

Using OID you can monitor all the things of mikroitk . Like .Bandwidth Utilization,Cpu Usage,Memory usage.Etc.Etc..





Hosts receive SNMP generated messages on UDP port 161 (except the trap messages, which are received on UDP port 162).

Please fnd the details below which information I have collected from mikrotik Official website for 
better understanding .

OID stands for an object identifier, which is a data type specifying an authoritatively named object. An object identifier is a sequence of integers separated by decimal points. These integers traverse a tree structure, similar to the DNS or a Unix filesystem. There is an unnamed root at the top of the tree where the object identifiers start. All variables in the MIB start with the object identifier 1.3.6.1.2.1. Each node in the tree is also given a textual name. The names of the MIB variables are the numeric object identifiers, all of which begin with 1.3.6.1.2.1. You can use the SNMP protocol to get statistics from the router in these submenus:



To see the OID for each services .

/interface
/interface pc
/interface wavelan
/interface wireless
/interface wireless registration-table
/queue simple
/queue tree
/system identity
/system license
/system resource



Lets Start the configuration .



Step-1
Please find the OID of your quees .



[admin@ngc-01] > /queue simple print    
Flags: X - disabled, I - invalid, D - dynamic 
 0    name="PRTG" target=13.13.13.2/32 parent=none packet-marks="" priority=8/8 
      queue=default-small/default-small limit-at=0/0 max-limit=4M/4M 
      burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1 

 1    name="LAX" target=13.13.13.3/32 parent=none packet-marks="" priority=8/8 
      queue=default-small/default-small limit-at=0/0 max-limit=4M/4M 
      burst-limit=0/0 burst-threshold=0/0 burst-time=0s/0s bucket-size=0.1/0.1 


Here , In my scenario I have created 2 queue in SNMP for monitoring .

[admin@ngc-01] > /queue simple print oid
Flags: X - disabled, I - invalid, D - dynamic 
 0    name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.64 
      bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.64 
      bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.9.64 
      packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.64 
      packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.64 
      queues-in=.1.3.6.1.4.1.14988.1.1.2.1.1.12.64 
      queues-out=.1.3.6.1.4.1.14988.1.1.2.1.1.13.64 

 1    name=.1.3.6.1.4.1.14988.1.1.2.1.1.2.65 
      bytes-in=.1.3.6.1.4.1.14988.1.1.2.1.1.8.65 
      bytes-out=.1.3.6.1.4.1.14988.1.1.2.1.1.9.65 
      packets-in=.1.3.6.1.4.1.14988.1.1.2.1.1.10.65 
      packets-out=.1.3.6.1.4.1.14988.1.1.2.1.1.11.65 
      queues-in=.1.3.6.1.4.1.14988.1.1.2.1.1.12.65 
      queues-out=.1.3.6.1.4.1.14988.1.1.2.1.1.13.65 





Step-2

Go To the PRTG system and create the below things .

1-Before you add a sensor you have to add that mikroitk  into your PRTG server .



Command to configure the SNMP in Mikrotik .


/snmp
set contact="Mikroitk NAS" enabled=yes location=NOC_Room trap-generators=\
    interfaces trap-target=13.13.13.2


Step-3.

After Snmp Configuration in mIkoritk then you have to add that device in PRTG Server .

Go To>Local Probe>Add Device .


Now you will be able to ADD the  Censer.

Right Click On the Device and Add the censors .Please find the  below details for complete configuration .






You Have to use this OID which is shown in below picture .And Also on above I have mentioned the OID of my queues ,




Once you will be completed the above steps the censer will be added in your PRTG censers list under this mikroitk Device.and It will  detect automatically to the mikrotik queues which you have added .


Now you can check the censer and you can check the  usage bandwidth as well .



No comments:

Post a Comment