Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jun 26, 2019 11:16 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 106 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject: Mikrotik RouterOS Statistics (Update 02/10/2009)
PostPosted: Fri Jan 18, 2008 2:34 pm 
Offline
Cacti User
User avatar

Joined: Sun Jul 24, 2005 12:20 pm
Posts: 121
Location: Ireland, Dublin
One year after my last post in this forum I come back with lots of graphs that have to do with Mikrotik RouterOs. Many of them are based on older templates of mine. A lot of new work has been based on Marlow's work with Wireless Registration Tables and Queues.


Cacti Version: cacti-0.8.7c
RouterOs Version: 2.9.x & 3.0.x



Graph Support For:
    System
    HDD
    CPU
    Memory
    Uptime

    General
    Active PPP Connections
    Number of Routes
    Number of Active Wireless Connections (Linux Only)
    Number of Current ARP Entries (Linux Only)

    Wireless Registration Tables (per Wireless Client)
    Signal Strength
    Data Rates
    Packets
    Traffic (bits and Bytes)

    Wireless Client
    Signal Strength
    Data Rates
    Frequency 802.11b/g
    Frequency 802.11a

    Queues
    Simple Packets
    Simple Traffic (bits and Bytes)
    Tree Packets
    Tree Traffic (bits and Bytes)

Installation:
A. Unzip somewhere the attachment (mikrotik-20090210.zip)
B. Copy:
    1. zipdir/scripts/mikrotik_wireless_interfaces.php -> cacti-web-dir/scripts/mikrotik_wireless_interfaces.php
    2. zipdir/scripts/mikrotik_ppp_connections.php -> cacti-web-dir/scripts/mikrotik_ppp_connections.php
    3. zipdir/resources/script_server/mikrotik_wireless_interfaces.xml -> cacti-web-dir/resources/script_server/mikrotik_wireless_interfaces.xml
    4. zipdir/resources/snmp_queries/mikrotik_queue_simple.xml -> cacti-web-dir/resources/snmp_queries/mikrotik_queue_simple.xml
    5. zipdir/resources/snmp_queries/mikrotik_queue_tree.xml -> cacti-web-dir/resources/snmp_queries/mikrotik_queue_tree.xml
    6. zipdir/resources/snmp_queries/mikrotik_wireless_client.xml -> cacti-web-dir/resources/snmp_queries/mikrotik_wireless_client.xml
C. Import zipdir/templates/cacti_host_template_mikrotik.xml -> http://cacti.url.path/templates_import.php
D. Now just Add a New Device and select "Mikrotik" on Host Template


Notes:
The Mikrotik Host Template contains all of its dependencies, like Interface Statistics
All new templates have nothing to do with older. Are totally incompatible.


Changelog:
* fixes on old templates of mine
* template variable names corrected to follow cacti naming style
* added support for Marlow's work on wireless registration tables
* added more graphs for wireless registration tables
* added support for Arci's work on Queue Trees
* added more graphs for Queue Trees
* added graphs for Simple Queue
* added graphs for Routes & Active PPP Connections


Templates are based on:

Development, Cacti Templates
http://doc.thewan.net/wiki/index.php/Development

Mikrotik SNMP Queue Tree Monitor
http://forums.cacti.net/viewtopic.php?t=10373

Mikrotik RouterOS Statistics (Update 01/21/2006)
http://forums.cacti.net/viewtopic.php?t=8855

Mikrotik RouterOS Registration Tables (Update 11/21/2006)
http://forums.cacti.net/viewtopic.php?t=17936


Attachments:
File comment: Version 02/10/2009
mikrotik-20090210.zip [36.43 KiB]
Downloaded 20285 times
File comment: Version 01/18/2008
cacti_mikrotik_template.zip [30.55 KiB]
Downloaded 14522 times

_________________
[i]Born to be online![/i]


Last edited by mojiro on Mon Feb 09, 2009 8:09 pm, edited 4 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 19, 2008 4:02 pm 
Offline
Cacti User
User avatar

Joined: Sun Jul 24, 2005 12:20 pm
Posts: 121
Location: Ireland, Dublin
Using this template

OID Tree, Branch Counter
http://forums.cacti.net/viewtopic.php?t=25360

You may count varius things based on OID's. There is no reason to create a unique template for each countable thing, so you may use this generic.

ex. providing the following OID's you will get...
ARP Entries: 1.3.6.1.2.1.4.22.1.4
Mikrotik Neighbors (v3.x): .1.3.6.1.4.1.14988.1.1.11.1.1.6

_________________
[i]Born to be online![/i]


Top
 Profile  
 
 Post subject: byte to bit
PostPosted: Mon Jan 21, 2008 9:00 pm 
Offline

Joined: Tue May 02, 2006 5:54 am
Posts: 6
Hi mojiro,

Thanks for the script. It work properly in my cacti :D.

I have one question.

How i can change the unit for simple queue traffic from byte to bit ? :roll:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 22, 2008 4:12 am 
Offline
Cacti User
User avatar

Joined: Sun Jul 24, 2005 12:20 pm
Posts: 121
Location: Ireland, Dublin
it needs the "hard way"

goto
Console -> Templates -> Graph Templates

Tick
Mikrotik - Queue - Simple Traffic (bytes/sec, Total Bandwidth)
Mikrotik - Queue - Tree Traffic (bytes/sec, Total Bandwidth)
Mikrotik - Wireless - RegTable Traffic (bytes/sec, Total Bandwidth)

Choose an action: Duplicate
Click [GO]

at
Title Format:
Use

Mikrotik - Queue - Simple Traffic (bits/sec, Total Bandwidth)
Mikrotik - Queue - Tree Traffic (bits/sec, Total Bandwidth)
Mikrotik - Wireless - RegTable Traffic (bits/sec, Total Bandwidth)

After go again to Graph Templates and open one-by-one the new templates.

In each Template you will open each Item (ex. (traffic_in): Inbound) and you will select Turn Bytes into bits from "CDEF Function"

At last you will change the "Vertical Label" of each Template to Bits per second

_________________
[i]Born to be online![/i]


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 22, 2008 4:15 am 
Offline
Cacti User
User avatar

Joined: Sun Jul 24, 2005 12:20 pm
Posts: 121
Location: Ireland, Dublin
I'm trying to make new templates :P

_________________
[i]Born to be online![/i]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 08, 2008 2:56 am 
Offline
Cacti User
User avatar

Joined: Mon Nov 04, 2002 9:15 am
Posts: 110
Location: ACEH
mojiro wrote:
I'm trying to make new templates :P


Any update about your new templates?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 08, 2008 3:59 am 
Offline
Cacti User
User avatar

Joined: Sun Jul 24, 2005 12:20 pm
Posts: 121
Location: Ireland, Dublin
sizulku wrote:
mojiro wrote:
I'm trying to make new templates :P


Any update about your new templates?


I have made bits & bytes traffic graphs for all(simple/tree queues, reg tables)

For the moment I work on creating graphs for PPP connections.

Also I'm thinkin on making a script that collects info for all queues in a tree and outputs them in the same graph aggregated.

Do you want me to export, a patch instead of the final work? It is possible too.

_________________
[i]Born to be online![/i]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 08, 2008 6:24 am 
Offline
Cacti User
User avatar

Joined: Mon Nov 04, 2002 9:15 am
Posts: 110
Location: ACEH
mojiro wrote:
Also I'm thinkin on making a script that collects info for all queues in a tree and outputs them in the same graph aggregated.

That's great. I would love to see it.


mojiro wrote:
Do you want me to export, a patch instead of the final work? It is possible too.

Any estimated date for final release? a patch also would be great. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 13, 2008 10:10 pm 
Offline

Joined: Tue May 02, 2006 5:54 am
Posts: 6
I have problem with my setup.

I have success add one queue to my mikrotik. and finished make the graph appear.

when i insert the second queue, the list on data query is missing.

Image

When i clik the debug mode i can see the queue is existing.

Image

As you can see, the first query is planet and the second is eranet

Please help.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 08, 2008 1:17 am 
Offline

Joined: Fri Sep 23, 2005 11:33 pm
Posts: 24
Does this support packets per second on ethernet interfaces?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 9:13 am 
Offline

Joined: Tue Aug 07, 2007 7:26 am
Posts: 15
Great job (again) mojiro!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 1:16 am 
Offline
Cacti User

Joined: Fri Oct 20, 2006 3:58 pm
Posts: 71
Great job! Thank you.

Just one queston, is there no way to read out SNR and CCQ on MikroTik?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 08, 2008 6:36 am 
Offline

Joined: Tue Apr 08, 2008 6:11 am
Posts: 2
Location: Orel, Russia
The registration table template does not work on MikroTik RouterOS 3.6 + RouterBOARD 333 under Cacti v 0.8.7b. The appropriate data query runs without any errors but it does not return any data.

Code:
Mikrotik - Wireless - Registration Table  (Verbose Query)  Uptime Goes Backwards  Success [0 Items, 0 Rows]

Code:
Data Query Debug Information

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/local/php5/bin/php -q /usr/local/cacti/scripts/mikrotik_wireless_interfaces.php cacti 10.1.0.2 index'
+ Executing script query '/usr/local/php5/bin/php -q /usr/local/cacti/scripts/mikrotik_wireless_interfaces.php cacti 10.1.0.2 query ifName'
+ Executing script query '/usr/local/php5/bin/php -q /usr/local/cacti/scripts/mikrotik_wireless_interfaces.php cacti 10.1.0.2 query ifIndex'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'

Is there any solution?

I am not the only who has such troubles. There are several posts about this problem on MikroTik forum.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 09, 2008 1:24 am 
Offline

Joined: Tue Apr 08, 2008 6:11 am
Posts: 2
Location: Orel, Russia
dansoftware wrote:
The registration table template does not work on MikroTik RouterOS 3.6 + RouterBOARD 333 under Cacti v 0.8.7b. The appropriate data query runs without any errors but it does not return any data.

Solution is simple. PHP was built without SNMP support. That’s why "/usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php" didn’t work.
Code:
Data Query Debug Information

+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /usr/local/cacti/scripts/mikrotik_wireless_interfaces.php cacti 10.1.0.2 index'
+ Executing script query '/usr/bin/php -q /usr/local/cacti/scripts/mikrotik_wireless_interfaces.php cacti 10.1.0.2 query ifName'
+ Found item [ifName='wlan1:1'] index: 00:0B:6B:57:47:61
+ Found item [ifName='wlan1:2'] index: 00:0B:6B:57:47:12
+ Found item [ifName='wlan1:4'] index: 00:0B:6B:57:43:EB
+ Executing script query '/usr/bin/php -q /usr/local/cacti/scripts/mikrotik_wireless_interfaces.php cacti 10.1.0.2 query ifIndex'
+ Found item [ifIndex='00:0B:6B:57:47:61'] index: 00:0B:6B:57:47:61
+ Found item [ifIndex='00:0B:6B:57:47:12'] index: 00:0B:6B:57:47:12
+ Found item [ifIndex='00:0B:6B:57:43:EB'] index: 00:0B:6B:57:43:EB
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/local/cacti/resource/script_server/mikrotik_wireless_interfaces.xml'

Code:
Mikrotik - Wireless - Registration Table  (Verbose Query)  Uptime Goes Backwards  Success [6 Items, 3 Rows]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 16, 2008 2:55 am 
Offline

Joined: Sat Jan 05, 2008 2:10 pm
Posts: 4
Hi all....

this are amaizing tamplates, finaly complet graphing for mikrotik...

question: is there a way to set graph tamplate Mikrotik - Wireless - RegTable Data Rates and Mikrotik - Wireless - RegTable Signal Strength to show hostname too ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 106 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group