Mikrotik RouterOS Statistics (Update 02/10/2009)

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
kennethkalmer
Posts: 3
Joined: Mon Sep 28, 2009 8:16 am
Location: Johannesburg

Post by kennethkalmer »

I'm having the same issue as kei with cacti 0.8.7e, where the debug query in cacti shows no results:

Code: Select all

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
But snmpwalk on the command line shows results:

Code: Select all

snmpwalk -v2c -c public 10.10.10.10 .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
kei never gave his solution, anybody has some pointers?
DLNoah
Cacti User
Posts: 119
Joined: Wed Jun 20, 2007 11:27 pm

Post by DLNoah »

1) Was the snmpwalk you did from your cacti box's command line, or from a different box?

2) Does the hostname, community, and SNMP version set in cacti match the values you used in your test walk (10.10.10.10, public, and Version 2, respectively)?
kennethkalmer
Posts: 3
Joined: Mon Sep 28, 2009 8:16 am
Location: Johannesburg

Post by kennethkalmer »

DLNoah

1) From the cacti box

2) The configured values do match those on the command line, I checked and double checked them.
DLNoah
Cacti User
Posts: 119
Joined: Wed Jun 20, 2007 11:27 pm

Post by DLNoah »

Hm. Not really sure what else to check, sorry... I'm not a MT user myself. Have you tried switching Cacti back and forth between Version 1 and Version 2 to see if it makes any difference?
kennethkalmer
Posts: 3
Joined: Mon Sep 28, 2009 8:16 am
Location: Johannesburg

Post by kennethkalmer »

Me neither, I need this to bill a client for data usage on their MT in our DC...

But thanks a lot, you will not believe me when I say switching to V1 made the difference. All the interface data I need is now available to cacti.

Thanks for the hint !
mhnet_listas
Posts: 2
Joined: Wed Oct 07, 2009 3:22 pm

Wireless Registration Tables (per Interface)

Post by mhnet_listas »

Is there a way to graph only the total of Wireless Registration Tables per interface.

For example, I have 2 interfaces in Ap Mode (wlan1 and wlan2), I want to graph only the total of clients connected in each interface.


And thanks to mojiro for the great work.
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

its not easy, but it will be added to ToDo's
[i]Born to be online![/i]
mhnet_listas
Posts: 2
Joined: Wed Oct 07, 2009 3:22 pm

Post by mhnet_listas »

I was testing your scripts, specifically mikrotik_wireless_interfaces.php.

If I exec the command

Code: Select all

php -q mikrotik_wireless_interfaces.php public 10.10.100.2 query ifName
I get the result
AA:AA:AA:45:EB:D9!wlan1
AA:AA:AA:4A:79:4C!wlan1
AA:AA:AA:5E:15:D1!wlan1
AA:AA:AA:A5:07:CA!wlan1
AA:AA:AA:CD:DA:73!wlan1
AA:AA:AA:E8:C4:B7!wlan1
AA:AA:AA:FB:2B:8B!wlan1
AA:AA:AA:FB:44:CF!wlan1
AA:AA:AA:FE:DB:B0!wlan1
AA:AA:AA:27:A8:7C!wlan1
AA:AA:AA:49:20:7B!wlan1
AA:AA:AA:49:2B:D3!wlan1
AA:AA:AA:49:2C:49!wlan1
AA:AA:AA:59:EC:92!wlan1
AA:AA:AA:00:7B:AF!wlan1
AA:AA:AA:04:25:A5!wlan1
AA:AA:AA:03:57:C5!wlan1
AA:AA:AA:92:8D:B9!wlan2
AA:AA:AA:E8:A6:3D!wlan2
AA:AA:AA:FB:2A:80!wlan2
AA:AA:AA:FE:F7:BE!wlan2
AA:AA:AA:49:29:7B!wlan2
AA:AA:AA:0A:A9:7F!wlan2
I don't know how your scripts work with Cacti, how Cacti collect the data, but I think it's easy to count how many registered clients each interface have.
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

if you know php, you may modify the php and xml file.
if you dont, you may use a work around for the moment

php -q mikrotik_wireless_interfaces.php public 10.10.100.2 query ifName | grep "<if name>" -c
[i]Born to be online![/i]
cetterra
Posts: 2
Joined: Sat Oct 31, 2009 11:35 am

Post by cetterra »

kennethkalmer wrote:I'm having the same issue as kei with cacti 0.8.7e, where the debug query in cacti shows no results:

Code: Select all

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
But snmpwalk on the command line shows results:

Code: Select all

snmpwalk -v2c -c public 10.10.10.10 .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
kei never gave his solution, anybody has some pointers?

I am having the same problem. Did you find the solution?
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

Do you have snmp extensions in php ?
[i]Born to be online![/i]
belo
Posts: 1
Joined: Mon Nov 02, 2009 4:16 pm

Post by belo »

hi!

change the snmp version to 1 in devices definition (v2c does'n working)

belo


[quote="cetterra"][quote="kennethkalmer"]I'm having the same issue as kei with cacti 0.8.7e, where the debug query in cacti shows no results:

[code]+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti-0.8.7e/resource/snmp_queries/interface.xml'[/code]

But snmpwalk on the command line shows results:

[code]snmpwalk -v2c -c public 10.10.10.10 .1.3.6.1.2.1.2.2.1.1
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4[/code]

kei never gave his solution, anybody has some pointers?[/quote]


I am having the same problem. Did you find the solution?[/quote]
channelasian
Posts: 5
Joined: Sat Nov 21, 2009 11:04 pm

Post by channelasian »

there is no luck for me.

I can not add Mikrotik RT - Traffic got error below

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Mikrotik RT - Traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
CDEF:cdefa=a,8,* \
CDEF:cdefe=a,8,* \
AREA:cdefa#00CF00FF:"Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefe#002A97FF:"Outbound"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s" 

RRDTool Says:

ERROR: invalid rpn expression in: a,8,*
Also the Mikrotik - Queue - Simple Traffic (bits/sec, Total Bandwidth)

What i can add only these

Code: Select all

Mikrotik RT - Active PPP Connections  	 		
Mikrotik RT - ARP Entries 	 	
Mikrotik RT - Available Disk Space 	
Mikrotik RT - CPU Utilization 		
Mikrotik RT - Memory Usage 	
Mikrotik RT - Routes
Mikrotik RT - Uptime 	3 	
Mikrotik RT - Wireless Connections
Please help!!
thanks
beccara
Posts: 14
Joined: Tue Jan 19, 2010 5:07 pm

Post by beccara »

First off want to say that I love these templates, makes my life so much easier.

I just have one issue with them, the graph titles and data sources for doing signal strength monitoring via

Mikrotik - Wireless - RegTable Signal Strength

Cuts off the last 2 digits of the MAC address, It shows up in the graph fully under BSSID and in the device screen it shows it under hardware address but in the titles of the graphs and data sources it gets cut 2 digits short.

It makes it nearly impossible to filter thru a large amount of wireless clients that have nearly the same mac address, is there anyway I can fix this?
Gemini
Posts: 1
Joined: Tue Mar 30, 2010 7:25 am

Graph all PPPoE interface

Post by Gemini »

Hello,
it's possible graph all PPPoE traffic interfaces with Cacti?
Please help me.
Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests