Page 1 of 1

cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Fri Jan 18, 2008 9:46 pm
by mojiro
Mikrotik RouterOS Statistics (Update 02/10/2009)
http://forums.cacti.net/viewtopic.php?t=25349
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

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Jan 18, 2008 9:55 pm
by rpingar
I am using an your old script.
Do you support the turbo wireless rate of 96 and 108?

Regards
Ros

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Jan 18, 2008 10:28 pm
by mojiro
I am using an your old script.
Do you support the turbo wireless rate of 96 and 108?

Regards
Ros
:shock: where are that ?
I have seen no option like that until now!

What kind of hardware/software do you have ?

Is it possible to provide me read access to your mikrotik router that has 96 & 108 mbps data rate ?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Jan 30, 2008 12:22 am
by archon
Hi
I have installed package on my cacti but it doesn't want to cooperate :(
When i have added a host, Cacti displayed:

Image

Nothing but SNMP Interface Statistics. Of course on MT there are some Queues (simple and tree) and some wireless clients so anything should be displayyed in Cacti.

When i tryed to create a Data Sources for the same host:

Image

Any ideas what's wrong?
Cacti Version 0.8.7a

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Jan 30, 2008 11:07 am
by mojiro
please click "verbose query" at device's page and paste here the debug output

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Jan 30, 2008 11:57 am
by archon
The problem was one missing file from template. Now queues and wireless client are OK, but registration table still not. When i run the querry manually it returns nothing, but snmpwalk -c cacti -v 1 1.2.3.4 .1.3.6.1.4.1.14988.1.1.1.2.1 returned correct data:
SNMPv2-SMI::enterprises.14988.1.1.1.2.1.3.0.14.142.18.92.237.4 = INTEGER: -75
SNMPv2-SMI::enterprises.14988.1.1.1.2.1.4.0.14.142.18.92.237.4 = Counter32: 240537599
SNMPv2-SMI::enterprises.14988.1.1.1.2.1.5.0.14.142.18.92.237.4 = Counter32: 643650557
SNMPv2-SMI::enterprises.14988.1.1.1.2.1.6.0.14.142.18.92.237.4 = Counter32: 2561441824
SNMPv2-SMI::enterprises.14988.1.1.1.2.1.7.0.14.142.18.92.237.4 = Counter32: 2271450573
SNMPv2-SMI::enterprises.14988.1.1.1.2.1.8.0.14.142.18.92.237.4 = Gauge32: 36000000
SNMPv2-SMI::enterprises.14988.1.1.1.2.1.9.0.14.142.18.92.237.4 = Gauge32: 36000000
Data Query Debug Information
+ Running data query [10].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/mikrotik_wireless_interfaces.xml'
+ XML file parsed ok.
+ Executing script for list of indexes 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php cacti 1.2.3.4 index'
+ Executing script query 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php cacti 1.2.3.4 query ifName'
+ Executing script query 'php -q /usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php cacti 1.2.3.4 query ifIndex'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/mikrotik_wireless_interfaces.xml'
+ Found data query XML file at '/usr/share/cacti/site/resource/script_server/mikrotik_wireless_interfaces.xml'
4) Mikrotik - Wireless - Registration Table (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Jan 30, 2008 2:06 pm
by mojiro
Replace the mikrotik_wireless_interfaces.php with the attached... and tell me if you saw any difference.

I have found some problems with old versions of Mikrotik. What version do you have ?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Jan 31, 2008 2:19 pm
by archon
Hi
I have replaced the file but it made no differences. :(
I can give You access to my Cacti and server, please contact me for details.
MikroTik versions: 2.9.29, 2.9.49, 3.0 (x86 and mips)

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Jan 31, 2008 8:43 pm
by mojiro
Hi
I have replaced the file but it made no differences. :(
I can give You access to my Cacti and server, please contact me for details.
MikroTik versions: 2.9.29, 2.9.49, 3.0 (x86 and mips)
you have mail

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Feb 06, 2008 4:16 pm
by archon
Hello,
Have You managed to find the source of problem with template?
Regards

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Feb 20, 2008 3:10 pm
by eekamouse
hi,

thanks a lot for this great job, i was using your old version templates and i switched to these new ones because of the registration table and ppp active templates. It seems to work properly but i was expecting something else with the registration table, a template which could graph the number of stations connected to the AP ( or could be sorted by wlan interfaces) . Is there any way to do that? I don't see any oid which could give the number of stations registered.

regards

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Sun Mar 30, 2008 8:34 pm
by ceslick
Thanks for this, looks good, but does anyone have the template for versoin 0.8.6j?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Apr 08, 2008 12:37 pm
by dansoftware
The problem was one missing file from template. Now queues and wireless client are OK, but registration table still not. When i run the querry manually it returns nothing, but snmpwalk -c cacti -v 1 1.2.3.4 .1.3.6.1.4.1.14988.1.1.1.2.1
I have the same problem on MikroTik RouterOS 3.6 + RouterBOARD 333 with exact symptoms. Is there any solution?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Apr 08, 2008 5:51 pm
by archon
Try switching from "Ping and SNMP" to "SNMP" in "Downed Device Detection" in Devices section.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Apr 09, 2008 9:13 am
by dansoftware
The problem was one missing file from template. Now queues and wireless client are OK, but registration table still not. When i run the querry manually it returns nothing, but snmpwalk -c cacti -v 1 1.2.3.4 .1.3.6.1.4.1.14988.1.1.1.2.1
I have the same problem on MikroTik RouterOS 3.6 + RouterBOARD 333 with exact symptoms. Is there any solution?
Solution is simple. PHP was built without SNMP support. That’s why "/usr/share/cacti/site/scripts/mikrotik_wireless_interfaces.php" didn’t work.
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'
Mikrotik - Wireless - Registration Table  (Verbose Query)  Uptime Goes Backwards  Success [6 Items, 3 Rows]

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu May 15, 2008 8:43 pm
by zoga08
Hi, this thread is alive ?

Even after i install the extensions for SNMP to PHP, i cant gather information from registration table.

But, what i'm really looking for, is to show in graphs the number of registered clients.

Anyone know anything about this?

if anyone wants to talk about this:
email: rsferreira@vipway.com.br
msn: zoga_08@hotmail.com

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Aug 06, 2008 8:23 am
by hugleo
Unfortunately no.

:(

I'm needing too.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Dec 25, 2008 1:26 pm
by EvilUncleEdd
Hey. Uhm, I was fiddling, and I set SNMP to vversion 1, and It suddenly worked... Dunno if it will work for you guys.

Regards

Your EvilUncleEdd

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Jan 08, 2009 11:42 pm
by REDTDI
Hi Mojiro:

Are these scripts the most current available? What version of Cacti do you recommend for running these scripts on? Will 0.8.7b work correctly?

Thanks,
Ken

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Jan 08, 2009 11:57 pm
by mojiro
Hi Mojiro:

Are these scripts the most current available? What version of Cacti do you recommend for running these scripts on? Will 0.8.7b work correctly?

Thanks,
Ken
Yes, it will run just fine! Let me know if you notice any problems.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Jan 16, 2009 9:35 pm
by REDTDI
Hi Mojiro:

Your Cacti scripts are simply awesome. Thanks so much for providing them to this forum. They couldn't be easier to use and I'm now monitoring over 700 items on my Cacti server. Do you know what I would have to do to show the "Simple Queue - Traffic" graph as bits/s instead of bytes/s? Is there somewhere in the scripts or Cacti that I could go to change this with a simple calculation change?

Also have you used THold on your Cacti server? Does it work well?

Thanks,
Ken

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Sat Jan 17, 2009 3:58 pm
by mojiro
I already have Queues in Bits and is named: Mikrotik - Queue - Simple Traffic (bits/sec, Total Bandwidth).

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Feb 10, 2009 3:35 am
by mojiro
Bump!

I have updated the template. Check the first post.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Feb 11, 2009 8:57 am
by mknnoc
That is real great job. thanks for that!!

Anyway, i have some question regarding Queue Tree. On winbox, i see my traffic is hitting 20M while Cacti report about 2m only. :( please see below:
total-download-cacti.png
total-download.png
what is wrong here?

By the way, can we monitor each queue tree leaf by Traffic? if monitor by packet, it would be difficult for monitoring.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Feb 11, 2009 10:51 am
by Muqatil
are you monitoring byte per second instead of bit per second?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Feb 11, 2009 12:15 pm
by mknnoc
i got it. thanks :lol:

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Feb 11, 2009 12:22 pm
by Chupaka
are you monitoring byte per second instead of bit per second?
yesss: on the left of first picture: 'Bytes per second'

20 Mbps ~ 2,4 MiBps

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Feb 12, 2009 12:47 am
by mojiro
By the way, can we monitor each queue tree leaf by Traffic? if monitor by packet, it would be difficult for monitoring.
ehm... what do you mean? If you monitor the top level of a tree, then you get all the traffic.

I cannot understand.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Feb 12, 2009 3:45 am
by mknnoc
mojiro, i mean can we monitor on queue child of the queue tree both by packet and traffic(Byte)?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Feb 12, 2009 7:56 am
by mojiro
mojiro, i mean can we monitor on queue child of the queue tree both by packet and traffic(Byte)?
Yes, it is possible. Since they would be in the same graph, both units should have similar numeric size, which is difficult.

What I mean? Every packet carries 1500 bytes, so you will have a graph with 1000p-p for packets and another one with 1500000p-p for bytes.

If they will be shown merged, you could not able to see the packet graph.

A solution, the packet graph may be multiplied by 1000 or 1500 in order to reach the byte (or bit) graph, but the vertical grid values could not be real for packets.

In the next version (I will be able to release it, in a month), I will add it and additionally I will add traffic/packet graphs with the in/out sizes being aggregated, since most of the wireless links are half-duplex. I have in mind to use alpha blending on graphs, in order to show the real size and the aggregated at the same time.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Feb 12, 2009 8:50 am
by mknnoc
Great!! Thanks

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed May 27, 2009 8:16 pm
by Znuff
Is anyone actually receiving the correct info for the MEM/DSK graphs?

I get weird values.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri May 29, 2009 9:16 am
by mojiro
what do you mean `weird` ?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri May 29, 2009 9:26 am
by NetworkPro
I am trying to use the website http://www.odmon.com, with their templates everything is weird like the post above. Look at the memory usage on hte left side of the graph - 50K ? and its a straight line? Something is off here.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Jun 03, 2009 12:59 am
by JHughes
Hi
I'm getting these errors when I attempt to use these scripts (they import with no errors)
Data Query [Mikrotik - Queue - Simple]  	 Reload Associated Query
Error in data query.

Notice: Undefined variable: column_counter in /usr/share/cacti/site/graphs_new.php on line 887
it does this for "wireless client", "Wireless regestration table", "interface statistics" and "simple queue"

And it doesn't seem to graph anything for "wireless connections" (perhaps because it's dependent on other data.....) ?


Any help?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Jun 05, 2009 2:39 pm
by mac86
good work!
I never used cacti, but I will try it !

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Aug 21, 2009 1:59 pm
by m4rk0
Hello,

How can I define "Interface" and "BSSID" for RegTable graphs?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Aug 21, 2009 9:41 pm
by chapex
Someone has idea of copying the files to the directory of cacti? Requested in the instruction :?

regards

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Aug 21, 2009 10:13 pm
by m4rk0
Someone has idea of copying the files to the directory of cacti? Requested in the instruction :?

regards
What do You mean? Where to copy Mikrotik template?

If You are using Debian You need to copy resources and scripts to /usr/share/cacti/site
And import template file on cacti site...

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Sat Aug 22, 2009 4:46 am
by chapex
Thank you very much!. I did not know the route to give up the files.

regards :)

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Aug 25, 2009 11:22 pm
by dwilko
Hi

Has anyone got this working with RouterOS 4.0beta4 or is able to help me get this working on 4.0beta4?

I have imported the templates and added the device to cacti
but the SNMP query only shows 2 items for Mikrotik - Wireless - Registration Table
Data Query Name Debugging Re-Index Method Status 
1) Mikrotik - Queue - Simple  (Verbose Query)  Uptime Goes Backwards  Success [0 Items, 0 Rows]      
2) Mikrotik - Queue - Tree  (Verbose Query)  Uptime Goes Backwards  Success [0 Items, 0 Rows]      
3) Mikrotik - Wireless - Client  (Verbose Query)  Uptime Goes Backwards  Success [0 Items, 0 Rows]      
4) Mikrotik - Wireless - Registration Table  (Verbose Query)  Uptime Goes Backwards  Success [2 Items, 1 Row]      
5) SNMP - Interface Statistics  (Verbose Query)  Uptime Goes Backwards  Success [0 Items, 0 Rows]  

Regards

David

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Thu Aug 27, 2009 1:52 am
by dwilko
Never mind, got the graph's working, was me been silly forgetting how to use cacti :|

Still the device page still says what it did above

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Sat Sep 05, 2009 1:12 pm
by m4rk0
Hello,

Can You add support for Health - Voltage and Temperature?

active-fan: .1.3.6.1.4.1.14988.1.1.3.9.0
voltage: .1.3.6.1.4.1.14988.1.1.3.8.0

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Sat Sep 05, 2009 7:30 pm
by chapex
Hello,

Can You add support for Health - Voltage and Temperature?

active-fan: .1.3.6.1.4.1.14988.1.1.3.9.0
voltage: .1.3.6.1.4.1.14988.1.1.3.8.0
post it in "routeros beta", feature request. :)

regards

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Sat Sep 05, 2009 8:16 pm
by m4rk0
Hello,

Can You add support for Health - Voltage and Temperature?

active-fan: .1.3.6.1.4.1.14988.1.1.3.9.0
voltage: .1.3.6.1.4.1.14988.1.1.3.8.0
post it in "routeros beta", feature request. :)

regards
This oids are implemented in ROS, but I need CACTI template for this oids :)

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Sat Sep 05, 2009 8:49 pm
by chapex

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Sat Sep 05, 2009 9:11 pm
by m4rk0
There is no template for ROS Health...

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Oct 16, 2009 2:26 pm
by marlow
Nice work here.

/Marlow

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Oct 27, 2009 11:51 pm
by xezen
i get an error when i import the templets can anyone tell me why


Error: XML: Hash version does not exist.


i have cacti 0.78b if im 100% right please help

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 03, 2009 11:06 pm
by bakkerl
i get an error when i import the templets can anyone tell me why
Error: XML: Hash version does not exist.
i have cacti 0.78b if im 100% right please help
The templates are created with a newer version of cacti than you are using.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 17, 2009 12:02 am
by xezen
i get this error on cacti 0.8.7e


when i import the file

Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 115 bytes) in /usr/share/cacti/site/lib/xml.php on line 32


any idea how to fix this

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 17, 2009 12:06 am
by fewi
That's due to each PHP process having a memory limit of 16MB by default, and your instance requiring more memory than that. This can be changed via the php.ini.

Since that's entirely outside of RouterOS please use Google for answers - "php memory limit" as a query should get you there.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 17, 2009 12:32 am
by xezen
but i have edited that thats why i came hers as this is router os with cacti

thats what i need
in mp php.ini file
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 50M ; Maximum amount of memory a script may consume (16MB)

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 17, 2009 12:34 am
by fewi
Did you restart the web server process? Depending on your setup PHP stays resident and doesn't re-evaluate the configuration file.

And this is a PHP issue. RouterOS doesn't run PHP.

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 17, 2009 12:37 am
by xezen
yes all services restarted
restarted the ubuntu server just to make 100% sore and thats right but still get error it changes in size everytime

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 17, 2009 12:39 am
by Chupaka
maybe 'memory_limit' is set somewhere in virtual host definition?..

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 17, 2009 12:46 am
by xezen
were that as i just know of

sudo vi /etc/php5/apache2/php.ini

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 17, 2009 12:49 am
by xezen
thanks for the help all working now

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Wed Nov 18, 2009 10:26 am
by xezen
is there anyone that can help me with cacti over skype?

please contact me

skype name:

meerholz.brendan

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Mar 02, 2010 6:28 pm
by mdimas
Any one have an idea why i get the following on a verbose query? If i run the snmp walk in the command line it works just fine.

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/mikrotik_queue_tree.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.14988.1.1.2.2.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/mikrotik_queue_tree.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/mikrotik_queue_tree.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/mikrotik_queue_tree.xml'

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Mon Mar 08, 2010 11:49 am
by omidkosari
anyone has problems to get IPIP interface statistics with cacti ?
 108  R  name=.1.3.6.1.2.1.2.2.1.2.2797074 mtu=.1.3.6.1.2.1.2.2.1.4.2797074 mac-address=.1.3.6.1.2.1.2.2.1.6.2797074 
       bytes-in=.1.3.6.1.2.1.2.2.1.10.6909737 packets-in=.1.3.6.1.2.1.2.2.1.11.6909737 
       discards-in=.1.3.6.1.2.1.2.2.1.13.6909737 errors-in=.1.3.6.1.2.1.2.2.1.14.6909737 
       bytes-out=.1.3.6.1.2.1.2.2.1.16.6909737 packets-out=.1.3.6.1.2.1.2.2.1.17.6909737 
       discards-out=.1.3.6.1.2.1.2.2.1.19.6909737 errors-out=.1.3.6.1.2.1.2.2.1.20.6909737 

the problem is that cacti just see "bytes-out" . but "bytes-in" allways is nan .
i tried them with snmpwalk and there was no problem on both "bytes-in" and "bytes-out"
ros v4.6

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Jan 25, 2013 10:22 pm
by mrdarbandy
Hello,

Can You add support for Health - Voltage and Temperature?

active-fan: .1.3.6.1.4.1.14988.1.1.3.9.0
voltage: .1.3.6.1.4.1.14988.1.1.3.8.0
did you find a template or some other way to create temperature graphs for mikrotik in cacti?

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Tue Nov 19, 2013 7:31 pm
by mojiro
Please check this topic for updating Mikrotik's Templates for Cacti.

http://forums.cacti.net/viewtopic.php?f=12&t=51149

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Thu Jun 11, 2015 7:16 am
by RB951G2HnD
Hello,

Could you please help me to configure Cacti to get data via SNMP from the router - I need to see the WAN bandwidth utilization? Now I can see the CPU load only and can't create a new graph for traffic.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Tue Jul 14, 2015 2:07 pm
by josu
Hello,

It would be great to centralize all Mikrotik plugins in the Cacti documentation page: http://docs.cacti.net/plugin:mikrotik

Someone have this plugins working in a recent Cacti? If yes, I could help to centralize the plugins.

Kind regards.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Tue Jul 14, 2015 3:25 pm
by RB951G2HnD
I had removed Cacti from the server because my Mikrotik device doesn't support SNMP polling for the desired goal. I surfed the www and didn't find the same what I need.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Tue Jul 14, 2015 6:42 pm
by josu
I want to monitor interfaces bandwidth. Anyone has it working?

Regards.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Tue Jul 14, 2015 6:44 pm
by Cha0s
I want to monitor interfaces bandwidth. Anyone has it working?

Regards.
The default templates of Cacti can measure bandwidth and total traffic out of the box.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Wed Jul 15, 2015 9:07 am
by josu
I want to monitor interfaces bandwidth. Anyone has it working?

Regards.
The default templates of Cacti can measure bandwidth and total traffic out of the box.
Thanks!

But need I install a Mikrotik template? Or with the default template will work?

Best regards.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Wed Jul 15, 2015 7:19 pm
by Feklar
The basic templates work fine if you are looking for interface statistics, that is standard SNMP information. If you are looking for other SNMP information (like number of hotspot users, or number of wireless clients), you can make your own templates, or use some of the other templates that are available.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Wed Jul 15, 2015 8:10 pm
by RB951G2HnD
josu see all my posts above. As I had wrote there is no way to configure interfaces bandwidth collecting via SNMP on MikroTik RB951 at least. If you will find the way you will be a pioneer (let me know how).

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Wed Jul 15, 2015 8:38 pm
by Feklar
josu see all my posts above. As I had wrote there is no way to configure interfaces bandwidth collecting via SNMP on MikroTik RB951 at least. If you will find the way you will be a pioneer (let me know how).
Can you do a SNMP walk of the MikroTik in the first place? I don't own a 951, but I believe all MikroTiks support interface statistics, so that information should be available and graphable. If you cannot get SNMP information from the MikroTik, fix that first, then you can work on graphing the necessary information.

Also the Cacti default poller runs every 5 minutes, but can be set to 1 minute. But even then you are only getting the amount of traffic passed since the last poll, not live data. It is just an average amount of traffic passed since last poll.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Wed Jul 15, 2015 9:12 pm
by Cha0s
josu see all my posts above. As I had wrote there is no way to configure interfaces bandwidth collecting via SNMP on MikroTik RB951 at least. If you will find the way you will be a pioneer (let me know how).
When you create the Graphs on Cacti, on the graph creation page on the table "Data Query [SNMP - Interface Statistics]" you select the interfaces you want to monitor and then bellow on the right you select on the dropdown named "Select a graph type" > "In/Out Bit with Total Bandwidth".

The graphs that will be created will feature on the bottom of them the in/out/ bandwidth for the selected period of time.

You can see a sample on http://www.cha0s.gr/

RouterOS Host template

Posted: Tue Jul 28, 2015 11:36 am
by GuJack20
Hello

Based on the templates on the first page a managed to do some corrections, edited Uptime template to be cleaner, Memory and Storage template to be exact, and also created the Mikrotik templates for Cacti for Voltage and board temperature. These are useful when you have MikroTik routers connected to a battery or solar source.

Would be nice to have some collaboration to update the templates on the first page because as i see Mojiro will not continue the development

Thanks
voltage+temp.png
Uptime revised.png

Re: RouterOS Host template

Posted: Wed Jul 29, 2015 10:13 am
by josu
Hello

Based on the templates on the first page a managed to do some corrections, edited Uptime template to be cleaner, Memory and Storage template to be exact, and also created the Mikrotik templates for Cacti for Voltage and board temperature. These are useful when you have MikroTik routers connected to a battery or solar source.

Would be nice to have some collaboration to update the templates on the first page because as i see Mojiro will not continue the development

Thanks
voltage+temp.png
Uptime revised.png
Thanks!

It will be great to centralize all templates in one place. github? cacti wiki?

Where could I download your templates?

Best regards.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Wed Jul 29, 2015 11:20 am
by GuJack20
Hello

I'll check cacti wiki and/or github but i need some collaboration since i'm too busy :(

Here is the mojiro archive, with the updated templates as stated above. It would be nice to have this on first page. Let's hope one of the admins or mojiro does this.

Thanks

Update: I checked the cacti wiki, and i found no way to post a template there. If anyone can, let me know. Also if you think we can post these templates in the MikroTik Wiki, let's do it.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Sun Aug 02, 2015 11:41 pm
by GuJack20
Uploaded everything, with some more fixes at:

http://docs.cacti.net/usertemplate:host:mikrotik

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Mon Aug 03, 2015 9:00 am
by josu
Uploaded everything, with some more fixes at:

http://docs.cacti.net/usertemplate:host:mikrotik
Thanks!

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Mon Aug 03, 2015 9:27 am
by EDinATL
I'm definitely getting a Not Found for the download link for that .zip.zip file.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Mon Aug 03, 2015 9:40 am
by RB951G2HnD
There is a mistake in the URL. The correct link is: http://docs.cacti.net/_media/cacti_host ... .0.zip.zip

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Wed Aug 05, 2015 11:26 am
by GuJack20
Yeah.

Someone had deleted the file, so i had to fix the link.
Also the .zip.zip extension added is strange :)

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Mon Aug 10, 2015 5:50 am
by EDinATL
Not sure if it's my version of cacti, (0.8.8a on a raspberry pi 2 running debian, had to edit the hash entries to get the new script to work on the old version, btw) but I had to fix the uptime graph by going in and changing the graph template items from LAST to AVERAGE.

HTH

Re: cacti: Mikrotik RouterOS Statistics (Update 01/18/2008)

Posted: Fri Aug 21, 2015 11:43 pm
by rovshango
Bump!

I have updated the template. Check the first post.

Hi, Which file we should replace?

I didn't get the "bump"

Thanks

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Tue Sep 29, 2015 6:25 am
by nembulus
Hi,

Where i can download the latests ?
Thanks.

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Tue Oct 27, 2015 5:36 am
by nembulus
Hi,

I have following error on signal strength graph, any idea how to fix it ? :

/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--title='rg.massimo.Signal Strength.wlan1 ' \
--rigid \
--base='1000' \
--height='64' \
--width='500' \
--upper-limit='-45' \
--lower-limit='-90' \
--vertical-label='dBm' \
--slope-mode \
--font TITLE:8: \
--font AXIS:7: \
--font LEGEND:7: \
--font UNIT:7: \
DEF:a='/var/www/html/rra/rg_massimo_signal_in_852.rrd':'signal_in':AVERAGE \
AREA:a#00FF00FF:'' \
AREA:a#000000FF:'Rx Signal':STACK \
GPRINT:a:LAST:'Current\:%8.2lf %s' \
GPRINT:a:MIN:'Minimum\:%8.2lf %s' \
GPRINT:a:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:a:MAX:'Maximum\:%8.2lf %s\n' \
HRULE:-80#000000FF:'' \
HRULE:-70#A150AAFF:'' \
HRULE:-60#FF0000FF:'' \
HRULE:-50#FFAB00FF:'' \
HRULE:-40#FFF200FF:'' \
COMMENT:'SSID\: KSP-MSP\\\\t' \
COMMENT:'BSSID\: D4\:CA\:6D\:4E\:96\:E9'
RRDTool Says:
ERROR: Unknown control code at the end of 'SSID: KSP-MSP\ '


Thanks in advanced

Re: cacti: Mikrotik RouterOS Statistics (Update 11/19/2013)

Posted: Wed Mar 02, 2016 7:53 am
by rovshango
Hi All,

Is there anyway to get graph which will show DHCP lease? I mean count if items.

Same result of command /ip dhcp-server lease print count-only